Microsoft.Bcl.Cryptography
Represents a set of constraints to apply when loading PKCS#12/PFX contents.
Gets a shared reference to the default loader limits.
The singleton instance returned from this property is equivalent to an
instance produced via the default constructor, except the properties
prohibit reassignment. As with the default constructor, the individual
property values may change over time.
A shared reference to the default loader limits.
Gets a shared reference to loader limits that indicate no
filtering or restrictions of the contents should be applied
before sending them to the underlying system loader.
A shared reference to loader limits that indicate no
filtering or restrictions of the contents should be applied
before sending them to the underlying system loader.
The system loader may have its own limits where only part
of the contents are respected, or where the load is rejected.
Using this set of limits only affects the .NET layer of filtering.
The class checks for reference
equality to this property to determine if filtering should be bypassed.
Making a new Pkcs12LoaderLimits value that has all of the same property
values may give different results for certain inputs.
Initializes a new instance of the class
with default values.
The default values for each property on a default instance of this class
are chosen as a compromise between maximizing compatibility and minimizing
"nuisance" work. The defaults for any given property may vary over time.
Initializes a new instance of the class
by copying the values from another instance.
The instance to copy the values from.
is .
Gets a value indicating whether the instance is read-only.
if the instance is read-only; otherwise, .
Makes the instance read-only.
Gets or sets the iteration limit for the MAC calculation.
The iteration limit for the MAC calculation, or for no limit.
Gets or sets the iteration limit for the individual Key Derivation Function (KDF) calculations.
The iteration limit for the individual Key Derivation Function (KDF) calculations,
or for no limit.
Gets or sets the total iteration limit for the Key Derivation Function (KDF) calculations.
The total iteration limit for the Key Derivation Function (KDF) calculations,
or for no limit.
Gets or sets the maximum number of keys permitted.
The maximum number of keys permitted, or for no maximum.
Gets or sets the maximum number of certificates permitted.
The maximum number of certificates permitted, or for no maximum.
Gets or sets a value indicating whether to preserve the storage provider.
to respect the storage provider identifier for a
private key; to ignore the storage provider
information and use the system defaults.
The default is .
Storage Provider values from the PFX are only processed on the
Microsoft Windows family of operating systems.
This property has no effect on non-Windows systems.
Gets or sets a value indicating whether to preserve the key name.
to respect the key name identifier for a
private key; to ignore the key name
information and use a randomly generated identifier.
The default is .
Key name identifier values from the PFX are only processed on the
Microsoft Windows family of operating systems.
This property has no effect on non-Windows systems.
Gets or sets a value indicating whether to preserve the certificate alias,
also known as the friendly name.
to respect the alias for a
certificate; to ignore the alias
information.
The default is .
Certificate alias values from the PFX are only processed on the
Microsoft Windows family of operating systems.
This property has no effect on non-Windows systems.
Gets or sets a value indicating whether to preserve unknown attributes.
to keep any attributes of a certificate or
private key that are not described by another property on this type intact
when invoking the system PKCS#12/PFX loader;
to remove the unknown attributes prior to invoking
the system loader.
The default is .
Gets or sets a value indicating whether to ignore private keys.
to skip loading private keys;
to load both certificates and private keys.
The default is .
Gets or sets a value indicating whether to ignore encrypted authentication safes.
to skip over encrypted PFX AuthSafe values;
to decrypt encrypted PFX AuthSafe values to process their
contents.
The default is .
Gets or sets a value indicating whether duplicate attributes are permitted.
to permit duplicate attributes;
to fail loading when duplicate attributes are found.
The default is .
The exception that is thrown when importing a PKCS#12/PFX has failed
due to violating a specified limit.
Initializes a new instance of the
class.
The name of the property representing the limit that was exceeded.
Loads a single X.509 certificate from , in either the PEM
or DER encoding.
The data to load.
The certificate loaded from .
The data did not load as a valid X.509 certificate.
This method only loads plain certificates, which are identified as
by
Loads a single X.509 certificate from , in either the PEM
or DER encoding.
The data to load.
The certificate loaded from .
is .
The data did not load as a valid X.509 certificate.
This method only loads plain certificates, which are identified as
by
Loads a single X.509 certificate (in either the PEM or DER encoding)
from the specified file.
The path of the file to open.
The loaded certificate.
is .
The data did not load as a valid X.509 certificate.
An error occurred while loading the specified file.
This method only loads plain certificates, which are identified as
by
Loads the provided data as a PKCS#12 PFX and extracts a certificate.
The data to load.
The password to decrypt the contents of the PFX.
A bitwise combination of the enumeration values that control where and how to
import the private key associated with the returned certificate.
Limits to apply when loading the PFX. A value, the default,
is equivalent to .
The loaded certificate.
is .
contains a value, or combination of values,
that is not valid.
contains a value that is not valid for the
current platform.
The PKCS#12/PFX violated one or more constraints of .
An error occurred while loading the PKCS#12/PFX.
A PKCS#12/PFX can contain multiple certificates.
Using the ordering that the certificates appear in the results of
,
this method returns the first
certificate where is
.
If no certificates have associated private keys, then the first
certificate is returned.
If the PKCS#12/PFX contains no certificates, a
is thrown.
Loads the provided data as a PKCS#12 PFX and extracts a certificate.
The data to load.
The password to decrypt the contents of the PFX.
A bitwise combination of the enumeration values that control where and how to
import the private key associated with the returned certificate.
Limits to apply when loading the PFX. A value, the default,
is equivalent to .
The loaded certificate.
is .
contains a value, or combination of values,
that is not valid.
contains a value that is not valid for the
current platform.
The PKCS#12/PFX violated one or more constraints of .
An error occurred while loading the PKCS#12/PFX.
A PKCS#12/PFX can contain multiple certificates.
Using the ordering that the certificates appear in the results of
,
this method returns the first
certificate where is
.
If no certificates have associated private keys, then the first
certificate is returned.
If the PKCS#12/PFX contains no certificates, a
is thrown.
Opens the specified file, reads the contents as a PKCS#12 PFX and extracts a certificate.
The path of the file to open.
The loaded certificate.
The password to decrypt the contents of the PFX.
A bitwise combination of the enumeration values that control where and how to
import the private key associated with the returned certificate.
Limits to apply when loading the PFX. A value, the default,
is equivalent to .
The loaded certificate.
is .
contains a value, or combination of values,
that is not valid.
contains a value that is not valid for the
current platform.
The PKCS#12/PFX violated one or more constraints of .
An error occurred while loading the PKCS#12/PFX.
An error occurred while loading the specified file.
A PKCS#12/PFX can contain multiple certificates.
Using the ordering that the certificates appear in the results of
,
this method returns the first
certificate where is
.
If no certificates have associated private keys, then the first
certificate is returned.
If the PKCS#12/PFX contains no certificates, a
is thrown.
Opens the specified file, reads the contents as a PKCS#12 PFX and extracts a certificate.
The path of the file to open.
The loaded certificate.
The password to decrypt the contents of the PFX.
A bitwise combination of the enumeration values that control where and how to
import the private key associated with the returned certificate.
Limits to apply when loading the PFX. A value, the default,
is equivalent to .
The loaded certificate.
is .
contains a value, or combination of values,
that is not valid.
contains a value that is not valid for the
current platform.
The PKCS#12/PFX violated one or more constraints of .
An error occurred while loading the PKCS#12/PFX.
An error occurred while loading the specified file.
A PKCS#12/PFX can contain multiple certificates.
Using the ordering that the certificates appear in the results of
,
this method returns the first
certificate where is
.
If no certificates have associated private keys, then the first
certificate is returned.
If the PKCS#12/PFX contains no certificates, a
is thrown.
Loads the provided data as a PKCS#12 PFX and returns a collection of
all of the certificates therein.
The data to load.
The password to decrypt the contents of the PFX.
A bitwise combination of the enumeration values that control where and how to
import the private key associated with the returned certificate.
Limits to apply when loading the PFX. A value, the default,
is equivalent to .
A collection of the certificates loaded from the input.
is .
contains a value, or combination of values,
that is not valid.
contains a value that is not valid for the
current platform.
The PKCS#12/PFX violated one or more constraints of .
An error occurred while loading the PKCS#12/PFX.
Loads the provided data as a PKCS#12 PFX and returns a collection of
all of the certificates therein.
The data to load.
The password to decrypt the contents of the PFX.
A bitwise combination of the enumeration values that control where and how to
import the private key associated with the returned certificate.
Limits to apply when loading the PFX. A value, the default,
is equivalent to .
A collection of the certificates loaded from the input.
is .
contains a value, or combination of values,
that is not valid.
contains a value that is not valid for the
current platform.
The PKCS#12/PFX violated one or more constraints of .
An error occurred while loading the PKCS#12/PFX.
Opens the specified file, reads the contents as a PKCS#12 PFX and extracts a certificate.
Loads the provided data as a PKCS#12 PFX and returns a collection of
all of the certificates therein.
The path of the file to open.
The loaded certificate.
The password to decrypt the contents of the PFX.
A bitwise combination of the enumeration values that control where and how to
import the private key associated with the returned certificate.
Limits to apply when loading the PFX. A value, the default,
is equivalent to .
The loaded certificate.
is .
contains a value, or combination of values,
that is not valid.
contains a value that is not valid for the
current platform.
The PKCS#12/PFX violated one or more constraints of .
An error occurred while loading the PKCS#12/PFX.
An error occurred while loading the specified file.
Opens the specified file, reads the contents as a PKCS#12 PFX and extracts a certificate.
Loads the provided data as a PKCS#12 PFX and returns a collection of
all of the certificates therein.
The path of the file to open.
The loaded certificate.
The password to decrypt the contents of the PFX.
A bitwise combination of the enumeration values that control where and how to
import the private key associated with the returned certificate.
Limits to apply when loading the PFX. A value, the default,
is equivalent to .
The loaded certificate.
is .
contains a value, or combination of values,
that is not valid.
contains a value that is not valid for the
current platform.
The PKCS#12/PFX violated one or more constraints of .
An error occurred while loading the PKCS#12/PFX.
An error occurred while loading the specified file.
Error occurred during a cryptographic operation.
Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
Value was invalid.
{0} ('{1}') must be a non-negative and non-zero value.
Non-negative number required.
The number of bytes requested is too large. The number of bytes produced by SP800108HmacCounterKdf cannot exceed 536,870,911 bytes.
The value cannot be an empty string.
The KDF for algorithm '{0}' requires a char-based password input.
Algorithm '{0}' is not supported on this platform.
ASN1 corrupted data.
The hash algorithm name cannot be null or empty.
Key is not a valid public or private key.
The certificate data cannot be read with the provided password, the password may be incorrect.
The provided PFX data contains no certificates.
The EncryptedPrivateKeyInfo structure was decoded but was not successfully interpreted, the password may be incorrect.
The algorithm identified by '{0}' is unknown, not valid for the requested usage, or was not handled.
'{0}' is not a known hash algorithm.
The PKCS#12/PFX violated the '{0}' limit.
This Pkcs12LoaderLimits object has been made read-only and can no longer be modified.