5.5.4.2. Certificate methods

MethodDescription
__init__(self, certificate, private_key) Load a certificate from a string, and access it using its passphrase
fromFile(certificate_file_path, private_key) Load a certificate from a file, and access it using its passphrase

Table 5.44. Method summary

Method __init__(self, certificate, private_key)

Initializes a Certificate instance by loading a certificate from a string, and accesses it using its passphrase. To load a certificate from a file, use the Certificate.fromFile method.

Arguments of __init__
certificate_file_path (certificate)
Default: n/a
The path and filename to the certificate file. The certificate must be in PEM format.

private_key_password (string)
Default: None
Passphrase used to access the private key of the certificate specified in certificate_file_path.

Method fromFile(certificate_file_path, private_key)

Initializes a Certificate instance by loading a certificate from a file, and accesses it using its passphrase.

Arguments of fromFile
certificate_file_path (certificate)
Default: n/a
The path and filename to the certificate file. The certificate must be in PEM format.

passphrase (string)
Default: None
Passphrase used to access the private key specified in certificate_file_path.