Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I wrote <a href="http://github.com/harbulot/keygenapp/blob/4112e3f6d9cf49fd5d48daa386162b4bc300f6f6/samplewebapp/src/main/webapp/crosskeygen.js" rel="nofollow noreferrer">this script</a> a while ago for a demo (in conjunction with <a href="http://github.com/harbulot/keygenapp/blob/4112e3f6d9cf49fd5d48daa386162b4bc300f6f6/samplewebapp/src/main/webapp/index.html" rel="nofollow noreferrer">this page</a>). It supports <code>&lt;keygen/&gt;</code> and replaces it with <em>XEnroll</em> or <em>CertEnroll</em> calls on Internet Explorer. The project has evolved a bit since, but I've just tested <a href="http://github.com/harbulot/keygenapp/tree/4112e3f6d9cf49fd5d48daa386162b4bc300f6f6" rel="nofollow noreferrer">this branch</a> with IE8 on Windows 7 and it worked. The CA certificate wasn't on the client machine at all. I had to lower the security settings to 'low' for it to run the ActiveX (otherwise, it wouldn't even submit the request, so even less install the certificate in the response).</p> <p>If that helps, I do this:</p> <pre><code>try { enrollObj.InstallResponse(4, xmlHttpRequest.responseText, 0, ""); window.alert("A certificate has been installed."); } catch (e1) { try { enrollObj.InstallResponse(0, xmlHttpRequest.responseText, 0, ""); window.alert("A certificate has been installed."); } catch (e2) { window .alert("You're probably using Vista without SP1 or above, in which case you need to add the certificate of this authority as a trusted root certificate."); } } </code></pre> <p>I must admit I didn't test which of these two cases was used (as it's the same alert message).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload