IPWorks Auth 2020 Python Edition

Questions / Feedback?

CertMgr Class

Properties   Methods   Events   Configuration Settings   Errors  

The CertMgr class is used to manage the digital certificates installed on a system.


class ipworksauth.CertMgr


The class methods, such as list_certificate_stores or list_store_certificates, are used to list certificate stores and certificates. The corresponding lists are returned via the on_store_list and on_cert_list events. Encoded certificates are provided through the events.

You can load a certificate by setting the cert property of the class, then you can get information about the certificate through the corresponding fields of the cert property (described below).

The cert_subject, cert_serial_number, and cert_issuer properties identify the certificate. The cert_effective_date and cert_expiration_date show the time boundaries of the certificate.

cert_public_key, cert_public_key_algorithm, cert_public_key_length, and cert_version provide information about the certificate keys and the certificate format (version).

cert_usage_flags specifies the intended usage of the certificate. The cert_usage property provides a text description of these flags.

Property List

The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

cert_effective_dateThe date which this certificate becomes valid.
cert_encodedThe certificate (PEM/base64 encoded).
cert_expiration_dateThe date the certificate expires.
cert_extended_key_usageA comma-delimited list of extended key usage identifiers.
cert_fingerprintThe hex-encoded, 16-byte MD5 fingerprint of the certificate.
cert_issuerThe issuer of the certificate.
cert_key_passwordThe password for the certificate's private key (if any).
cert_private_keyThe private key of the certificate (if available).
cert_private_key_availableShows whether a PrivateKey is available for the selected certificate.
cert_private_key_containerThe name of the PrivateKey container for the certificate (if available).
cert_public_keyThe public key of the certificate.
cert_public_key_algorithmTextual description of the public key algorithm of the certificate.
cert_public_key_lengthThe length of the certificate public key (in bits).
cert_serial_numberThe serial number of the certificate encoded as a string.
cert_signature_algorithmText description of the signature algorithm of the certificate.
cert_subjectThe subject of the certificate used for client authentication.
cert_subject_alt_namesA comma-separated lists of alternative subject names of the certificate.
cert_thumbprint_md5MD5 hash of the certificate.
cert_thumbprint_sha1SHA1 hash of the certificate.
cert_thumbprint_sha256SHA256 hash of the certificate.
cert_usageText description of UsageFlags .
cert_usage_flagsFlags that show intended use for the certificate.
cert_versionThe certificate's version number.
cert_extension_countThe number of records in the CertExtension arrays.
cert_extension_criticalWhether or not the extension is defined as critical.
cert_extension_oidThe ASN.
cert_extension_valueThe raw value of this certificate extension.
cert_storeThe certificate store to search for certificates.
cert_store_passwordThe password for the certificate store (if any).
cert_store_typeThe type of certificate store for CertStore .
exported_certThe exported certificate string.
export_formatThe format to which the certficate is exported.
export_private_keyWhether to export the private key.

Method List

The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

configSets or retrieves a configuration setting.
create_certificateCreates a new self-signed certificate in the current store.
create_keyCreates a new keyset associated with the provided name.
delete_certificateDeletes the currently selected certificate from the store.
delete_keyDeletes the keyset associated with the provided name.
export_certificateExports the currently selected certificate.
generate_csrGenerates a new CSR to be sent to a signing authority.
import_certificateImports a certificate from a file into the current certificate store.
import_signed_csrImports a signed CSR.
issue_certificateCreates a new certificate in the current store, signed by the selected certificate.
list_certificate_storesLists certificate stores.
list_keysList keysets in a CSP.
list_machine_storesList machine certificate stores.
list_store_certificatesList certificates in a store.
read_certificateLoads a certificate from a file.
read_csrReads a Certificate Signing Request (CSR).
resetResets all certificate properties to their default values.
save_certificateThis method saves the currently selected public certificate to a file.
show_certificate_chainShow certificate chain.
sign_csrCreates a signed certificate from a CSR.

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_cert_chainShows the certificate chain for the certificate (see the ShowCertificateChain method).
on_cert_listLists the certificates in a store (see the ListStoreCertificates method).
on_errorInformation about errors during data delivery.
on_key_listLists the keysets in a CSP (see the ListKeys method).
on_logFires once for each log message.
on_store_listLists the system certificate stores (see the ListCertificateStores and ListMachineStores methods).

Configuration Settings

The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

CertCommentA comment to include in a saved certificate.
CertCustomExtensionCountThe number of records in the CertCustomExtension arrays.
CertCustomExtensionCritical[i]Whether or not the extension is defined as critical.
CertCustomExtensionOID[i]The ASN of the extension at index 'i'.
CertCustomExtensionValue[i]The raw value of the extension at index 'i'.
CertExtendedKeyUsageThe extended key usage of the certificate.
CertKeyLengthThe public key length for created certificates and keys.
CertKeyTypeThe types of keys created for new certificates.
CertPublicKeyAlgorithmThe public key algorithm used when a certificate is created.
CertSignatureAlgorithmThe signature algorithm used when creating certificates.
CertSubjectAltNamesSubject Alternative Names for creating or issuing certificates.
CertUsageFlagsSets the flags indicating the usage of the created certificate.
CertValidityOffsetThe number of days until the certificate becomes valid.
CertValidityTimeThe validity period for the certificate.
CreatedKeyThe PKCS8 formatted private and public key pair created after calling CreateKey.
CSPThe Cryptographic Service Provider.
CSRIgnoredExtensionsExtensions to be ignorned when signing a CSR.
CSRKeyThe PKCS8 formatted private key to use when generating a CSR.
EncodeExportedCertWhether the certificate being exported to a string is encoded.
ImportCertActionSpecified the action to take if a matching certificate or a link to a matching certificate already exists.
ImportCertStoreTypeThe type of certificate store being specified for import.
JWKAlgorithmThe JWK algorithm.
JWKExportX5CWhether to export a certificate chain to the x5c parameter.
JWKKeyIdThe JWK key Id.
JWKKeyOpsThe JWK intended key operations list.
JWKUseThe JWK use parameter value.
KeyFormatHow the public and private key are formatted.
LogLevelThe level of detail that is logged.
ReplaceKeyWhether or not to replace an existing key when creating a new key.
RequestSubjectAltNamesSubject Alternative Names for a Certificate Signing Request.
X509AlgorithmPublic Key Algorithm OID.
X509SignatureAlgorithmSignature Algorithm OID.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
ProcessIdleEventsWhether the class uses its internal event loop to process events when the main thread is idle.
SelectWaitMillisThe length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Auth 2020 Python Edition - Version 20.0 [Build 8162]