Extract private key from pfx file or certificate store WITHOUT using OpenSSL on Windows

I had the same problem and solved it with the help of PSPKI Powershell module from PS Gallery. While I understand that you look for a solution that preferably uses some built in functionality in Windows, installing a module from PS Gallery might be acceptable. At least it was in my case. First install the … Read more

Programmatically verify certificate chain using OpenSSL API

You can use the normal validation routines (see How do you verify a public key was issued by your private CA?), like the -verify function in OpenSSL does. You need to create a lookup method (X509_LOOKUP_METHOD) like X509_LOOKUP_file(), but which works with a character string instead of a filename. The code for X509_LOOKUP_buffer() is as … Read more

What is the rationale for all the different X509KeyStorageFlags?

Mainly, it has to be this complicated today because it was this complicated yesterday and no one has come up with anything simpler. I can’t come up with a linear narrative here, so please endure the weaving back and forth that’s required. What is a PFX/PKCS#12 file? While I can’t fully say what the origins … Read more

“Invalid provider type specified” CryptographicException when trying to load private key of certificate

I had the same problem on Windows 8 and Server 2012/2012 R2 with two new certificates I recently received. On Windows 10, the problem no longer occurs (but that does not help me, as the code manipulating the certificate is used on a server). While the solution of Joe Strommen in principle works, the different … Read more

How do I configure Git to trust certificates from the Windows Certificate Store?

Beginning with Git for Windows 2.14, you can now configure Git to use SChannel, the built-in Windows networking layer. This means that it will use the Windows certificate storage mechanism and you do not need to explicitly configure the curl CA storage mechanism. From the Git for Windows 2.14 release notes: It is now possible … Read more

What’s the difference between the Personal and Web Hosting certificate store?

from IIS.NET: The key difference between Web Hosting store and Personal store is that Web Hosting store is designed to scale to higher numbers of certificates. For lightweight scenarios (when you have less than 20-30 certificates) you can use any, Personal or WebHosting store. When you have 30+ different certificates, you should use Web Hosting … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)