Class BasePKCertificateGenerator
Inheritance
BasePKCertificateGenerator
Assembly: Lacuna.Pki.dll
Syntax
public abstract class BasePKCertificateGenerator
Constructors
BasePKCertificateGenerator()
Declaration
public BasePKCertificateGenerator()
Properties
CertificateLevel
Declaration
public CertificateChainLevels CertificateLevel { get; set; }
Property Value
Csr
Certificate Signing Request with PEM or Base64 over DER encoding
Declaration
public string Csr { get; set; }
Property Value
EndEntityBasicConstraintsCritical
Declaration
public bool EndEntityBasicConstraintsCritical { get; set; }
Property Value
ExtendedKeyUsage
Declaration
public ExtendedKeyUsage? ExtendedKeyUsage { get; set; }
Property Value
ExtendedKeyUsageCritical
Declaration
public bool ExtendedKeyUsageCritical { get; set; }
Property Value
IncludeAuthorityKeyId
Declaration
public bool IncludeAuthorityKeyId { get; set; }
Property Value
IncludeSubjectKeyId
Declaration
public bool IncludeSubjectKeyId { get; set; }
Property Value
IsFinalCA
Declaration
public bool IsFinalCA { get; set; }
Property Value
IsSelfSigned
Declaration
public bool IsSelfSigned { get; set; }
Property Value
KeyUsage
Declaration
public KeyUsage? KeyUsage { get; set; }
Property Value
QualifiedCertificateStatementsCritical
Declaration
public bool QualifiedCertificateStatementsCritical { get; set; }
Property Value
SanFields
Subject ALternative Names field encoding object
Declaration
public ISanEncoding SanFields { get; set; }
Property Value
SerialNumber
The Certificate serial number. If null, uses a random serial number
Declaration
public BigInteger? SerialNumber { get; set; }
Property Value
SignatureAlgorithm
Signature algorithm which will be used by the Issuer
Declaration
public SignatureAlgorithm SignatureAlgorithm { get; set; }
Property Value
SubjectName
The Certificate subject name. It is advised to use NameGenerator class for name object generation.
Declaration
public Name SubjectName { get; set; }
Property Value
ValidityEnd
Declaration
public DateTimeOffset? ValidityEnd { get; set; }
Property Value
ValidityStart
Declaration
public DateTimeOffset? ValidityStart { get; set; }
Property Value
Methods
AddCertificatePolicy(String)
Adds a Certificate Policy field
Declaration
public void AddCertificatePolicy(string policyOid)
Parameters
Type |
Name |
Description |
String |
policyOid |
The policy OID
|
AddCertificatePolicy(String, Uri)
Adds a Certificate Policy field
Declaration
public void AddCertificatePolicy(string policyOid, Uri cpsUri)
Parameters
Type |
Name |
Description |
String |
policyOid |
The policy OID
|
Uri |
cpsUri |
URI to reach the Certification Practice Statement document
|
AddCertificatePolicy(String, Uri, IEnumerable<String>)
Adds a Certificate Policy field
Declaration
public void AddCertificatePolicy(string policyOid, Uri cpsUri, IEnumerable<string> userNotices)
Parameters
Type |
Name |
Description |
String |
policyOid |
The policy OID
|
Uri |
cpsUri |
URI to reach the Certification Practice Statement document
|
IEnumerable<String> |
userNotices |
User Notices explicit text qualifier info
|
AddCrlDistributionPoint(Uri)
Adds an URI for the issuer CRL download
Declaration
public void AddCrlDistributionPoint(Uri uri)
Parameters
Type |
Name |
Description |
Uri |
uri |
The URI to reach the latest CRL
|
AddCustomExtension<T>(String, Boolean, T)
Adds a custom X509 Extension with a value to be encoded as DER and wrapped in the extension's OCTETSTRING
Declaration
public void AddCustomExtension<T>(string oid, bool isCritical, T value)
Parameters
Type |
Name |
Description |
String |
oid |
|
Boolean |
isCritical |
|
T |
value |
Value to be DER encoded and wrapped
|
Type Parameters
AddIssuerCertificateUri(Uri)
Adds an Authority Information Access URI, where the issuer(s) certificates(s) can be downloaded
Declaration
public void AddIssuerCertificateUri(Uri issuersUri)
Parameters
Type |
Name |
Description |
Uri |
issuersUri |
|
AddIssuerOcspUri(Uri)
Adds an URI which the issuer responds OCSP requests from
Declaration
public void AddIssuerOcspUri(Uri ocspUri)
Parameters
Type |
Name |
Description |
Uri |
ocspUri |
|
AddQualifiedCertificateStatement(QualifiedCertificateStatement)
Declaration
public void AddQualifiedCertificateStatement(QualifiedCertificateStatement statement)
Parameters
AddRawCustomExtension(String, Boolean, Byte[])
Adds a custom X509 Extension with a DER encoded value to be wrapped in the extension's OCTETSTRING
Declaration
public void AddRawCustomExtension(string oid, bool isCritical, byte[] encodedValue)
Parameters
Type |
Name |
Description |
String |
oid |
|
Boolean |
isCritical |
|
Byte[] |
encodedValue |
DER encoded value to be wrapped
|
SetStartAndEndValidityFromNow(TimeSpan)
Sets the the certificate validity start and end by the span value from now
Declaration
public void SetStartAndEndValidityFromNow(TimeSpan span)
Parameters
Type |
Name |
Description |
TimeSpan |
span |
Validity time from now
|