Question

I have managed to open the certificate store by using CertOpenSystemStore and I can find my self signed certificate (created using OpenSSL) using CertFindCertificateInStore which I installed through the MMC console on Windows Vista Ultimate. However I am not sure what this error really means as I have been unable to spot the answer in the MSDN documentation. Is this a certificate problem? Or an OS problem, in the sense it should be a Windows Server OS for this to work?

I am using Win32 API in Delphi 2010, but C examples are fine.

Thanks, Bruce

Was it helpful?

Solution

The error description in MSDN is rather vague:

No credentials are available in the security package.

Afaik this error means that the SSPI SChannel package did not find the private key for the certificate or the certificate is not valid for SSL/TLS. Make sure the certificate/private key are loaded in the PROV_RSA_SCHANNEL Crypto provider (CSP), not in the Enhanced CSP.

You should enable SChannel logging for (much) more detailed error info, see How to enable Schannel event logging (KB is for IIS, but the method described enabled Schannel logging globally on the machine).

Been a while since I worked with SSL/TLS, but if I may give one advice: google for posts by "John Banes" and the error you have, you're likely going to find some clues.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top