I'm building a C# SSL software, and it worked just fine when I first generated certificate using openssl, and eveything was good, until I reebooted my PC and ran the program again. In the line:
clientSslStream.AuthenticateAsServer(serverCert,clientCertificateRequired: false, checkCertificateRevocation: false);
was the error System.ComponentModel.Win32Exception: 'The credentials supplied to the package were not recognize'
I tried to reinstall the SAME certificate again and restart the program and it worked just fine.
after rebooting again, the program threw this error again. How can I solve the error forever? I'm using default windows certificate importer, and allowing every program to read the private key. I've imported both *.p12 and *.crt files but it wasn't matter. How can I solve the problem?
Here are some screenshot from mmc, on for the certificate on local PC account and the other for User PC account. The screenshots are after reboot, when it doesn’t work:
The answer: In windows, after installing certificate you have to add valid user (e.g: Aviv, Admin..) to keep the certificate installed. Source: Answer in serverfault