使用XHR发送客户端证书

编程入门 行业动态 更新时间:2024-10-26 10:35:25
本文介绍了使用XHR发送客户端证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图用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发送客户端证书

本文发布于:2023-11-12 19:08:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1582285.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:客户端   证书   XHR

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!