将SSL证书提供给phantomjs的正确方法是什么 [英] what is the correct way to feed an ssl certificate into phantomjs
问题描述
我需要访问受客户端证书保护的内部站点.因此,要使用phantomjs,我导出了我在Firefox中使用的证书以访问该站点,并使用openssl命令行将其转换为私钥和证书.现在,我使用什么phantomjs在访问服务器上的页面时向ssl服务器提交该证书.我该怎么办?
I need to access an internal site protected via client side certificates. Therefore to use phantomjs I exported the certificate I use in Firefox to access the site and converted it into private key and certificate using openssl command line. I now what phantomjs to present that certificate to the ssl server when accessing a page on the server. How do I do it?
我已经尝试过了
phantomjs --ssl-certificates-path=/etc/pki --ignore-ssl-errors=yes --proxy=myproxy:myport test.js
/etc/pki是我放置证书和密钥的路径
with /etc/pki being the path I've put the certificate and key
test.js就是这样;-
test.js is just this;-
page = require('webpage').create()
page.open('https://myprotectedsite/', function(status) {
console.log(status);
phantom.exit();
})
但是它不起作用. console.log(status)始终为失败"
But it doesn't work. console.log(status) is always 'fail'
我需要做什么?
推荐答案
我也在寻找决定.它没有实现 https://github.com/ariya/phantomjs/issues/10524
I look for the decision too. it isn't implemented https://github.com/ariya/phantomjs/issues/10524
-ssl-certificates-path"-用于CA证书
"--ssl-certificates-path" - It is used for the CA certificate
这篇关于将SSL证书提供给phantomjs的正确方法是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!