CRLManager Class
Properties Methods Events Config Settings Errors
The CRLManager class supports the importing, exporting, and validation of Certificate Revocation Lists (CRLs).
Syntax
class secureblackbox.CRLManager
Remarks
CRLs store information about revoked certificates, i.e., certificates that have been identified as invalid for any number of reasons by the issuing certificate authority (CA). CRLs identify certificates by their serial numbers. Therefore, by knowing the certificate's SerialNumber, its validity status can be checked against a CRL.
Each CRL corresponds to one issuing point, and each Certificate Authority (CA) certificate can have a corresponding CRL which contains information about the certificates signed with this CA certificate.
CAs are not required to issue CRLs if other revocation or certificate status mechanisms are provided. Each CRL must contain the date by which the next CRL will be issued. This date is specified by the NextUpdate field.
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
ca_cert_bytes | Returns the raw certificate data in DER format. |
ca_cert_handle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
crl_bytes | Returns the raw CRL data in DER format. |
crlca_key_id | A unique identifier (fingerprint) of the CA certificate's private key, if present in the CRL. |
crl_entry_count | Returns the number of certificate status entries in the CRL. |
crl_handle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
crl_issuer | The common name of the CRL issuer (CA), typically a company name. |
crl_issuer_rdn | A collection of information, in the form of [OID, Value] pairs, uniquely identifying the CRL issuer. |
crl_location | The URL that the CRL was downloaded from. |
crl_next_update | The planned time and date of the next version of this CRL to be published. |
crl_sig_algorithm | The public key algorithm that was used by the CA to sign this CRL. |
crltbs | The to-be-signed part of the CRL (the CRL without the signature part). |
crl_this_update | The date and time at which this version of the CRL was published. |
entry_count | The number of items in the CRL. |
crl_entry_info_cert_status | Returns the status of the certificate. |
crl_entry_info_handle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
crl_entry_info_revocation_date | The time and date when the certificate gets revoked or cancelled. |
crl_entry_info_revocation_reason | Specifies the reason for certificate revocation. |
crl_entry_info_serial_number | The certificate serial number. |
external_crypto_async_document_id | Specifies an optional document ID for SignAsyncBegin() and SignAsyncEnd() calls. |
external_crypto_custom_params | Custom parameters to be passed to the signing service (uninterpreted). |
external_crypto_data | Additional data to be included in the async state and mirrored back by the requestor. |
external_crypto_external_hash_calculation | Specifies whether the message hash is to be calculated at the external endpoint. |
external_crypto_hash_algorithm | Specifies the request's signature hash algorithm. |
external_crypto_key_id | The ID of the pre-shared key used for DC request authentication. |
external_crypto_key_secret | The pre-shared key used for DC request authentication. |
external_crypto_method | Specifies the asynchronous signing method. |
external_crypto_mode | Specifies the external cryptography mode. |
external_crypto_public_key_algorithm | Provide the public key algorithm here if the certificate is not available on the pre-signing stage. |
fips_mode | Reserved. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
add | Adds a new revoked certificate entry. |
clear | Empties the CRL. |
config | Sets or retrieves a configuration setting. |
do_action | Performs an additional action. |
download | Downloads a CRL from the specified location. |
get_cert_entry_index | Returns the index of the CRL item by the certificate's serial number. |
get_extension_data | Returns extension data. |
get_extension_state | Returns certificate extension state. |
list_extensions | List extensions currently available in the certificate or CRL. |
load | Loads a CRL from a byte array. |
load_from_file | Loads a CRL from a file. |
remove | Removes the specified entry from the CRL. |
save | Saves the CRL to a byte array. |
save_to_file | Saves the CRL to a file. |
select_entry | Fetches revocation information about the selected certificate from the CRL. |
set_extension_data | Sets extension data. |
set_extension_state | Sets certificate extension state. |
validate | Validates the CRL signature. |
Event List
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
on_error | Information about errors during CRL management. |
on_external_sign | Handles remote or external signing initiated by the SignExternal method or other source. |
on_notification | This event notifies the application about an underlying control flow event. |
Config Settings
The following is a list of config settings for the class with short descriptions. Click on the links for further details.
CheckKeyIntegrityBeforeUse | Enables or disable private key integrity check before use. |
CookieCaching | Specifies whether a cookie cache should be used for HTTP(S) transports. |
Cookies | Gets or sets local cookies for the class. |
DefDeriveKeyIterations | Specifies the default key derivation algorithm iteration count. |
EnableClientSideSSLFFDHE | Enables or disables finite field DHE key exchange support in TLS clients. |
GlobalCookies | Gets or sets global cookies for all the HTTP transports. |
HttpUserAgent | Specifies the user agent name to be used by all HTTP clients. |
LogDestination | Specifies the debug log destination. |
LogDetails | Specifies the debug log details to dump. |
LogFile | Specifies the debug log filename. |
LogFilters | Specifies the debug log filters. |
LogFlushMode | Specifies the log flush mode. |
LogLevel | Specifies the debug log level. |
LogMaxEventCount | Specifies the maximum number of events to cache before further action is taken. |
LogRotationMode | Specifies the log rotation mode. |
MaxASN1BufferLength | Specifies the maximal allowed length for ASN.1 primitive tag data. |
MaxASN1TreeDepth | Specifies the maximal depth for processed ASN.1 trees. |
OCSPHashAlgorithm | Specifies the hash algorithm to be used to identify certificates in OCSP requests. |
StaticDNS | Specifies whether static DNS rules should be used. |
StaticIPAddress[domain] | Gets or sets an IP address for the specified domain name. |
StaticIPAddresses | Gets or sets all the static DNS rules. |
Tag | Allows to store any custom data. |
TLSSessionGroup | Specifies the group name of TLS sessions to be used for session resumption. |
TLSSessionLifetime | Specifies lifetime in seconds of the cached TLS session. |
TLSSessionPurgeInterval | Specifies how often the session cache should remove the expired TLS sessions. |
UseOwnDNSResolver | Specifies whether the client classes should use own DNS resolver. |
UseSharedSystemStorages | Specifies whether the validation engine should use a global per-process copy of the system certificate stores. |
UseSystemOAEPAndPSS | Enforces or disables the use of system-driven RSA OAEP and PSS computations. |
UseSystemRandom | Enables or disables the use of the OS PRNG. |
ca_cert_bytes Property
Returns the raw certificate data in DER format.
Syntax
def get_ca_cert_bytes() -> bytes: ...
ca_cert_bytes = property(get_ca_cert_bytes, None)
Remarks
Returns the raw certificate data in DER format.
This property is read-only.
ca_cert_handle Property
Allows to get or set a 'handle', a unique identifier of the underlying property object.
Syntax
def get_ca_cert_handle() -> int: ... def set_ca_cert_handle(value: int) -> None: ...
ca_cert_handle = property(get_ca_cert_handle, set_ca_cert_handle)
Default Value
0
Remarks
Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.
When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object
after such operation.
pdfSigner.setSigningCertHandle(certMgr.getCertHandle());
crl_bytes Property
Returns the raw CRL data in DER format.
Syntax
def get_crl_bytes() -> bytes: ...
crl_bytes = property(get_crl_bytes, None)
Remarks
Returns the raw CRL data in DER format.
This property is read-only.
crlca_key_id Property
A unique identifier (fingerprint) of the CA certificate's private key, if present in the CRL.
Syntax
def get_crlca_key_id() -> bytes: ... def set_crlca_key_id(value: bytes) -> None: ...
crlca_key_id = property(get_crlca_key_id, set_crlca_key_id)
Remarks
A unique identifier (fingerprint) of the CA certificate's private key, if present in the CRL.
crl_entry_count Property
Returns the number of certificate status entries in the CRL.
Syntax
def get_crl_entry_count() -> int: ...
crl_entry_count = property(get_crl_entry_count, None)
Default Value
0
Remarks
Returns the number of certificate status entries in the CRL.
This property is read-only.
crl_handle Property
Allows to get or set a 'handle', a unique identifier of the underlying property object.
Syntax
def get_crl_handle() -> int: ... def set_crl_handle(value: int) -> None: ...
crl_handle = property(get_crl_handle, set_crl_handle)
Default Value
0
Remarks
Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.
When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object
after such operation.
pdfSigner.setSigningCertHandle(certMgr.getCertHandle());
crl_issuer Property
The common name of the CRL issuer (CA), typically a company name.
Syntax
def get_crl_issuer() -> str: ...
crl_issuer = property(get_crl_issuer, None)
Default Value
""
Remarks
The common name of the CRL issuer (CA), typically a company name.
This property is read-only.
crl_issuer_rdn Property
A collection of information, in the form of [OID, Value] pairs, uniquely identifying the CRL issuer.
Syntax
def get_crl_issuer_rdn() -> str: ...
crl_issuer_rdn = property(get_crl_issuer_rdn, None)
Default Value
""
Remarks
A collection of information, in the form of [OID, Value] pairs, uniquely identifying the CRL issuer.
This property is read-only.
crl_location Property
The URL that the CRL was downloaded from.
Syntax
def get_crl_location() -> str: ...
crl_location = property(get_crl_location, None)
Default Value
""
Remarks
The URL that the CRL was downloaded from.
This property is read-only.
crl_next_update Property
The planned time and date of the next version of this CRL to be published.
Syntax
def get_crl_next_update() -> str: ...
crl_next_update = property(get_crl_next_update, None)
Default Value
""
Remarks
The planned time and date of the next version of this CRL to be published.
This property is read-only.
crl_sig_algorithm Property
The public key algorithm that was used by the CA to sign this CRL.
Syntax
def get_crl_sig_algorithm() -> str: ...
crl_sig_algorithm = property(get_crl_sig_algorithm, None)
Default Value
"0"
Remarks
The public key algorithm that was used by the CA to sign this CRL.
This property is read-only.
crltbs Property
The to-be-signed part of the CRL (the CRL without the signature part).
Syntax
def get_crltbs() -> bytes: ...
crltbs = property(get_crltbs, None)
Remarks
The to-be-signed part of the CRL (the CRL without the signature part).
This property is read-only.
crl_this_update Property
The date and time at which this version of the CRL was published.
Syntax
def get_crl_this_update() -> str: ...
crl_this_update = property(get_crl_this_update, None)
Default Value
""
Remarks
The date and time at which this version of the CRL was published.
This property is read-only.
entry_count Property
The number of items in the CRL.
Syntax
def get_entry_count() -> int: ...
entry_count = property(get_entry_count, None)
Default Value
0
Remarks
Returns the number of certificate status entries in the CRL.
This property is read-only.
crl_entry_info_cert_status Property
Returns the status of the certificate.
Syntax
def get_crl_entry_info_cert_status() -> int: ...
crl_entry_info_cert_status = property(get_crl_entry_info_cert_status, None)
Default Value
0
Remarks
Returns the status of the certificate.
csUnknown | 0 |
csGood | 1 |
csRevoked | 2 |
This property is read-only.
crl_entry_info_handle Property
Allows to get or set a 'handle', a unique identifier of the underlying property object.
Syntax
def get_crl_entry_info_handle() -> int: ...
crl_entry_info_handle = property(get_crl_entry_info_handle, None)
Default Value
0
Remarks
Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.
When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object
after such operation.
pdfSigner.setSigningCertHandle(certMgr.getCertHandle());
This property is read-only.
crl_entry_info_revocation_date Property
The time and date when the certificate gets revoked or cancelled.
Syntax
def get_crl_entry_info_revocation_date() -> str: ...
crl_entry_info_revocation_date = property(get_crl_entry_info_revocation_date, None)
Default Value
""
Remarks
The time and date when the certificate gets revoked or cancelled.
This property is read-only.
crl_entry_info_revocation_reason Property
Specifies the reason for certificate revocation.
Syntax
def get_crl_entry_info_revocation_reason() -> int: ...
crl_entry_info_revocation_reason = property(get_crl_entry_info_revocation_reason, None)
Default Value
0
Remarks
Specifies the reason for certificate revocation.
rrUnknown | 0x0000 | |
rrUnspecified | 0x0001 | |
rrKeyCompromise | 0x0002 | |
rrCACompromise | 0x0004 | |
rrAffiliationChanged | 0x0008 | |
rrSuperseded | 0x0010 | |
rrCessationOfOperation | 0x0020 | |
rrCertificateHold | 0x0040 | |
rrRemoveFromCRL | 0x0080 | |
rrPrivilegeWithdrawn | 0x0100 | |
rrAACompromise | 0x0200 |
This property is read-only.
crl_entry_info_serial_number Property
The certificate serial number.
Syntax
def get_crl_entry_info_serial_number() -> bytes: ...
crl_entry_info_serial_number = property(get_crl_entry_info_serial_number, None)
Remarks
The certificate serial number.
This property is read-only.
external_crypto_async_document_id Property
Specifies an optional document ID for SignAsyncBegin() and SignAsyncEnd() calls.
Syntax
def get_external_crypto_async_document_id() -> str: ... def set_external_crypto_async_document_id(value: str) -> None: ...
external_crypto_async_document_id = property(get_external_crypto_async_document_id, set_external_crypto_async_document_id)
Default Value
""
Remarks
Specifies an optional document ID for SignAsyncBegin() and SignAsyncEnd() calls.
Use this property when working with multi-signature DCAuth requests and responses to uniquely identify documents signed within a larger batch. On the completion stage, this value helps the signing component identify the correct signature in the returned batch of responses.
If using batched requests, make sure to set this property to the same value on both the pre-signing (SignAsyncBegin) and completion (SignAsyncEnd) stages.
external_crypto_custom_params Property
Custom parameters to be passed to the signing service (uninterpreted).
Syntax
def get_external_crypto_custom_params() -> str: ... def set_external_crypto_custom_params(value: str) -> None: ...
external_crypto_custom_params = property(get_external_crypto_custom_params, set_external_crypto_custom_params)
Default Value
""
Remarks
Custom parameters to be passed to the signing service (uninterpreted).
external_crypto_data Property
Additional data to be included in the async state and mirrored back by the requestor.
Syntax
def get_external_crypto_data() -> str: ... def set_external_crypto_data(value: str) -> None: ...
external_crypto_data = property(get_external_crypto_data, set_external_crypto_data)
Default Value
""
Remarks
Additional data to be included in the async state and mirrored back by the requestor.
external_crypto_external_hash_calculation Property
Specifies whether the message hash is to be calculated at the external endpoint.
Syntax
def get_external_crypto_external_hash_calculation() -> bool: ... def set_external_crypto_external_hash_calculation(value: bool) -> None: ...
external_crypto_external_hash_calculation = property(get_external_crypto_external_hash_calculation, set_external_crypto_external_hash_calculation)
Default Value
FALSE
Remarks
Specifies whether the message hash is to be calculated at the external endpoint. Please note that this mode is not supported by the DCAuth class.
If set to true, the class will pass a few kilobytes of to-be-signed data from the document to the OnExternalSign event. This only applies when SignExternal() is called.
external_crypto_hash_algorithm Property
Specifies the request's signature hash algorithm.
Syntax
def get_external_crypto_hash_algorithm() -> str: ... def set_external_crypto_hash_algorithm(value: str) -> None: ...
external_crypto_hash_algorithm = property(get_external_crypto_hash_algorithm, set_external_crypto_hash_algorithm)
Default Value
"SHA256"
Remarks
Specifies the request's signature hash algorithm.
SB_HASH_ALGORITHM_SHA1 | SHA1 | |
SB_HASH_ALGORITHM_SHA224 | SHA224 | |
SB_HASH_ALGORITHM_SHA256 | SHA256 | |
SB_HASH_ALGORITHM_SHA384 | SHA384 | |
SB_HASH_ALGORITHM_SHA512 | SHA512 | |
SB_HASH_ALGORITHM_MD2 | MD2 | |
SB_HASH_ALGORITHM_MD4 | MD4 | |
SB_HASH_ALGORITHM_MD5 | MD5 | |
SB_HASH_ALGORITHM_RIPEMD160 | RIPEMD160 | |
SB_HASH_ALGORITHM_CRC32 | CRC32 | |
SB_HASH_ALGORITHM_SSL3 | SSL3 | |
SB_HASH_ALGORITHM_GOST_R3411_1994 | GOST1994 | |
SB_HASH_ALGORITHM_WHIRLPOOL | WHIRLPOOL | |
SB_HASH_ALGORITHM_POLY1305 | POLY1305 | |
SB_HASH_ALGORITHM_SHA3_224 | SHA3_224 | |
SB_HASH_ALGORITHM_SHA3_256 | SHA3_256 | |
SB_HASH_ALGORITHM_SHA3_384 | SHA3_384 | |
SB_HASH_ALGORITHM_SHA3_512 | SHA3_512 | |
SB_HASH_ALGORITHM_BLAKE2S_128 | BLAKE2S_128 | |
SB_HASH_ALGORITHM_BLAKE2S_160 | BLAKE2S_160 | |
SB_HASH_ALGORITHM_BLAKE2S_224 | BLAKE2S_224 | |
SB_HASH_ALGORITHM_BLAKE2S_256 | BLAKE2S_256 | |
SB_HASH_ALGORITHM_BLAKE2B_160 | BLAKE2B_160 | |
SB_HASH_ALGORITHM_BLAKE2B_256 | BLAKE2B_256 | |
SB_HASH_ALGORITHM_BLAKE2B_384 | BLAKE2B_384 | |
SB_HASH_ALGORITHM_BLAKE2B_512 | BLAKE2B_512 | |
SB_HASH_ALGORITHM_SHAKE_128 | SHAKE_128 | |
SB_HASH_ALGORITHM_SHAKE_256 | SHAKE_256 | |
SB_HASH_ALGORITHM_SHAKE_128_LEN | SHAKE_128_LEN | |
SB_HASH_ALGORITHM_SHAKE_256_LEN | SHAKE_256_LEN |
external_crypto_key_id Property
The ID of the pre-shared key used for DC request authentication.
Syntax
def get_external_crypto_key_id() -> str: ... def set_external_crypto_key_id(value: str) -> None: ...
external_crypto_key_id = property(get_external_crypto_key_id, set_external_crypto_key_id)
Default Value
""
Remarks
The ID of the pre-shared key used for DC request authentication.
Asynchronous DCAuth-driven communication requires that parties authenticate each other with a secret pre-shared cryptographic key. This provides an extra protection layer for the protocol and diminishes the risk of the private key becoming abused by foreign parties. Use this property to provide the pre-shared key identifier, and use external_crypto_key_secret to pass the key itself.
The same KeyID/KeySecret pair should be used on the DCAuth side for the signing requests to be accepted.
Note: The KeyID/KeySecret scheme is very similar to the AuthKey scheme used in various Cloud service providers to authenticate users.
Example:
signer.ExternalCrypto.KeyID = "MainSigningKey";
signer.ExternalCrypto.KeySecret = "abcdef0123456789";
external_crypto_key_secret Property
The pre-shared key used for DC request authentication.
Syntax
def get_external_crypto_key_secret() -> str: ... def set_external_crypto_key_secret(value: str) -> None: ...
external_crypto_key_secret = property(get_external_crypto_key_secret, set_external_crypto_key_secret)
Default Value
""
Remarks
The pre-shared key used for DC request authentication. This key must be set and match the key used by the DCAuth counterpart for the scheme to work.
Read more about configuring authentication in the external_crypto_key_id topic.
external_crypto_method Property
Specifies the asynchronous signing method.
Syntax
def get_external_crypto_method() -> int: ... def set_external_crypto_method(value: int) -> None: ...
external_crypto_method = property(get_external_crypto_method, set_external_crypto_method)
Default Value
0
Remarks
Specifies the asynchronous signing method. This is typically defined by the DC server capabilities and setup.
Available options:
asmdPKCS1 | 0 |
asmdPKCS7 | 1 |
external_crypto_mode Property
Specifies the external cryptography mode.
Syntax
def get_external_crypto_mode() -> int: ... def set_external_crypto_mode(value: int) -> None: ...
external_crypto_mode = property(get_external_crypto_mode, set_external_crypto_mode)
Default Value
0
Remarks
Specifies the external cryptography mode.
Available options:
ecmDefault | The default value (0) |
ecmDisabled | Do not use DC or external signing (1) |
ecmGeneric | Generic external signing with the OnExternalSign event (2) |
ecmDCAuth | DCAuth signing (3) |
ecmDCAuthJSON | DCAuth signing in JSON format (4) |
external_crypto_public_key_algorithm Property
Provide the public key algorithm here if the certificate is not available on the pre-signing stage.
Syntax
def get_external_crypto_public_key_algorithm() -> str: ... def set_external_crypto_public_key_algorithm(value: str) -> None: ...
external_crypto_public_key_algorithm = property(get_external_crypto_public_key_algorithm, set_external_crypto_public_key_algorithm)
Default Value
""
Remarks
Provide the public key algorithm here if the certificate is not available on the pre-signing stage.
SB_CERT_ALGORITHM_ID_RSA_ENCRYPTION | rsaEncryption | |
SB_CERT_ALGORITHM_MD2_RSA_ENCRYPTION | md2withRSAEncryption | |
SB_CERT_ALGORITHM_MD5_RSA_ENCRYPTION | md5withRSAEncryption | |
SB_CERT_ALGORITHM_SHA1_RSA_ENCRYPTION | sha1withRSAEncryption | |
SB_CERT_ALGORITHM_ID_DSA | id-dsa | |
SB_CERT_ALGORITHM_ID_DSA_SHA1 | id-dsa-with-sha1 | |
SB_CERT_ALGORITHM_DH_PUBLIC | dhpublicnumber | |
SB_CERT_ALGORITHM_SHA224_RSA_ENCRYPTION | sha224WithRSAEncryption | |
SB_CERT_ALGORITHM_SHA256_RSA_ENCRYPTION | sha256WithRSAEncryption | |
SB_CERT_ALGORITHM_SHA384_RSA_ENCRYPTION | sha384WithRSAEncryption | |
SB_CERT_ALGORITHM_SHA512_RSA_ENCRYPTION | sha512WithRSAEncryption | |
SB_CERT_ALGORITHM_ID_RSAPSS | id-RSASSA-PSS | |
SB_CERT_ALGORITHM_ID_RSAOAEP | id-RSAES-OAEP | |
SB_CERT_ALGORITHM_RSASIGNATURE_RIPEMD160 | ripemd160withRSA | |
SB_CERT_ALGORITHM_ID_ELGAMAL | elGamal | |
SB_CERT_ALGORITHM_SHA1_ECDSA | ecdsa-with-SHA1 | |
SB_CERT_ALGORITHM_RECOMMENDED_ECDSA | ecdsa-recommended | |
SB_CERT_ALGORITHM_SHA224_ECDSA | ecdsa-with-SHA224 | |
SB_CERT_ALGORITHM_SHA256_ECDSA | ecdsa-with-SHA256 | |
SB_CERT_ALGORITHM_SHA384_ECDSA | ecdsa-with-SHA384 | |
SB_CERT_ALGORITHM_SHA512_ECDSA | ecdsa-with-SHA512 | |
SB_CERT_ALGORITHM_EC | id-ecPublicKey | |
SB_CERT_ALGORITHM_SPECIFIED_ECDSA | ecdsa-specified | |
SB_CERT_ALGORITHM_GOST_R3410_1994 | id-GostR3410-94 | |
SB_CERT_ALGORITHM_GOST_R3410_2001 | id-GostR3410-2001 | |
SB_CERT_ALGORITHM_GOST_R3411_WITH_R3410_1994 | id-GostR3411-94-with-GostR3410-94 | |
SB_CERT_ALGORITHM_GOST_R3411_WITH_R3410_2001 | id-GostR3411-94-with-GostR3410-2001 | |
SB_CERT_ALGORITHM_SHA1_ECDSA_PLAIN | ecdsa-plain-SHA1 | |
SB_CERT_ALGORITHM_SHA224_ECDSA_PLAIN | ecdsa-plain-SHA224 | |
SB_CERT_ALGORITHM_SHA256_ECDSA_PLAIN | ecdsa-plain-SHA256 | |
SB_CERT_ALGORITHM_SHA384_ECDSA_PLAIN | ecdsa-plain-SHA384 | |
SB_CERT_ALGORITHM_SHA512_ECDSA_PLAIN | ecdsa-plain-SHA512 | |
SB_CERT_ALGORITHM_RIPEMD160_ECDSA_PLAIN | ecdsa-plain-RIPEMD160 | |
SB_CERT_ALGORITHM_WHIRLPOOL_RSA_ENCRYPTION | whirlpoolWithRSAEncryption | |
SB_CERT_ALGORITHM_ID_DSA_SHA224 | id-dsa-with-sha224 | |
SB_CERT_ALGORITHM_ID_DSA_SHA256 | id-dsa-with-sha256 | |
SB_CERT_ALGORITHM_SHA3_224_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-sha3-224 | |
SB_CERT_ALGORITHM_SHA3_256_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-sha3-256 | |
SB_CERT_ALGORITHM_SHA3_384_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-sha3-384 | |
SB_CERT_ALGORITHM_SHA3_512_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-sha3-512 | |
SB_CERT_ALGORITHM_SHA3_224_ECDSA | id-ecdsa-with-sha3-224 | |
SB_CERT_ALGORITHM_SHA3_256_ECDSA | id-ecdsa-with-sha3-256 | |
SB_CERT_ALGORITHM_SHA3_384_ECDSA | id-ecdsa-with-sha3-384 | |
SB_CERT_ALGORITHM_SHA3_512_ECDSA | id-ecdsa-with-sha3-512 | |
SB_CERT_ALGORITHM_SHA3_224_ECDSA_PLAIN | id-ecdsa-plain-with-sha3-224 | |
SB_CERT_ALGORITHM_SHA3_256_ECDSA_PLAIN | id-ecdsa-plain-with-sha3-256 | |
SB_CERT_ALGORITHM_SHA3_384_ECDSA_PLAIN | id-ecdsa-plain-with-sha3-384 | |
SB_CERT_ALGORITHM_SHA3_512_ECDSA_PLAIN | id-ecdsa-plain-with-sha3-512 | |
SB_CERT_ALGORITHM_ID_DSA_SHA3_224 | id-dsa-with-sha3-224 | |
SB_CERT_ALGORITHM_ID_DSA_SHA3_256 | id-dsa-with-sha3-256 | |
SB_CERT_ALGORITHM_BLAKE2S_128_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2s128 | |
SB_CERT_ALGORITHM_BLAKE2S_160_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2s160 | |
SB_CERT_ALGORITHM_BLAKE2S_224_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2s224 | |
SB_CERT_ALGORITHM_BLAKE2S_256_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2s256 | |
SB_CERT_ALGORITHM_BLAKE2B_160_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2b160 | |
SB_CERT_ALGORITHM_BLAKE2B_256_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2b256 | |
SB_CERT_ALGORITHM_BLAKE2B_384_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2b384 | |
SB_CERT_ALGORITHM_BLAKE2B_512_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2b512 | |
SB_CERT_ALGORITHM_BLAKE2S_128_ECDSA | id-ecdsa-with-blake2s128 | |
SB_CERT_ALGORITHM_BLAKE2S_160_ECDSA | id-ecdsa-with-blake2s160 | |
SB_CERT_ALGORITHM_BLAKE2S_224_ECDSA | id-ecdsa-with-blake2s224 | |
SB_CERT_ALGORITHM_BLAKE2S_256_ECDSA | id-ecdsa-with-blake2s256 | |
SB_CERT_ALGORITHM_BLAKE2B_160_ECDSA | id-ecdsa-with-blake2b160 | |
SB_CERT_ALGORITHM_BLAKE2B_256_ECDSA | id-ecdsa-with-blake2b256 | |
SB_CERT_ALGORITHM_BLAKE2B_384_ECDSA | id-ecdsa-with-blake2b384 | |
SB_CERT_ALGORITHM_BLAKE2B_512_ECDSA | id-ecdsa-with-blake2b512 | |
SB_CERT_ALGORITHM_BLAKE2S_128_ECDSA_PLAIN | id-ecdsa-plain-with-blake2s128 | |
SB_CERT_ALGORITHM_BLAKE2S_160_ECDSA_PLAIN | id-ecdsa-plain-with-blake2s160 | |
SB_CERT_ALGORITHM_BLAKE2S_224_ECDSA_PLAIN | id-ecdsa-plain-with-blake2s224 | |
SB_CERT_ALGORITHM_BLAKE2S_256_ECDSA_PLAIN | id-ecdsa-plain-with-blake2s256 | |
SB_CERT_ALGORITHM_BLAKE2B_160_ECDSA_PLAIN | id-ecdsa-plain-with-blake2b160 | |
SB_CERT_ALGORITHM_BLAKE2B_256_ECDSA_PLAIN | id-ecdsa-plain-with-blake2b256 | |
SB_CERT_ALGORITHM_BLAKE2B_384_ECDSA_PLAIN | id-ecdsa-plain-with-blake2b384 | |
SB_CERT_ALGORITHM_BLAKE2B_512_ECDSA_PLAIN | id-ecdsa-plain-with-blake2b512 | |
SB_CERT_ALGORITHM_ID_DSA_BLAKE2S_224 | id-dsa-with-blake2s224 | |
SB_CERT_ALGORITHM_ID_DSA_BLAKE2S_256 | id-dsa-with-blake2s256 | |
SB_CERT_ALGORITHM_EDDSA_ED25519 | id-Ed25519 | |
SB_CERT_ALGORITHM_EDDSA_ED448 | id-Ed448 | |
SB_CERT_ALGORITHM_EDDSA_ED25519_PH | id-Ed25519ph | |
SB_CERT_ALGORITHM_EDDSA_ED448_PH | id-Ed448ph | |
SB_CERT_ALGORITHM_EDDSA | id-EdDSA | |
SB_CERT_ALGORITHM_EDDSA_SIGNATURE | id-EdDSA-sig |
fips_mode Property
Reserved.
Syntax
def get_fips_mode() -> bool: ... def set_fips_mode(value: bool) -> None: ...
fips_mode = property(get_fips_mode, set_fips_mode)
Default Value
FALSE
Remarks
This property is reserved for future use.
add Method
Adds a new revoked certificate entry.
Syntax
def add(serial_number: bytes, revocation_date: str, revocation_reason: int) -> int: ...
Remarks
Use this method to add information about a revoked certificate to the CRL. SerialNumber identifies the certificate, while RevocationDate and RevocationReason set the termination date and the reason for revocation.
rrUnknown | 0x0000 | |
rrUnspecified | 0x0001 | |
rrKeyCompromise | 0x0002 | |
rrCACompromise | 0x0004 | |
rrAffiliationChanged | 0x0008 | |
rrSuperseded | 0x0010 | |
rrCessationOfOperation | 0x0020 | |
rrCertificateHold | 0x0040 | |
rrRemoveFromCRL | 0x0080 | |
rrPrivilegeWithdrawn | 0x0100 | |
rrAACompromise | 0x0200 |
Note that a single CRL may only contain certificates issued by a single CA, and this CRL must be signed by that CA.
clear Method
Empties the CRL.
Syntax
def clear() -> None: ...
Remarks
Use this method to remove all elements currently included in the CRL.
config Method
Sets or retrieves a configuration setting.
Syntax
def config(configuration_string: str) -> str: ...
Remarks
config is a generic method available in every class. It is used to set and retrieve configuration settings for the class.
These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the config method.
To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).
To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.
do_action Method
Performs an additional action.
Syntax
def do_action(action_id: str, action_params: str) -> str: ...
Remarks
do_action is a generic method available in every class. It is used to perform an additional action introduced after the product major release. The list of actions is not fixed, and may be flexibly extended over time.
The unique identifier (case insensitive) of the action is provided in the ActionID parameter.
ActionParams contains the value of a single parameter, or a list of multiple parameters for the action in the form of PARAM1=VALUE1;PARAM2=VALUE2;....
download Method
Downloads a CRL from the specified location.
Syntax
def download(url: str) -> None: ...
Remarks
Use this method to download a CRL from a remote location specified by URL. If the download succeeds, the crl property will be initialized with its details.
get_cert_entry_index Method
Returns the index of the CRL item by the certificate's serial number.
Syntax
def get_cert_entry_index(serial_number: bytes) -> int: ...
Remarks
Use this method to get the index of the CRL entry that corresponds to the certificate. The return value of -1 indicates that no entry for the given certificate was found in the CRL.
get_extension_data Method
Returns extension data.
Syntax
def get_extension_data(oid: str) -> bytes: ...
Remarks
Use this method to retrieve extension data in ASN.1 encoded format. Use get_extension_state to check the availability of the extension and establish its critical attribute.
get_extension_state Method
Returns certificate extension state.
Syntax
def get_extension_state(oid: str) -> int: ...
Remarks
Use this method to find out whether the extension is included in the certificate/CRL and check its critical attribute.
cesNotIncluded | 0 | The extension is not included in the certificate |
cesCritical | 1 | The extension is included and is marked critical |
cesNonCritical | 2 | The extension is included and is not marked critical |
list_extensions Method
List extensions currently available in the certificate or CRL.
Syntax
def list_extensions() -> str: ...
Remarks
Use this method to list the extensions included in the certificate or CRL. The method returns a list of OIDs separated by newline characters.
load Method
Loads a CRL from a byte array.
Syntax
def load(bytes: bytes) -> None: ...
Remarks
Use this method to load a CRL from a byte array. DER and PEM formats are supported.
load_from_file Method
Loads a CRL from a file.
Syntax
def load_from_file(path: str) -> None: ...
Remarks
Use this method to load a CRL from a file. DER and PEM formats are supported.
remove Method
Removes the specified entry from the CRL.
Syntax
def remove(index: int) -> None: ...
Remarks
Use this method to remove the entry from the CRL.
save Method
Saves the CRL to a byte array.
Syntax
def save() -> bytes: ...
Remarks
Use this method to save the CRL to a byte array.
save_to_file Method
Saves the CRL to a file.
Syntax
def save_to_file(path: str) -> None: ...
Remarks
Use this method to save the CRL to a file.
select_entry Method
Fetches revocation information about the selected certificate from the CRL.
Syntax
def select_entry(index: int) -> None: ...
Remarks
Upon calling this method the revocation information for the chosen certificate entry will be propagated in entry_info.
set_extension_data Method
Sets extension data.
Syntax
def set_extension_data(oid: str, value: bytes) -> None: ...
Remarks
Use this method to set extension data in encoded ASN.1 format. Use set_extension_state to enable the extension or change its critical attribute.
set_extension_state Method
Sets certificate extension state.
Syntax
def set_extension_state(oid: str, state: int) -> None: ...
Remarks
Use this method to enable or disable the extension and set its critical attribute.
cesNotIncluded | 0 | The extension is not included in the certificate |
cesCritical | 1 | The extension is included and is marked critical |
cesNonCritical | 2 | The extension is included and is not marked critical |
validate Method
Validates the CRL signature.
Syntax
def validate() -> int: ...
Remarks
Call this method to check the validity of this CRL's signature. The ca_certificate property needs to be set for this method to be capable of doing the check.
svtValid | 0 | The signature is valid |
svtUnknown | 1 | Signature validity is unknown |
svtCorrupted | 2 | The signature is corrupted |
svtSignerNotFound | 3 | Failed to acquire the signing certificate. The signature cannot be validated. |
svtFailure | 4 | General failure |
on_error Event
Information about errors during CRL management.
Syntax
class CRLManagerErrorEventParams(object): @property def error_code() -> int: ... @property def description() -> str: ... # In class CRLManager: @property def on_error() -> Callable[[CRLManagerErrorEventParams], None]: ... @on_error.setter def on_error(event_hook: Callable[[CRLManagerErrorEventParams], None]) -> None: ...
Remarks
The event is fired in case of exceptional conditions during CRL processing.
ErrorCode contains the error code and Description contains a textual description of the error. For the list of error codes please refer to CRL.
on_external_sign Event
Handles remote or external signing initiated by the SignExternal method or other source.
Syntax
class CRLManagerExternalSignEventParams(object): @property def operation_id() -> str: ... @property def hash_algorithm() -> str: ... @property def pars() -> str: ... @property def data() -> str: ... @property def signed_data() -> str: ... @signed_data.setter def signed_data(value) -> None: ... # In class CRLManager: @property def on_external_sign() -> Callable[[CRLManagerExternalSignEventParams], None]: ... @on_external_sign.setter def on_external_sign(event_hook: Callable[[CRLManagerExternalSignEventParams], None]) -> None: ...
Remarks
Assign a handler to this event if you need to delegate a low-level signing operation to an external, remote, or custom signing engine. Depending on the settings, the handler will receive a hashed or unhashed value to be signed.
The event handler must pass the value of Data to the signer, obtain the signature, and pass it back to the class via the SignedData parameter.
OperationId provides a comment about the operation and its origin. It depends on the exact class being used, and may be empty. HashAlgorithm specifies the hash algorithm being used for the operation, and Pars contains algorithm-dependent parameters.
The class uses base16 (hex) encoding for the Data, SignedData, and Pars parameters. If your signing engine uses a different input and output encoding, you may need to decode and/or encode the data before and/or after the signing.
A sample MD5 hash encoded in base16: a0dee2a0382afbb09120ffa7ccd8a152 - lower case base16 A0DEE2A0382AFBB09120FFA7CCD8A152 - upper case base16
A sample event handler that uses the .NET RSACryptoServiceProvider class may look like the following:
signer.OnExternalSign += (s, e) =>
{
var cert = new X509Certificate2("cert.pfx", "", X509KeyStorageFlags.Exportable);
var key = (RSACryptoServiceProvider)cert.PrivateKey;
var dataToSign = e.Data.FromBase16String();
var signedData = key.SignHash(dataToSign, "2.16.840.1.101.3.4.2.1");
e.SignedData = signedData.ToBase16String();
};
on_notification Event
This event notifies the application about an underlying control flow event.
Syntax
class CRLManagerNotificationEventParams(object): @property def event_id() -> str: ... @property def event_param() -> str: ... # In class CRLManager: @property def on_notification() -> Callable[[CRLManagerNotificationEventParams], None]: ... @on_notification.setter def on_notification(event_hook: Callable[[CRLManagerNotificationEventParams], None]) -> None: ...
Remarks
The class fires this event to let the application know about some event, occurrence, or milestone in the class. For example, it may fire to report completion of the document processing. The list of events being reported is not fixed, and may be flexibly extended over time.
The unique identifier of the event is provided in the EventID parameter. EventParam contains any parameters accompanying the occurrence. Depending on the type of the class, the exact action it is performing, or the document being processed, one or both may be omitted.
CRLManager Config Settings
The class accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the config method.Base Config Settings
You can switch this property off to improve performance if your project only uses known, good private keys.
Supported values are:
off | No caching (default) | |
local | Local caching | |
global | Global caching |
This setting only applies to sessions negotiated with TLS version 1.3.
Supported values are:
file | File | |
console | Console | |
systemlog | System Log (supported for Android only) | |
debugger | Debugger (supported for VCL for Windows and .Net) |
Supported values are:
time | Current time | |
level | Level | |
package | Package name | |
module | Module name | |
class | Class name | |
method | Method name | |
threadid | Thread Id | |
contenttype | Content type | |
content | Content | |
all | All details |
Supported filter names are:
exclude-package | Exclude a package specified in the value | |
exclude-module | Exclude a module specified in the value | |
exclude-class | Exclude a class specified in the value | |
exclude-method | Exclude a method specified in the value | |
include-package | Include a package specified in the value | |
include-module | Include a module specified in the value | |
include-class | Include a class specified in the value | |
include-method | Include a method specified in the value |
none | No flush (caching only) | |
immediate | Immediate flush (real-time logging) | |
maxcount | Flush cached entries upon reaching LogMaxEventCount entries in the cache. |
Supported values are:
none | None (by default) | |
fatal | Severe errors that cause premature termination. | |
error | Other runtime errors or unexpected conditions. | |
warning | Use of deprecated APIs, poor use of API, 'almost' errors, other runtime situations that are undesirable or unexpected, but not necessarily "wrong". | |
info | Interesting runtime events (startup/shutdown). | |
debug | Detailed information on flow of through the system. | |
trace | More detailed information. |
The default value of this setting is 100.
none | No rotation | |
deleteolder | Delete older entries from the cache upon reaching LogMaxEventCount | |
keepolder | Keep older entries in the cache upon reaching LogMaxEventCount (newer entries are discarded) |
Supported values are:
none | No static DNS rules (default) | |
local | Local static DNS rules | |
global | Global static DNS rules |
This setting only applies to certificates originating from a Windows system store.
CRLManager Errors
CRLManager Errors
1048577 Invalid parameter value (SB_ERROR_INVALID_PARAMETER) | |
1048578 Class is configured incorrectly (SB_ERROR_INVALID_SETUP) | |
1048579 Operation cannot be executed in the current state (SB_ERROR_INVALID_STATE) | |
1048580 Attempt to set an invalid value to a property (SB_ERROR_INVALID_VALUE) | |
1048581 Certificate does not have its private key loaded (SB_ERROR_NO_PRIVATE_KEY) | |
1048581 Cancelled by the user (SB_ERROR_CANCELLED_BY_USER) |