I have installed Certificate Services on a Win2K machine. Its a
stand-alone CA. I need to renew a certificate in that CA. For that I
need to open the certificate store and find the specific certificate.
The name of my Certificate Service is "CertSvcCA". I am opening the
Certificate Store using the following code.
hCertStore = CertOpenStore( CERT_STORE_PROV_SYSTEM,
CERT_SYSTEM_STORE_SERVICES | CERT_STORE_OPEN_EXISTING_FLAG |
After that I try to search for any certificate in the store using
pEnrollmentCert = CertFindCertificateInStore( hCertStore,
X509_ASN_ENCODING | PKCS_7_ASN_ENCODING,
NULL, NULL );
But pEnrollmentCert is always returned as NULL.
If I open the Certificate Store (CertOpenStore) using any of the
Then pEnrollmentCert is NOT NULL and I can view the certificate.
How can I open the Store of the Certificate Services which I have
installed i.e. of "CertSvcCA"?
Thanks and Regards,