Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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. – bethlakshmi May 15 '13 at 14:37

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).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.