blpapi.TlsOptions

class blpapi.TlsOptions

SSL configuration options

TlsOptions instances maintain client credentials and trust material used by a session to establish secure mutually authenticated connections to endpoints.

The client credentials comprise an encrypted private key with a client certificate. The trust material comprises one or more certificates.

TlsOptions objects are created using createFromFiles() or createFromBlobs() accepting the DER encoded client credentials in PKCS#12 format and the DER encoded trusted material in PKCS#7 format.

static createFromBlobs(clientCredentials, clientCredentialsPassword, trustedCertificates)
Parameters
  • clientCredentials (bytes or bytearray) – Blob with the client credentials

  • clientCredentialsPassword (str) – Password for the credentials

  • trustedCertificates (bytes or bytearray) – Blob with the trusted certificates

Creates a TlsOptions using a DER encoded client credentials in PKCS#12 format and DER encoded trust material in PKCS#7 format from the given raw data.

static createFromFiles(clientCredentialsFilename, clientCredentialsPassword, trustedCertificatesFilename)
Parameters
  • clientCredentialsFilename (str) – Path to the file with the client credentials

  • clientCredentialsPassword (str) – Password for the credentials

  • trustedCertificatesFilename (str) – Path to the file with the trusted certificates

Creates a TlsOptions using a DER encoded client credentials in PKCS#12 format and DER encoded trust material in PKCS#7 format from the specified files.

destroy()

Destructor.

setCrlFetchTimeoutMs(timeoutMs)
Parameters

timeoutMs (int) – Timeout threshold in milliseconds

Set the CRL fetch timeout to the specified timeoutMs. The default is 20,000 milliseconds. The TLS handshake timeout will be set to the default if the specified timeoutMs is not positive.

setTlsHandshakeTimeoutMs(timeoutMs)
Parameters

timeoutMs (int) – Timeout threshold in milliseconds

Set the TLS handshake timeout to the specified timeoutMs. The default is 10,000 milliseconds. The TLS handshake timeout will be set to the default if the specified timeoutMs is not positive.