CertificateRevocationListBuilder.AddEntry Method

Definition

Overloads

AddEntry(Byte[], Nullable<DateTimeOffset>, Nullable<X509RevocationReason>)

Adds the specified serial number to the revocation list with an optional revocation time and an optional revocation reason.

AddEntry(ReadOnlySpan<Byte>, Nullable<DateTimeOffset>, Nullable<X509RevocationReason>)

Adds the specified serial number to the revocation list with an optional revocation time and an optional revocation reason.

AddEntry(X509Certificate2, Nullable<DateTimeOffset>, Nullable<X509RevocationReason>)

Adds the specified certificate to the revocation list with an optional revocation time and an optional revocation reason.

AddEntry(Byte[], Nullable<DateTimeOffset>, Nullable<X509RevocationReason>)

Source:
CertificateRevocationListBuilder.cs
Source:
CertificateRevocationListBuilder.cs
Source:
CertificateRevocationListBuilder.cs

Adds the specified serial number to the revocation list with an optional revocation time and an optional revocation reason.

public void AddEntry (byte[] serialNumber, DateTimeOffset? revocationTime = default, System.Security.Cryptography.X509Certificates.X509RevocationReason? reason = default);
member this.AddEntry : byte[] * Nullable<DateTimeOffset> * Nullable<System.Security.Cryptography.X509Certificates.X509RevocationReason> -> unit
Public Sub AddEntry (serialNumber As Byte(), Optional revocationTime As Nullable(Of DateTimeOffset) = Nothing, Optional reason As Nullable(Of X509RevocationReason) = Nothing)

Parameters

serialNumber
Byte[]

The serial number of the certificate to revoke.

revocationTime
Nullable<DateTimeOffset>

The time the certificate was revoked, or null to use the current system time. The default is null.

reason
Nullable<X509RevocationReason>

The reason why the certificate was revoked, or null to not include a reason. The default is null.

Exceptions

serialNumber is null.

reason is not a supported revocation reason.

serialNumber is empty.

Applies to

AddEntry(ReadOnlySpan<Byte>, Nullable<DateTimeOffset>, Nullable<X509RevocationReason>)

Source:
CertificateRevocationListBuilder.cs
Source:
CertificateRevocationListBuilder.cs
Source:
CertificateRevocationListBuilder.cs

Adds the specified serial number to the revocation list with an optional revocation time and an optional revocation reason.

public void AddEntry (ReadOnlySpan<byte> serialNumber, DateTimeOffset? revocationTime = default, System.Security.Cryptography.X509Certificates.X509RevocationReason? reason = default);
member this.AddEntry : ReadOnlySpan<byte> * Nullable<DateTimeOffset> * Nullable<System.Security.Cryptography.X509Certificates.X509RevocationReason> -> unit
Public Sub AddEntry (serialNumber As ReadOnlySpan(Of Byte), Optional revocationTime As Nullable(Of DateTimeOffset) = Nothing, Optional reason As Nullable(Of X509RevocationReason) = Nothing)

Parameters

serialNumber
ReadOnlySpan<Byte>

The serial number of the certificate to revoke.

revocationTime
Nullable<DateTimeOffset>

The time the certificate was revoked, or null to use the current system time. The default is null.

reason
Nullable<X509RevocationReason>

The reason why the certificate was revoked, or null to not include a reason. The default is null.

Exceptions

reason is not a supported revocation reason.

serialNumber is empty.

Applies to

AddEntry(X509Certificate2, Nullable<DateTimeOffset>, Nullable<X509RevocationReason>)

Source:
CertificateRevocationListBuilder.cs
Source:
CertificateRevocationListBuilder.cs
Source:
CertificateRevocationListBuilder.cs

Adds the specified certificate to the revocation list with an optional revocation time and an optional revocation reason.

public void AddEntry (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, DateTimeOffset? revocationTime = default, System.Security.Cryptography.X509Certificates.X509RevocationReason? reason = default);
member this.AddEntry : System.Security.Cryptography.X509Certificates.X509Certificate2 * Nullable<DateTimeOffset> * Nullable<System.Security.Cryptography.X509Certificates.X509RevocationReason> -> unit
Public Sub AddEntry (certificate As X509Certificate2, Optional revocationTime As Nullable(Of DateTimeOffset) = Nothing, Optional reason As Nullable(Of X509RevocationReason) = Nothing)

Parameters

certificate
X509Certificate2

The certificate to revoke.

revocationTime
Nullable<DateTimeOffset>

The time the certificate was revoked, or null to use the current system time. The default is null.

reason
Nullable<X509RevocationReason>

The reason why the certificate was revoked, or null to not include a reason. The default is null.

Exceptions

certificate is null.

reason is not a supported revocation reason.

Remarks

This method does not check that the certificate issuer is appropriate for the CRL that is being built, the certificate is just used for extracting the serial number.

Applies to