Skip to content

Instantly share code, notes, and snippets.

@nelsonjchen
Created August 16, 2018 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nelsonjchen/87784f30c5f0a5295f40b6b0b37323bd to your computer and use it in GitHub Desktop.
Save nelsonjchen/87784f30c5f0a5295f40b6b0b37323bd to your computer and use it in GitHub Desktop.
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