Cryptography.X509Certificates.Extension 1.0.0

Extension to search for X509Certificate2 in certifcate store. Ideal to use when in production mode on servers.

Install-Package Cryptography.X509Certificates.Extension -Version 1.0.0
dotnet add package Cryptography.X509Certificates.Extension --version 1.0.0
<PackageReference Include="Cryptography.X509Certificates.Extension" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Cryptography.X509Certificates.Extension --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

To Use:

To only retriveve a valid matching certificate from the certificate store:
X509Certificate2 cert = new Cryptography.X509Certificates.Extension.X509Certificate2(
                "1E0001122AA33324CFE608FC2200000001122A",
                StoreName.My,
                StoreLocation.LocalMachine,
                X509FindType.FindBySerialNumber);
To only retriveve ANY (does not have to be valid one) matching certificate from the certificate store:
X509Certificate2 cert = new Cryptography.X509Certificates.Extension.X509Certificate2(
                "1E0001122AA33324CFE608FC2200000001122A",
                StoreName.My,
                StoreLocation.LocalMachine,
                X509FindType.FindBySerialNumber,
                false);

To Use:

To only retriveve a valid matching certificate from the certificate store:
X509Certificate2 cert = new Cryptography.X509Certificates.Extension.X509Certificate2(
                "1E0001122AA33324CFE608FC2200000001122A",
                StoreName.My,
                StoreLocation.LocalMachine,
                X509FindType.FindBySerialNumber);
To only retriveve ANY (does not have to be valid one) matching certificate from the certificate store:
X509Certificate2 cert = new Cryptography.X509Certificates.Extension.X509Certificate2(
                "1E0001122AA33324CFE608FC2200000001122A",
                StoreName.My,
                StoreLocation.LocalMachine,
                X509FindType.FindBySerialNumber,
                false);

Release Notes

Initial

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 283 6/6/2019