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)

Source:
X509CertificateLoader.cs
Source:
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)

Source:
X509CertificateLoader.cs
Source:
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 时出错。

适用于