Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send client certificate using XHR

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","https://[some ip]:[some secured port]",false);
xmlhttp.send();

However it's not working. On the other hand, when using: "https://[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?

like image 923
user967710 Avatar asked Oct 08 '22 10:10

user967710


1 Answers

I don't think that's possible.

Besides that, the same origin policy would most likely cause problems for you.

like image 124
ThiefMaster Avatar answered Oct 18 '22 14:10

ThiefMaster