Accessing the SSL server certificate of a webpage: what about InternetGetSecurityInfoByURL?

65 views
Skip to first unread message

Sean Leonard

unread,
Mar 24, 2010, 4:36:19 PM3/24/10
to
Hi,

Periodically the question comes up regarding how to access the security
SSL/TLS server certificate of a webpage using Internet Explorer/WinInet.
E.g.:
"InternetGetCertByURL always returns FALSE"
<ut$2jL9YK...@TK2MSFTNGP05.phx.gbl>

"Certificate Informatin Dialog" (InternetShowSecurityInfoByURL)
<3FAAD2...@hotmail.com>

While trying to look at this problem, however, I found three additional
undocumented exports from wininet.dll 7.0.6000.21183:
InternetGetSecurityInfoByURL
InternetGetSecurityInfoByURLA
InternetGetSecurityInfoByURLW

Does anyone know what these might do, and what the function signatures
are? Could these be used to get the SSL server certificate PCERT_CONTEXT
items?

Thanks,

Sean

Sheng Jiang [MVP]

unread,
Apr 6, 2010, 4:18:16 PM4/6/10
to
You may be able to sniff the authentication headers by writing an
asynchronous pluggable protocol handler, see
http://www.codeproject.com/KB/atl/vbmhwb.aspx for an example

"Sean Leonard" <lists+...@seantek.com> wrote in message
news:ebJczG5y...@TK2MSFTNGP02.phx.gbl...

Reply all
Reply to author
Forward
0 new messages