1) During the default installation of Certificate Server, a shared folder is generated to store the root certificate file. The default location of this folder is C:\Certconfig. In this folder,you must locate the root certificate file. The default naming standard are given as follows:-
servername.domain.com_name_of_certificate_server.c rt
If you can't find the root certificate file, search your hard drives for all files that end in .crt. Double-click each .crt file that is returned in the search and view its details to confirm that its serial number is the same as the serial number of the root certificate that issued your Web server certificate.
To view the serial number of your Web site's root certificate, securely browse to your Website and double-click the padlock icon in the lower right corner of your browser. Click the Certification Path tab and double-click the top certificate. The serial number of this certificate should match the root certificate that your search returned.
2) Export the root certificate (.crt) file to a Base64 root certificate (.cer) file. To do this, follow these steps:
*In Windows Explorer, double-click the root certificate file.
*Click the Details tab and select Copy to file to start the Certificate Manager Export Wizard.
*On the second screen of the wizard select Base64, and on the third screen provide a path and file name for the certificate.NOTE: This is the file that you use in the sample ASP code that is provided in this article.
*Click Next and then click Finish.
3)Now modify line 11 of the following code to point to the Base64 root certificate file that you created in step 2.
< HTML >
< HEAD >
< TITLE >Installing A Root Certificate< /TITLE >
< BR >Root Certificate Authority Installation
< BR >
< BR >
<%@ LANGUAGE="VBScript"%>
<%
Set fs = CreateObject("Scripting.FileSystemObject")
Set MyFile = fs.OpenTextFile("c:\certificates\base64.cer", 1)
Output = ""
Do While MyFile.AtEndOfStream <> true
line = Chr(34) & MyFile.ReadLine & Chr(34)
If MyFile.AtEndOfStream <> true then
line = line & " & _" & Chr(10)
End If
Output = Output & line
Loop
MyFile.Close
Set MyFile = Nothing
Set fs = Nothing
%>
< SCRIPT language="VBSCRIPT" >
on error resume next
Dim Str, CEnroll
Set CEnroll = CreateObject("CEnroll.CEnroll.1")
Str = < % Response.Write Output % >
CEnroll.installPKCS7(Str)
Set CEnroll = Nothing
< /SCRIPT >
< /HEAD >
< /HTML >
4) Now save the modified code as Rootinstall.asp to your Website location. By default this is \Inetpub\Wwwroot.
5) Browse to the Rootinstall.asp file from a client browser. If your root certificate is not already in the store, you are prompted to install it.
6)Click OK. The certificate will automatically installed into the Trusted Root Store on the client browser.
|