简体   繁体   中英

Wininet - How to download and verify SSL certificate

I want to download and verify certificate just like Internet Explorer, i tried to monitor IE API calls to see how its doing it all. First of all i don't see which wininet function is downloading the SSL certificate and secondly there are many calls to crypt32.dll functions.

Someone can tell me which functions request the certificate or the certificate data needed to verify the certificate. I want to understand the methodology and to implement exactly the same behavior in my application.

Someone can tell me which functions request the certificate

Certificate is part of SSL handshake, it is not downloaded separately.

If you open an https connection with WinINet it will download and check the certificate for you. So it's not really clear what you're trying to do.

If you want to inspect the certificate downloaded by WinINet you can use INTERNET_OPTION_SERVER_CERT_CHAIN_CONTEXT in IE8 or later.

If you don't want to use WinINet you can use an existing implementation of TLS or you can implement it yourself, but the latter isn't a good idea.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM