Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Security.​Cryptography.​X509Certificates.​CertificateRequest

Assembly: System.Security.Cryptography

Inheritance: object → CertificateRequest

Represents an abstraction over the PKCS#10 CertificationRequestInfo and the X.509 TbsCertificate.

Properties

CertificateExtensions
Gets the X.509 Certificate Extensions collection, which is a mutable collection, to include in the certificate or certificate request.
HashAlgorithm
Gets the hash algorithm to use when signing the certificate or certificate request.
OtherRequestAttributes
Gets a collection representing attributes, other than the extension request attribute, to include in a certificate request.
public PublicKey
PublicKey
Gets a representation of the public key for the certificate or certificate request.
SubjectName
Gets the X.500 Distinguished Name to use as the Subject in a created certificate or certificate request.

Methods

Create​(X500DistinguishedName issuerName, X509SignatureGenerator generator, DateTimeOffset notBefore, DateTimeOffset notAfter, byte[] serialNumber)
issuerName The <see cref="T:System.Security.Cryptography.X509Certificates.X500DistinguishedName" /> for the issuer.
generator An <see cref="T:System.Security.Cryptography.X509Certificates.X509SignatureGenerator" /> object representing the issuing certificate authority.
notBefore The oldest date and time when this certificate is considered valid. Typically <see cref="P:System.DateTimeOffset.UtcNow" /> , plus or minus a few seconds.
notAfter The date and time when this certificate is no longer considered valid.
serialNumber The serial number to use for the new certificate. This value should be unique per issuer. The value is interpreted as an unsigned integer of arbitrary size in big-endian byte ordering. RFC 3280 recommends confining it to 20 bytes or less.
Returns An <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2" /> object with the specified values. The returned object won't assert <see cref="P:System.Security.Cryptography.X509Certificates.X509Certificate2.HasPrivateKey" /> .
Signs the current certificate request to create a chain-signed or self-signed certificate.
Create​(X500DistinguishedName issuerName, X509SignatureGenerator generator, DateTimeOffset notBefore, DateTimeOffset notAfter, ReadOnlySpan`1 serialNumber)
Create​(X509Certificate2 issuerCertificate, DateTimeOffset notBefore, DateTimeOffset notAfter, byte[] serialNumber)
issuerCertificate An <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2" /> instance representing the issuing Certificate Authority (CA).
notBefore The oldest date and time when this certificate is considered valid. Typically <see cref="P:System.DateTimeOffset.UtcNow" /> , plus or minus a few seconds.
notAfter The date and time when this certificate is no longer considered valid.
serialNumber The serial number to use for the new certificate. This value should be unique per issuer. The value is interpreted as an unsigned integer of arbitrary size in big-endian byte ordering. RFC 3280 recommends confining it to 20 bytes or less.
Returns An <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2" /> object with the specified values. The returned object won't assert <see cref="P:System.Security.Cryptography.X509Certificates.X509Certificate2.HasPrivateKey" /> .
Creates a certificate using the established subject, key, and optional extensions using the specified certificate as the issuer.
Create​(X509Certificate2 issuerCertificate, DateTimeOffset notBefore, DateTimeOffset notAfter, ReadOnlySpan`1 serialNumber)
CreateSelfSigned​(DateTimeOffset notBefore, DateTimeOffset notAfter)
notBefore The oldest date and time when this certificate is considered valid. Typically <see cref="P:System.DateTimeOffset.UtcNow" /> , plus or minus a few seconds.
notAfter The date and time when this certificate is no longer considered valid.
Returns An <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2" /> object with the specified values. The returned object will assert <see cref="P:System.Security.Cryptography.X509Certificates.X509Certificate2.HasPrivateKey" /> .
Creates a self-signed certificate using the established subject, key, and optional extensions.
public byte[]
CreateSigningRequest​()
Returns A DER-encoded certificate signing request.
Creates an ASN.1 DER-encoded PKCS#10 CertificationRequest value representing the state of the current object.
public byte[]
CreateSigningRequest​(X509SignatureGenerator signatureGenerator)
signatureGenerator The signature generator with which to sign the request.
Returns A DER-encoded certificate signing request.
Creates an ASN.1 DER-encoded PKCS#10 CertificationRequest representing the current state of the current object using the provided signature generator.
public string
CreateSigningRequestPem​()
Creates a PEM-encoded PKCS#10 CertificationRequest representing the current state of this object using the provided signature generator.
public string
CreateSigningRequestPem​(X509SignatureGenerator signatureGenerator)
signatureGenerator A <see cref="T:System.Security.Cryptography.X509Certificates.X509SignatureGenerator" /> with which to sign the request.
Creates a PEM-encoded PKCS#10 CertificationRequest representing the current state of this object using the provided signature generator.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object