http://www.sufeinet.com/plugin.php?id=keke_group

苏飞论坛

 找回密码
 马上注册

QQ登录

只需一步,快速开始

分布式系统框架(V2.0) 轻松承载百亿数据,千万流量!讨论专区 - 源码下载 - 官方教程

HttpHelper爬虫框架(V2.7-含.netcore) HttpHelper官方出品,爬虫框架讨论区 - 源码下载 - 在线测试和代码生成

HttpHelper爬虫类(V2.0) 开源的爬虫类,支持多种模式和属性 源码 - 代码生成器 - 讨论区 - 教程- 例子

查看: 4006|回复: 3

[求助] 调用 USB 数字证书 2点 问题

[复制链接]
发表于 2014-9-18 15:50:50 | 显示全部楼层 |阅读模式
1、   调用 数字证书 ,明明 带了 密码,为什么还会弹出密码框

            HttpHelper http = new HttpHelper();
            HttpItem item = new HttpItem()
            {
                URL = "https://192.168.2.54/pki.jsp      
                Method = "get",
                ContentType = "text/html",
                ProxyIp = "ieproxy",
                CerPath = "e:\\33.cer"
            };
            item.ClentCertificates = new X509CertificateCollection();
            item.ClentCertificates.Add(new X509Certificate("e:\\33.cer", "123456")); // 此处明明加了密码,为什么还会弹出密码框???


2、 如果 CerPath = "e:\\33.cer"  不使用,则会弹出 错误 信息
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
            HttpHelper http = new HttpHelper();
            HttpItem item = new HttpItem()
            {
                URL = "https://192.168.2.54/pki.jsp      
                Method = "get",
                ContentType = "text/html",
                ProxyIp = "ieproxy",
               //CerPath = "e:\\33.cer"
            };
            item.ClentCertificates = new X509CertificateCollection();
            item.ClentCertificates.Add(new X509Certificate("e:\\33.cer", "123456"));
为什么  不设置 //CerPath = "e:\\33.cer"   就会报错 呢,下面 item.ClentCertificates.Add(new X509Certificate("e:\\33.cer", "123456")); 这句里面不是加了 证书的吗???


1. 开通SVIP会员,免费下载本站所有源码,不限次数据,不限时间
2. 加官方QQ群,加官方微信群获取更多资源和帮助
3. 找站长苏飞做网站、商城、CRM、小程序、App、爬虫相关、项目外包等点这里
 楼主| 发表于 2014-9-18 15:54:10 | 显示全部楼层
弹出的密码框如下

弹出密码框

弹出密码框
发表于 2014-9-18 16:59:46 | 显示全部楼层

这个其实是个bug,我会修复的。见谅。25号左右会和JS执行的方法一起更新。考虑不周请大家谅解
 楼主| 发表于 2014-9-18 20:46:15 | 显示全部楼层
如果 CerPath = "e:\\33.cer"  不使用,
只 使用   
          item.ClentCertificates = new X509CertificateCollection();
            item.ClentCertificates.Add(new X509Certificate("e:\\33.cer", "123456"));

则会报  错误 信息,
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

这个又是什么原因呢???
您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

QQ|手机版|小黑屋|手机版|联系我们|关于我们|广告合作|苏飞论坛 ( 豫ICP备18043678号-2)

GMT+8, 2024-5-8 09:01

© 2014-2021

快速回复 返回顶部 返回列表