I need to sync with my server with the client certificate abc.pfx which is generated by the server using Ajax. How do I send my certificate with Ajax object. Can I do this certificate authentication with JavaScript?

  • 1
    Some clarification here would be helpful. Syncing vs. authentication - why is the cert needed, what are you trying to accomplish? Generally, when authentication is the goal, you also need a proof of private key, so just checking that the certificate is valid won't be sufficient. Commented May 15, 2013 at 14:37

1 Answer 1


There is no interface to SSL authentication (either server-client or client-server) from JavaScript. It is all dealt with by the browser UI.

On IE, you may be able to use the CertEnroll (previously XEnroll) ActiveX control as a way to get a newly-generated key into the user's keystore; otherwise you would just have to require them to install the certificate themselves.

Either way, when a request is made that requires the client cert - be it AJAX or normal web page access - the browser is repsonsible for using the cert (which may involve popping up a dialogue for the user to pick which cert they want).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .