f***@yahoo.com
2007-11-07 07:57:50 UTC
Hi,
I am having trouble with getting the server certificate
using WinHttp.
if (!WinHttpSendRequest(hReq, ...))
{
PCCERT_CONTEXT pCert;
DWORD size = sizeof(pCert);
WinHttpQueryOption(hReq, WINHTTP_OPTION_SERVER_CERT_CONTEXT,
(LPVOID)&pCert, &size);
}
WinHttpQueryOption() returns TRUE but pCert is 0.
And that seems to happen only if I configure my web server
to require client certificate (which means I have made a
WinHttpSetOption() to set the client cert before this).
Otherwise, it works ok.
This looks like a bug in WinHttp to me but I want to know
if anybody knows anything about this behavior?
Thanks
I am having trouble with getting the server certificate
using WinHttp.
if (!WinHttpSendRequest(hReq, ...))
{
PCCERT_CONTEXT pCert;
DWORD size = sizeof(pCert);
WinHttpQueryOption(hReq, WINHTTP_OPTION_SERVER_CERT_CONTEXT,
(LPVOID)&pCert, &size);
}
WinHttpQueryOption() returns TRUE but pCert is 0.
And that seems to happen only if I configure my web server
to require client certificate (which means I have made a
WinHttpSetOption() to set the client cert before this).
Otherwise, it works ok.
This looks like a bug in WinHttp to me but I want to know
if anybody knows anything about this behavior?
Thanks