Discussion:
Getting cert info
(too old to reply)
GaryK
2005-10-10 23:52:15 UTC
Permalink
After initiating an SSL connection is there any way to retrive specific
information about the SSL cert being used? On export I noticed
InternetGetCertByURL but this seems to be stubbed out?

Thanks.
Reymarx Gereda
2005-10-19 17:13:24 UTC
Permalink
Hi Gary

You could use InternetQueryOption passing the
INTERNET_OPTION_SECURITY_CERTIFICATE flag.

I hope this helps you
--
Reymarx [MSFT]
Windows- Networking
This posting is provided "AS IS" with no warranties, and confers no rights
Post by GaryK
After initiating an SSL connection is there any way to retrive specific
information about the SSL cert being used? On export I noticed
InternetGetCertByURL but this seems to be stubbed out?
Thanks.
Doug C
2005-11-15 17:59:02 UTC
Permalink
1) I use this to query our SSL certficate
ret=InternetQueryOption(hReq, INTERNET_OPTION_SECURITY_CERTIFICATE,
NULL, &len);

2) I get this information back properly filled-in
FILETIME ftExpiry;
FILETIME ftStart;
LPTSTR lpszSubjectInfo;
LPTSTR lpszIssuerInfo;
DWORD dwKeySize;

3) This information comes back as NULL
LPTSTR lpszProtocolName;
LPTSTR lpszSignatureAlgName;
LPTSTR lpszEncryptionAlgName;

Question 1) How do I get the information in item (3) above to be filled-in
properly?
Question 2) How do I get other information such as the public key?
Loading...