X509CertificateLoader.LoadPkcs12Collection 方法

定義

多載

LoadPkcs12Collection(Byte[], String, X509KeyStorageFlags, Pkcs12LoaderLimits)

以 PKCS#12 PFX 的形式載入所提供的數據,並傳回該處所有憑證的集合。

LoadPkcs12Collection(ReadOnlySpan<Byte>, ReadOnlySpan<Char>, X509KeyStorageFlags, Pkcs12LoaderLimits)

以 PKCS#12 PFX 的形式載入所提供的數據,並傳回該處所有憑證的集合。

LoadPkcs12Collection(Byte[], String, X509KeyStorageFlags, Pkcs12LoaderLimits)

來源:
X509CertificateLoader.cs

以 PKCS#12 PFX 的形式載入所提供的數據,並傳回該處所有憑證的集合。

public static System.Security.Cryptography.X509Certificates.X509Certificate2Collection LoadPkcs12Collection (byte[] data, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet, System.Security.Cryptography.X509Certificates.Pkcs12LoaderLimits? loaderLimits = default);
static member LoadPkcs12Collection : byte[] * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags * System.Security.Cryptography.X509Certificates.Pkcs12LoaderLimits -> System.Security.Cryptography.X509Certificates.X509Certificate2Collection
Public Shared Function LoadPkcs12Collection (data As Byte(), password As String, Optional keyStorageFlags As X509KeyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet, Optional loaderLimits As Pkcs12LoaderLimits = Nothing) As X509Certificate2Collection

參數

data
Byte[]

要載入的數據。

password
String

解密 PFX 內容的密碼。

keyStorageFlags
X509KeyStorageFlags

列舉值的位元組合,控制與傳回憑證相關聯之私鑰的位置和方式。

loaderLimits
Pkcs12LoaderLimits

載入 PFX 時要套用的限制。 預設值 null 值相當於 Defaults

傳回

從輸入載入的憑證集合。

例外狀況

data null

keyStorageFlags 包含無效的值或值組合。

keyStorageFlags 包含對目前平臺無效的值。

PKCS#12/PFX 違反一或多個 loaderLimits條件約束。

載入 PKCS#12/PFX 時發生錯誤。

適用於

LoadPkcs12Collection(ReadOnlySpan<Byte>, ReadOnlySpan<Char>, X509KeyStorageFlags, Pkcs12LoaderLimits)

來源:
X509CertificateLoader.cs

以 PKCS#12 PFX 的形式載入所提供的數據,並傳回該處所有憑證的集合。

public static System.Security.Cryptography.X509Certificates.X509Certificate2Collection LoadPkcs12Collection (ReadOnlySpan<byte> data, ReadOnlySpan<char> password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet, System.Security.Cryptography.X509Certificates.Pkcs12LoaderLimits? loaderLimits = default);
static member LoadPkcs12Collection : ReadOnlySpan<byte> * ReadOnlySpan<char> * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags * System.Security.Cryptography.X509Certificates.Pkcs12LoaderLimits -> System.Security.Cryptography.X509Certificates.X509Certificate2Collection
Public Shared Function LoadPkcs12Collection (data As ReadOnlySpan(Of Byte), password As ReadOnlySpan(Of Char), Optional keyStorageFlags As X509KeyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet, Optional loaderLimits As Pkcs12LoaderLimits = Nothing) As X509Certificate2Collection

參數

data
ReadOnlySpan<Byte>

要載入的數據。

password
ReadOnlySpan<Char>

解密 PFX 內容的密碼。

keyStorageFlags
X509KeyStorageFlags

列舉值的位元組合,控制與傳回憑證相關聯之私鑰的位置和方式。

loaderLimits
Pkcs12LoaderLimits

載入 PFX 時要套用的限制。 預設值 null 值相當於 Defaults

傳回

從輸入載入的憑證集合。

例外狀況

data null

keyStorageFlags 包含無效的值或值組合。

keyStorageFlags 包含對目前平臺無效的值。

PKCS#12/PFX 違反一或多個 loaderLimits條件約束。

載入 PKCS#12/PFX 時發生錯誤。

適用於