語言

CertificateRevocationListBuilder.Build 方法

定義

建立憑證撤銷清單(CRL)。

多載

Build(X509Certificate2, BigInteger, DateTimeOffset, HashAlgorithmName, RSASignaturePadding, Nullable<DateTimeOffset>)

來源:
CertificateRevocationListBuilder.Build.cs
來源:
CertificateRevocationListBuilder.Build.cs
來源:
CertificateRevocationListBuilder.Build.cs
來源:
CertificateRevocationListBuilder.Build.cs
來源:
CertificateRevocationListBuilder.Build.cs

建立由指定憑證簽署的憑證撤銷清單(CRL)。

public byte[] Build(System.Security.Cryptography.X509Certificates.X509Certificate2 issuerCertificate, System.Numerics.BigInteger crlNumber, DateTimeOffset nextUpdate, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding? rsaSignaturePadding = default, DateTimeOffset? thisUpdate = default);
member this.Build : System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Numerics.BigInteger * DateTimeOffset * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding * Nullable<DateTimeOffset> -> byte[]
Public Function Build (issuerCertificate As X509Certificate2, crlNumber As BigInteger, nextUpdate As DateTimeOffset, hashAlgorithm As HashAlgorithmName, Optional rsaSignaturePadding As RSASignaturePadding = Nothing, Optional thisUpdate As Nullable(Of DateTimeOffset) = Nothing) As Byte()

參數

issuerCertificate
X509Certificate2

代表建立此憑證撤銷清單的憑證授權機構(CA)的憑證。

crlNumber
BigInteger

這是這個CRL的序號。 根據 IETF RFC 5280,對於特定 CA,此值必須從一個 CRL 持續增加到下一個。

nextUpdate
DateTimeOffset

在 CA 發布較新的 CRL 之前的最晚時間,通常視為該 CRL 的到期日。

hashAlgorithm
HashAlgorithmName

簽署 CRL 時使用的雜湊演算法。

rsaSignaturePadding
RSASignaturePadding

對於擁有 RSA 金鑰的憑證授權中心,此參數是必需的,並指定簽署 CRL 時應使用的 RSA 簽章填充模式。 對於其他所有演算法,這個參數都被忽略了。 預設值為 null。

thisUpdate
Nullable<DateTimeOffset>

一個可選的值,指定該 CRL 建立的時間,或 null 使用當前系統時間。 預設值為 null。

傳回

Byte[]

一個包含已簽署 CRL 位元組的陣列。

例外狀況

issuerCertificate 是 null。

-或-

hashAlgorithm 有 null 的值 Name。

issuerCertificate 沒有相關的私鑰。

-或-

issuerCertificate 使用一個未知或未被本實作支援的公鑰演算法。

-或-

issuerCertificate 沒有基本約束擴充。

-或-

issuerCertificate 有一個基本約束擴充,顯示它不是有效的憑證授權中心憑證。

-或-

issuerCertificate 有一個缺少使用量的 CrlSign Key Usage 擴充功能。

-或-

issuerCertificate擁有 RSA 私鑰,但rsaSignaturePaddingnull

-或-

issuerCertificate 擁有未知的金鑰演算法。

-或-

nextUpdate比 更早。thisUpdate

-或-

hashAlgorithm 空字串為 的 Name值。

-或-

rsaSignaturePadding 未被承認。

crlNumber 為負數。

簽署過程中發生錯誤。

適用於

Build(X500DistinguishedName, X509SignatureGenerator, BigInteger, DateTimeOffset, HashAlgorithmName, X509AuthorityKeyIdentifierExtension, Nullable<DateTimeOffset>)

來源:
CertificateRevocationListBuilder.Build.cs
來源:
CertificateRevocationListBuilder.Build.cs
來源:
CertificateRevocationListBuilder.Build.cs
來源:
CertificateRevocationListBuilder.Build.cs
來源:
CertificateRevocationListBuilder.Build.cs

建立憑證撤銷清單(CRL)。

public byte[] Build(System.Security.Cryptography.X509Certificates.X500DistinguishedName issuerName, System.Security.Cryptography.X509Certificates.X509SignatureGenerator generator, System.Numerics.BigInteger crlNumber, DateTimeOffset nextUpdate, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension authorityKeyIdentifier, DateTimeOffset? thisUpdate = default);
member this.Build : System.Security.Cryptography.X509Certificates.X500DistinguishedName * System.Security.Cryptography.X509Certificates.X509SignatureGenerator * System.Numerics.BigInteger * DateTimeOffset * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension * Nullable<DateTimeOffset> -> byte[]
Public Function Build (issuerName As X500DistinguishedName, generator As X509SignatureGenerator, crlNumber As BigInteger, nextUpdate As DateTimeOffset, hashAlgorithm As HashAlgorithmName, authorityKeyIdentifier As X509AuthorityKeyIdentifierExtension, Optional thisUpdate As Nullable(Of DateTimeOffset) = Nothing) As Byte()

參數

issuerName
X500DistinguishedName

該憑證的主體名稱,代表簽發此CRL的憑證授權機構(CA)。

generator
X509SignatureGenerator

一個簽章產生器,用來產生此 CRL 的 CA 簽章。

crlNumber
BigInteger

這是這個CRL的序號。 根據 IETF RFC 5280,對於特定 CA,此值必須從一個 CRL 持續增加到下一個。

nextUpdate
DateTimeOffset

在 CA 發布較新的 CRL 之前的最晚時間,通常視為該 CRL 的到期日。

hashAlgorithm
HashAlgorithmName

簽署 CRL 時使用的雜湊演算法。

authorityKeyIdentifier
X509AuthorityKeyIdentifierExtension

此 CRL 中使用的權威金鑰識別碼,用以識別 CA 憑證。

thisUpdate
Nullable<DateTimeOffset>

一個可選的值,指定該 CRL 建立的時間,或 null 使用當前系統時間。 預設值為 null。

傳回

Byte[]

一個包含已簽署 CRL 位元組的陣列。

例外狀況

issuerName, , generator或 authorityKeyIdentifier 是 null。

-或-

hashAlgorithm 有 null 的值 Name。

nextUpdate比 更早。thisUpdate

-或-

hashAlgorithm 空字串為 的 Name值。

crlNumber 為負數。

簽署過程中發生錯誤。

適用於