Is there a Javascript equivalent of .NET HttpWebRequest.ClientCertificates?

Posted by Coder 42 on Stack Overflow See other posts from Stack Overflow or by Coder 42
Published on 2010-03-15T13:56:46Z Indexed on 2010/03/15 13:59 UTC
Read the original article Hit count: 245

Filed under:

I have this code working in C#:

var request = (HttpWebRequest)WebRequest.Create("https://x.com/service");
request.Method = "GET";

// Add X509 certificate 
var bytes = Convert.FromBase64String(certBase64);
var certificate = new X509Certificate2(bytes, password);
request.ClientCertificates.Add(certificate, "password"));

Is there any way to reproduce this request in Javascript? Third-party libraries would be fine for my purposes.

© Stack Overflow or respective owner

Related posts about JavaScript