IPWorks S/MIME 2020 iOS 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.

Syntax

IPWorksSMIMECertMgr
IPWorksSMIMECertMgrSwift

Remarks

The class methods, such as ListCertificateStores or ListStoreCertificates, are used to list certificate stores and certificates. The corresponding lists are returned via the StoreList and CertList 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 CertSubject, CertSerialNumber, and CertIssuer properties identify the certificate. The CertEffectiveDate and CertExpirationDate show the time boundaries of the certificate.

CertPublicKey, CertPublicKeyAlgorithm, CertPublicKeyLength, and CertVersion provide information about the certificate keys and the certificate format (version).

CertUsageFlags specifies the intended usage of the certificate. The CertUsage 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.

- certEffectiveDateThe date which this certificate becomes valid.
- certEncodedThe certificate (PEM/base64 encoded).
- certExpirationDateThe date the certificate expires.
- certExtendedKeyUsageA comma-delimited list of extended key usage identifiers.
- certFingerprintThe hex-encoded, 16-byte MD5 fingerprint of the certificate.
- certIssuerThe issuer of the certificate.
- certKeyPasswordThe password for the certificate's private key (if any).
- certPrivateKeyThe private key of the certificate (if available).
- certPrivateKeyAvailableShows whether a PrivateKey is available for the selected certificate.
- certPrivateKeyContainerThe name of the PrivateKey container for the certificate (if available).
- certPublicKeyThe public key of the certificate.
- certPublicKeyAlgorithmTextual description of the public key algorithm of the certificate.
- certPublicKeyLengthThe length of the certificate public key (in bits).
- certSerialNumberThe serial number of the certificate encoded as a string.
- certSignatureAlgorithmText description of the signature algorithm of the certificate.
- certSubjectThe subject of the certificate used for client authentication.
- certSubjectAltNamesA comma-separated lists of alternative subject names of the certificate.
- certThumbprintMD5MD5 hash of the certificate.
- certThumbprintSHA1SHA1 hash of the certificate.
- certThumbprintSHA256SHA256 hash of the certificate.
- certUsageText description of UsageFlags .
- certUsageFlagsFlags that show intended use for the certificate.
- certVersionThe certificate's version number.
- certExtensionCountThe number of records in the CertExtension arrays.
- certExtensionCritical:(int)certExtensionIndexWhether or not the extension is defined as critical.
- certExtensionOID:(int)certExtensionIndexThe ASN.
- certExtensionValue:(int)certExtensionIndexThe raw value of this certificate extension.
- certStoreThe certificate store to search for certificates.
- certStorePasswordThe password for the certificate store (if any).
- certStoreTypeThe type of certificate store for CertStore .
- exportedCertThe exported certificate string.
- exportFormatThe format to which the certficate is exported.
- exportPrivateKeyWhether 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.
- createCertificateCreates a new self-signed certificate in the current store.
- createKeyCreates a new keyset associated with the provided name.
- deleteCertificateDeletes the currently selected certificate from the store.
- deleteKeyDeletes the keyset associated with the provided name.
- exportCertificateExports the currently selected certificate.
- generateCSRGenerates a new CSR to be sent to a signing authority.
- importCertificateImports a certificate from a file into the current certificate store.
- importSignedCSRImports a signed CSR.
- issueCertificateCreates a new certificate in the current store, signed by the selected certificate.
- listCertificateStoresLists certificate stores.
- listKeysList keysets in a CSP.
- listMachineStoresList machine certificate stores.
- listStoreCertificatesList certificates in a store.
- readCertificateLoads a certificate from a file.
- readCSRReads a Certificate Signing Request (CSR).
- resetResets all certificate properties to their default values.
- saveCertificateThis method saves the currently selected public certificate to a file.
- showCertificateChainShow certificate chain.
- signCSRCreates 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.

- onCertChainShows the certificate chain for the certificate (see the ShowCertificateChain method).
- onCertListLists the certificates in a store (see the ListStoreCertificates method).
- onErrorInformation about errors during data delivery.
- onKeyListLists the keysets in a CSP (see the ListKeys method).
- onLogFires once for each log message.
- onStoreListLists 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 S/MIME 2020 iOS Edition - Version 20.0 [Build 8154]