Product Documentation

FairCom SQL for Python

Previous Topic

Next Topic

SSL Security Options

The default connection string provided in the FairCom Python tutorials does not use SSL security. The following connection strings provide various levels of SSL support:

No SSL Connection. This is the default connection string provided in the tutorials:

conn = pyctree.connect( host='localhost', port='6597', user='admin', password='ADMIN', database='ctreeSQL' )

Equivalent:

conn = pyctree.connect( host='localhost', port='6597', user='admin', password='ADMIN', database='ctreeSQL', ssl=None )

SSL without certificate checking:

conn = pyctree.connect( host='localhost', port='6597', user='admin', password='ADMIN', database='ctreeSQL', ssl='BASIC' )

SSL with certificate checking; certificate file as specified relative to the client working directory:

conn = pyctree.connect( host='localhost', port='6597', user='admin', password='ADMIN', database='ctreeSQL', ssl='<certificate file name>' )

SSL with certificate checking; certificate named ctsrvr.pem in client working directory:

conn = pyctree.connect( host='localhost', port='6597', user='admin', password='ADMIN', database='ctreeSQL', ssl='' )

SSL Support Parameter

A new optional parameter has been added to the "connect" function as follows:

connect(**kw_args)

Constructor for creating a connection to the database.

Returns a Connection Object.

It takes parameters as keyword parameters for more intuitive use as follows:

  • user - User name as string (optional default guest)
  • password - Password as string (optional default None)
  • host - Hostname (optional default localhost)
  • database - Database name (optional default ctreeSQL)
  • port - TCP/IP port number (optional default 6597)
  • ssl - None: No SSL, (optional default None)

    'BASIC': SSL without certificate checking,

    '<certificate file name>': SSL with certificate checking, certificate file as specified,

    '' (two single quotation marks): SSL with certificate checking, certificate in current working dir named ctsrvr.pem.

TOCIndex