简体   繁体   中英

Accept SSL Certificate in vb6 using the Webbrowser control

The Problem: I am creating a vb6 application that will connect to a particular web service located on aa HTTPS site. The problem is, the HTTPS site I'm accessing requires all request to accept it's certificate policy. (as its a self-signed ssl certificate)

Basically I need the application to accept security certificate dialog boxes automatically. A sample security dialog is shown below:

Cheers in advance.

@EDIT:

I Cant' post an image yet as i am a new user... Please see the url below for a sample image:

http://oit.nd.edu/network/nomad/images/ie_certs.gif

Look for a property named Silent .

You will have to catch some other event, to reply to that dialog box. Although, I am not sure what is the behavior, if you set the Silent to true (ie does it assume it to be Yes or otherwise?).

Most of HTTPS sites I know use self-signed certificates.

I don't know VB6 APIs for HTTPS, but for example in Java you should provide it a copy of the site certificate beforehand. That is:

  • export a copy of the certificate, for example from your browser certificate repository (in Firefox: Tools->Options->Advanced->Encryption->View Certificates etc.) - supposing you have have already visited the site with your browser;
  • detect which certificate repository your HTTPS API points to (there certainly is one)
  • import certificate into that repository
  • execute your program

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