Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

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
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. –  bethlakshmi May 15 '13 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).

share|improve this answer

Your Answer

 
discard

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.