Private keys
-
I am programming a Socket enabled with SSL.while asking for credentials ie AcquireCredentialsHandle returns with SEC_E_INTERNAL_ERROR.I searching in the net i found that similar problem is faced by some people and they were suggested that their private key is not available at the time of getting credentials. I have created Certificate Request using openssl.i used a command to obtain private key and certificate request. openssl> req -newkey rsa:1024 -keyout server.key -nodes -days 365 -out server.csr server.key contains RSA private key server.csr contains the request for certificate. I clicked the Advance option in the Certificate service and pasted the contents in the block .i got the certificate named certnew.cer.i opened this file clicked an option "copy to a file"and marked the option pkcs#7(.P7B).i named the file "FileStore".the file generated is "FileStore.p7b" .Also i have not used installed certificate option since my certificate store provider is a file provider so i did this /*code for file store*/ #define ENCODING_TYPE (PKCS_7_ASN_ENCODING | X509_ASN_ENCODING) HCERTSTORE m_hMyCertStore;//handle to certificate store m_hMyCertStore = CertOpenStore(CERT_STORE_PROV_FILENAME_A, ENCODING_TYPE, NULL, NULL, _T("FileStore.p7b")); I want to know that with above procedure i followed whether my private keys are available when my CERT_CONTEXT gets created.and if any other problem please suggest me. Thansx in advance for any suggestion