我试图用java脚本打开ssl服务。 为了这样做,我需要发送我的证书与xmlhttp对象。 我可以用java脚本吗?
我的代码如下所示:
code> xmlhttp.open(post,https:// [some ip]:[some secured port],false); xmlhttp.send();但它不工作。另一方面,当使用:https:// [some ip]:[一些安全端口] - 直接从我的浏览器 - 这是告诉我选择一个证书,它的工作很好。 >
如何使它从java脚本直接工作? 我的情况应该是什么解决方案?
解决方案我不认为这是可能的。
除此之外,同源政策很可能会给你带来问题。
I'm trying to open an ssl service with java script. In order to do so, I need to send my certificate with xmlhttp object. Can I do it with java script? I could not find how to do it anywhere.
my code looks like this:
xmlhttp.open("post","[some ip]:[some secured port]",false); xmlhttp.send();However it's not working. On the other hand, when using: "[some ip]:[some secured port]" - directly from my browser - It is telling me to choose a certificate and it's working well.
How can I make it work straight from the java script? What should be the solution to my situation?
解决方案I don't think that's possible.
Besides that, the same origin policy would most likely cause problems for you.
更多推荐
使用XHR发送客户端证书
发布评论