Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

how import a root certificate to The trusted root certificate authority by javascript(Certificate Enrollment ,CertEnroll.dll)

$
0
0

how import a root certificate to The trusted root certificate authority by javascript

I want use CertEnroll.dll import a root certificate to The trusted root certificate authority,but the code import that  to  The middle certificate authority

How can  import the certificate to The trusted root certificate authority?

//js

document.write("<OBJECT ID=\"CertEnroll\" classid=\"clsid:884E2049-217D-11DA-B2A4-000E7BBB2B09\" codebase=\"CertEnroll.dll\"></OBJECT>");
  try{
   //安装根证书
   var certEnroll = document.getElementById("CertEnroll");
   alert(31);
   var objEnroll = certEnroll.CreateObject("X509Enrollment.CX509Enrollment")
   alert(32);
   objEnroll.Initialize(1); // ContextUser
   alert(33);
   objEnroll.InstallResponse(4, CA, 6, ""); // AllowUntrustedRoot = 4, XCN_CRYPT_STRING_BASE64_ANY = 6
   alert(34);
  }catch(e){
   alert(35);
   return false;
  }



Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>