Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
x509Certificate2 is a subclass of x509Certificate:
https://github.com/dotnet/corefx/blob/b384b309061c050a31dcf2b8f377f5da244fcf7b/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs#L15
x509Certificate2 Filename Constructor:
https://github.com/dotnet/corefx/blob/b384b309061c050a31dcf2b8f377f5da244fcf7b/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs#L82
x509Certificate2 loads file with null password and default key storage:
https://github.com/dotnet/corefx/blob/b384b309061c050a31dcf2b8f377f5da244fcf7b/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate.cs#L111
Default Key Storage Flags:
https://github.com/dotnet/corefx/blob/b384b309061c050a31dcf2b8f377f5da244fcf7b/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509KeyStorageFlags.cs#L12
Uses something called CertificatePal
https://github.com/dotnet/corefx/blob/b384b309061c050a31dcf2b8f377f5da244fcf7b/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate.cs#L135
CertificatePal FromFile:
https://github.com/dotnet/corefx/blob/3117285369d4f4ed924751950e491bfdc47374cb/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Windows/CertificatePal.Import.cs#L24
CertificatePal FromBlobOrFile:
https://github.com/dotnet/corefx/blob/3117285369d4f4ed924751950e491bfdc47374cb/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Windows/CertificatePal.Import.cs#L29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment