Newsgroups : Microsoft : microsoft.public.inetsdk.programming.wininet : 2006 May : How to get the certificate for an SSL server (HTTPS)???

www.cryer.info
Managed Newsgroup Archive

How to get the certificate for an SSL server (HTTPS)???

Subject:How to get the certificate for an SSL server (HTTPS)???
Posted by:"Emil" (em..@discussions.microsoft.com)
Date:Fri, 19 May 2006 01:18:02

Hi all,

I do not belive it!! I tried to obtain the certificate for an SSL server
(http connectio) but I cannot. I use "INTERNET_OPTION_SECURITY_CERTIFICATE"
or "INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT", calling with
InternetQueryOption (or CInternetSession::QueryOption). Dosen't matter what
option I have the function fails and the result is allways
ERROR_WINHTTP_INCORRECT_HANDLE_TYPE (The type of handle supplied is incorrect
for this operation.).
Knows anybody how can I do this? Knows someone a piece of code where
InternetQueryOption realy runs? Or is there another way to do this. I'm
desparate...
Thanks in advance.

Regards,
Emil

Replies:

www.cryer.info
Managed Newsgroup Archive