苏飞论坛

标题: 调用 USB 数字证书 2点 问题 [打印本页]

作者: wanliqiufeng    时间: 2014-9-18 15:50
标题: 调用 USB 数字证书 2点 问题
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")); 这句里面不是加了 证书的吗???

作者: wanliqiufeng    时间: 2014-9-18 15:54
弹出的密码框如下

作者: 站长苏飞    时间: 2014-9-18 16:59
wanliqiufeng 发表于 2014-9-18 15:54
弹出的密码框如下

这个其实是个bug,我会修复的。见谅。25号左右会和JS执行的方法一起更新。考虑不周请大家谅解
作者: wanliqiufeng    时间: 2014-9-18 20:46
如果 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.

这个又是什么原因呢???




欢迎光临 苏飞论坛 (http://www.sufeinet.com/) Powered by Discuz! X3.4