X509CertificateBuilder Class

Represents a version 3 X.509 certificate generator class. This class is intended to generate in-memory certificates without having to install them in certificate store.

Definition

Namespace: SysadminsLV.PKI.Cryptography.X509Certificates
Assembly: SysadminsLV.PKI.Win (in SysadminsLV.PKI.Win.dll) Version: 4.0.1.0 (4.0.1.0)
C#
public class X509CertificateBuilder
Inheritance
Object    X509CertificateBuilder

Remarks

Although, the certificate is created in-memory, private key material still persists in CSP/KSP. When the certificate is no longer necessary, call X509Certificate2.DeletePrivateKey extension method.

Constructors

X509CertificateBuilderInitializes a new instance of the X509CertificateBuilder class

Properties

AlternateSignatureFormat Gets or sets a value that indicates whether PKCS#1 v2.1 is used.
Extensions Gets a collection of user-supplied extensions to include in certificate.
FriendlyName Gets or sets a friend name for certificate.
HashingAlgorithm Gets or sets hashing algorithm used to sign the certificate. Default value is SHA256.
NotAfter Gets or sets the date in local time after which a certificate is no longer valid. This value cannot be earlier than NotBefore value. If external signer is used, this value cannot exceed NotAfter value of the signer certificate.
NotBefore Gets or sets the date in local time on which a certificate becomes valid. Default value is current date and time. If external signer is used, this value cannot be less than NotBefore value of the signer certificate.
PrivateKeyInfo Gets an asymmetric key pair generator. Use this property to configure asymmetric key generation options.
SerialNumber Gets or sets a serial number. Input string must consist of hex characters only.
SubjectName Gets or sets subject of the certificate. If this is self-signed certificate, subject will be copied to issuer field.
Version Gets the version of X.509 certificate. This class creates only version 3 certificates.

Methods

Build Creates, signs and encodes certificate object.
Equals
(Inherited from Object)
Finalize
(Inherited from Object)
GetHashCode
(Inherited from Object)
GetType
(Inherited from Object)
MemberwiseClone
(Inherited from Object)
ToString
(Inherited from Object)

See Also