Archived Forum Post

Index of archived forum posts


AddCertificate does not add private key to Windows store

Jul 06 '12 at 18:59

The AddCertificate command does not add the private key to the Windows Store. I use the LoadPfxFile command, with the correct password, and then the AddCertificate command. The certificate gets imported but without the private key. I want to import the private key also because i need SSL client authentication.


Correct. The Chilkat.CertStore.AddCertificate method only adds the certificate to the certificate store, but not the private key. Internally, it is calling the CryptoAPI function CertAddCertificateContextToStore (see )

The relatively undocumented Chilkat.Pfx class can be used to import a PFX (certs + private keys). See the reference documentation here: