<%@ CODEPAGE=65001 'UTF-8%> <%' certrqma.asp - (CERT)srv web - (R)e(Q)uest, (M)ore (A)dvanced ' Copyright (C) Microsoft Corporation, 1998 - 1999 %> <% On Error Resume Next ' Exporting keys to a pvk file is only used by old code signing tools. ' (This is different from exporting both cert and keys in a pfx file.) ' Set this flag to true if you really need this functionality bEnableExportKeyToFile = True Const CR_OUT_BASE64 =&H00000001 Const CR_PROP_CAEXCHGCERT=15 Const PROPTYPE_BINARY=3 ' get CA exchange cert and save into this page Dim bFailed, nError Set ICertRequest2=Server.CreateObject("CertificateAuthority.Request") bFailed=False If "IE"=sBrowser Then Public sCAExchangeCert Dim sCertificate sCertificate=ICertRequest2.GetCAProperty(sServerConfig, CR_PROP_CAEXCHGCERT, 0, PROPTYPE_BINARY, CR_OUT_BASE64) sCAExchangeCert=FormatBigString(sCertificate, " sCAExchange=sCAExchange & ") End If If Err.Number<>0 Then ' CA may be down. bFailed=True nError=Err.Number End If '----------------------------------------------------------------- ' Format the big string as a concatenated VB string, breaking at the embedded newlines Function FormatBigString(sSource, sLinePrefix) Dim sResult, bCharsLeft, nStartChar, nStopChar, chQuote sResult="" chQuote=chr(34) bCharsLeft=True nStopChar=1 While (bCharsLeft) nStartChar=nStopChar nStopChar=InStr(nStopChar, sSource, vbNewLine) If (nStopChar>0) Then sResult=sResult & sLinePrefix & chQuote & Mid(sSource, nStartChar, nStopChar-nStartChar) & chQuote & " & vbNewLine" If (nStopChar>=Len(sSource)-Len(vbNewLine)) Then bCharsLeft=False End If Else bCharsLeft=False End if sResult=sResult & vbNewLine nStopChar=nStopChar+Len(vbNewLine) Wend FormatBigString=sResult End Function %> Microsoft Certificate Services <%If True=bFailed Then %> <%Else%> <%End If%>
Microsoft Certificate Services  --  <%=sServerDisplayName%>   Home
<%If True=bFailed Then %>

Error

An unexpected error has occurred: <%If nError=&H800706BA Or nError=&H80070005 Then%> The Certification Authority Service has not been started. <%Else%> <%=ICertRequest.GetErrorMessageText(nError, CR_GEMT_HRESULT_STRING)%> <%End If%> <%Else 'True<>bFailed%>

Advanced Certificate Request
<%If "Enterprise"=sServerType Then%> <%End If '"Enterprise"=sServerType%> <%If "StandAlone"=sServerType Then%> <%End If%>
>

Certificate Template:
<%If "Enterprise"=sServerType Then%> <%End If '"Enterprise"=sServerType%>

Type of Certificate Needed:

Key Options:
   
CSP:
Key Usage:        
Key Size:
  Min:   (common key sizes: )
Max:
   
<%If bEnableExportKeyToFile Then%> <%End If%>

You must be an administrator to generate or use
a key in the local machine store.

Additional Options:
Request Format:    
Hash Algorithm:
Only used to sign request.
Attributes:
Friendly Name:

     

<%bIncludeXEnroll=True%> <%bIncludeGetCspList=True%> <%bIncludeTemplateCode=True%> <%bIncludeCheckClientCode=True%>
<%End If 'bFailed%>