ISAPI Certificate Extraction - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

ISAPI Certificate Extraction

I'm trying to figure out how to extract a certificate

with an ISAPI extension, but I'm having problems....

This is from a DLL generated by the wizard.


My code is as follows:


CERT_CONTEXT_EX ctxCert;

ctxCert.CertContext.pbCertEncoded = (BYTE*)malloc(CERT_SIZE * sizeof(BYTE));

ctxCert.CertContext.pCertInfo = (PCERT_INFO)malloc(sizeof(PCERT_INFO));memset(ctxCert.CertContext.pbCertEncoded, 0, CERT_SIZE);

DWORD dwSize = sizeof(ctxCert);

int i = pCtxt->ServerSupportFunction(HSE_REQ_GET_CERT_INFO_EX, &ctxCert, &dwSize, NULL);


i always returns 0 (success), but the certificate information is not populated. Has anyone else done this?


Thanks - Howard


Sign In or Register to comment.