//I am working in VC 6. i have a certificate file "FileStore.p7b" and able to
find the
certificate in the file (CertFindCertificateInStore returns a context).

Unfortunately, my calls to AcquireCredentialsHandle always return
SEC_E_INTERNAL_ERROR. (I am using the UNISP_NAME package)

//to include private key info in my certificate context i used
CertSetCertificateContextProperty
//and set it CERT_PVK_FILE_PROP_ID ie., my private key is present in a
file("server.key").
//This function doesnot return any error.

//code
if(!( CertSetCertificateContextProperty(m_pCertContext,
CERT_PVK_FILE_PROP_ID,
NULL,
pvData)))

what i feel is that CertSetCertificateContextProperty only takes the file name where my private keys r stored.it doesnot check whether it is present onthe hard disk or not and whether the format of the file is correct.Still
I am not understanding where is the problem .

Thanx for any help