5

HTML5 has the element that sends an SPKAC to the server (as I understand it).

But how do you do it in IE?

One CA's websites gives me the following prompt:

This Web site is attempting to perform a digital certificate operation on your behalf:

https://www.startssl.com/

You should only allow known Web sites to perform digital certificate operations on your behalf.
Do you want to allow this operation?

That's cool and all but how do they do it and how do I make it so a website of mine can generate private keys for people? IE doesn't support the keygen element.

Thomas Pornin
  • 320,799
  • 57
  • 780
  • 949
neubert
  • 1,605
  • 3
  • 18
  • 36

2 Answers2

7

With Internet Explorer, for this kind of job, you are supposed to use the CertEnroll API (in pre-Vista Windows, this was called XEnroll); it can be used from Javascript. This implies Javascript to detect the type of browser.

Microsoft says that lack of support for <keygen> is "by design".

Glorfindel
  • 2,235
  • 6
  • 18
  • 30
Thomas Pornin
  • 320,799
  • 57
  • 780
  • 949
0

When this question was asked in 2013, we did not have the Web Crypto API, but now we do. The SubtleCrypto.generateKey() function can be used to generate RSA key pairs on the client side, in javascript. See https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/generateKey for more info.

mti2935
  • 19,868
  • 2
  • 45
  • 64