简体   繁体   English

使用Webbrowser控件在vb6中接受SSL证书

[英]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. 问题:我正在创建一个vb6应用程序,该应用程序将连接到位于HTTPS站点上的特定Web服务。 The problem is, the HTTPS site I'm accessing requires all request to accept it's certificate policy. 问题是,我正在访问的HTTPS站点要求所有请求都接受它的证书策略。 (as its a self-signed ssl certificate) (作为其自签名的ssl证书)

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 http://oit.nd.edu/network/nomad/images/ie_certs.gif

Look for a property named Silent . 寻找一个名为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?). 虽然,我不确定行为是什么,但是如果将Silent设置为true (即是否假定它为Yes或其他方式)?

Most of HTTPS sites I know use self-signed certificates. 我知道,大多数HTTPS站点都使用自签名证书。

I don't know VB6 APIs for HTTPS, but for example in Java you should provide it a copy of the site certificate beforehand. 我不知道用于HTTPS的VB6 API,但是例如在Java中,您应该事先为其提供站点证书的副本。 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; 导出证书的副本,例如从浏览器证书库中导出(在Firefox中: Tools->Options->Advanced->Encryption->View Certificates等)-假设您已经使用浏览器访问了该站点;
  • detect which certificate repository your HTTPS API points to (there certainly is one) 检测您的HTTPS API指向哪个证书存储库(肯定有一个)
  • import certificate into that repository 将证书导入该存储库
  • execute your program 执行你的程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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