Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

256 lines
10 KiB

  1. <%@ CODEPAGE=65001 'UTF-8%>
  2. <%' certrser.asp - (CERT)srv web - (R)e(S)ult: (ER)ror
  3. ' Copyright (C) Microsoft Corporation, 1998 - 1999 %>
  4. <!-- #include FILE=certsbrt.inc -->
  5. <!-- #include FILE=certdat.inc -->
  6. <% ' came from certfnsh.asp
  7. Dim ICertRequest, nDisposition, nResult, nLastStatus, sMode, sErrMsg
  8. On Error Resume Next
  9. Const CR_GEMT_HRESULT_STRING =&H00000001
  10. 'Disposition code ref: \nt\public\sdk\inc\certcli.h
  11. Const CR_DISP_INCOMPLETE =0
  12. Const CR_DISP_ERROR =1
  13. Const CR_DISP_DENIED =2
  14. Const CR_DISP_ISSUED =3
  15. Const CR_DISP_ISSUED_OUT_OF_BAND=4
  16. Const CR_DISP_UNDER_SUBMISSION =5
  17. Const CR_DISP_REVOKED =6
  18. Const no_disp=-1
  19. Set ICertRequest=Session("ICertRequest")
  20. nDisposition=Session("nDisposition")
  21. nResult=Session("nResult")
  22. sErrMsg=Session("sErrMsg")
  23. nLastStatus=no_disp
  24. nLastStatus=ICertRequest.GetLastStatus()
  25. sMode=Server.HTMLEncode(Request.Form("Mode"))
  26. %>
  27. <HTML>
  28. <Head>
  29. <Meta HTTP-Equiv="Content-Type" Content="text/html; charset=UTF-8">
  30. <Title>Microsoft Certificate Services</Title>
  31. </Head>
  32. <Body BgColor=#FFFFFF Link=#0000FF VLink=#0000FF ALink=#0000FF><Font ID=locPageFont Face="Arial">
  33. <Table Border=0 CellSpacing=0 CellPadding=4 Width=100% BgColor=#008080>
  34. <TR>
  35. <TD><Font Color=#FFFFFF><LocID ID=locMSCertSrv><Font Face="Arial" Size=-1><B><I>Microsoft</I></B> Certificate Services &nbsp;--&nbsp; <%=sServerDisplayName%> &nbsp;</Font></LocID></Font></TD>
  36. <TD ID=locHomeAlign Align=Right><A Href="/certsrv"><Font Color=#FFFFFF><LocID ID=locHomeLink><Font Face="Arial" Size=-1><B>Home</B></Font></LocID></Font></A></TD>
  37. </TR>
  38. </Table>
  39. <P ID=locPageTitle> <B> Error </B>
  40. <!-- Green HR --><Table Border=0 CellSpacing=0 CellPadding=0 Width=100%><TR><TD BgColor=#008080><Img Src="certspc.gif" Alt="" Height=2 Width=1></TD></TR></Table>
  41. <%If 0<>InStr(sMode,"newreq") Then%>
  42. <P ID=locReqFailed> Your request failed. An error occurred while the server was
  43. processing your request.
  44. </P>
  45. <%ElseIf "chkpnd"=sMode Then%>
  46. <P ID=locChkPndFailed> An error occurred while the server was checking on your
  47. pending certificate request.
  48. </P>
  49. <%ElseIf ""=Request.Form And ""=Request.QueryString Then%>
  50. <P ID=locNoFormData> You did not come to this page as a result of a form submission. <BR><B>You may not bookmark this page.</B>
  51. </P>
  52. <%End If%>
  53. <P ID=locContactAdmin>Contact your administrator for further assistance.
  54. </P>
  55. <%If "IE"=sBrowser Then%>
  56. <Span ID=spnBasic>
  57. <P>
  58. <Input ID=locBtnDetails Type=Button Value="Details &gt;&gt;"
  59. OnClick="blur();spnBasic.style.display='none';spnAdvanced.style.display='';">
  60. </P>
  61. </Span>
  62. <Span ID=spnAdvanced Style="display:none">
  63. <%End If%>
  64. <!-- Advanced info -->
  65. <DL><DD>
  66. <%If VarType(ICertRequest)=vbEmpty or VarType(ICertRequest)=vbNull Then%>
  67. <LocID ID=locCreateFailed><Font Size=-1><B>Failed to create 'CertificateAuthority.Request' object.</B></Font></LocID>
  68. <%Else%>
  69. <DL>
  70. <DT ID=locModeLabel><Font Size=-1><B>Request Mode:</B></Font></DT><DD>
  71. <%=sMode%> <LocID ID=locModeSpacer>-</LocID>
  72. <% if "newreq"=sMode Then%>
  73. <LocID ID=locModeNewReqIE>New Request</LocID>
  74. <%ElseIf "newreq NN"=sMode Then%>
  75. <LocID ID=locModeNewReqNN>New Request (keygen)</LocID>
  76. <%ElseIf "chkpnd"=sMode Then%>
  77. <LocID ID=locModeChkPnd>Check Pending</LocID>
  78. <%ElseIf ""=Request.Form And ""=Request.QueryString Then%>
  79. <LocID ID=locModeNoData>(no form data)</LocID>
  80. <%ElseIf ""<>Request.QueryString Then%>
  81. <LocID ID=locModeCertFetch>(certnew.cer/certnew.p7b/certcrl.crl certificate/crl fetch)</LocID>
  82. <%Else%>
  83. <LocID ID=locModeUnknown>(unknown)</LocID>
  84. <%End If%>
  85. </DD>
  86. <DT ID=locDispLabel><Font Size=-1><B>Disposition:</B></Font></DT><DD>
  87. <%If nDisposition=no_disp Then%>
  88. <LocID ID=locDispNeverSet>(never set)</LocID>
  89. <%Else%>
  90. <%=HEX(nDisposition)%> <LocID ID=locDispSpacer>-</LocID>
  91. <% if nDisposition=CR_DISP_INCOMPLETE Then%>
  92. <LocID ID=locDispIncomplete>Incomplete</LocID>
  93. <%ElseIf nDisposition=CR_DISP_ERROR Then%>
  94. <LocID ID=locDispError>Error</LocID>
  95. <%Else%>
  96. <LocID ID=locDispUnknown>(unknown)</LocID>
  97. <%End If%>
  98. <%End If%>
  99. </DD>
  100. <DT ID=locDispMsgLabel><Font Size=-1><B>Disposition message:</B></Font></DT><DD>
  101. <%If ""=ICertRequest.GetDispositionMessage() Then%>
  102. <LocID ID=locDispMsgNone>(none)</LocID>
  103. <%Else%>
  104. <%=ICertRequest.GetDispositionMessage()%>
  105. <%End If%>
  106. </DD>
  107. <DT ID=locResultLabel><Font Size=-1><B>Result:</B></Font></DT><DD>
  108. <%=ICertRequest.GetErrorMessageText(nResult, CR_GEMT_HRESULT_STRING)%>
  109. </DD>
  110. <DT ID=locComInfoLabel><Font Size=-1><B>COM Error Info:</B></Font></DT><DD>
  111. <%=sErrMsg%>
  112. </DD>
  113. <DT ID=locLastStatLabel><Font Size=-1><B>LastStatus:</B></Font></DT><DD>
  114. <%If nLastStatus=no_disp Then%>
  115. <LocID ID=locLastStatNeverSet>(never set)</LocID>
  116. <%Else%>
  117. <%=ICertRequest.GetErrorMessageText(nLastStatus, CR_GEMT_HRESULT_STRING)%>
  118. <%End If%>
  119. </DD>
  120. <DT ID=locSugCauseLabel><Font Size=-1><B>Suggested Cause:</B></Font></DT><DD>
  121. <% if nLastStatus=&H000006BA Then 'legacy entry - RPC_S_SERVER_UNAVAILABLE%>
  122. <LocID ID=locSugCauseNotStarted1>
  123. This error can occur if the Certification Authority Service
  124. has not been started.
  125. </LocID>
  126. <%ElseIf nLastStatus=&H8009000D Then 'legacy entry - NTE_NO_KEY%>
  127. <LocID ID=locSugCauseKey>
  128. This error may indicate a problem with the Certification
  129. Authority key. The key was not found and the certificate
  130. was not issued.
  131. </LocID>
  132. <%ElseIf nLastStatus=&H00000057 Then 'legacy entry - ERROR_INVALID_PARAMETER%>
  133. <LocID ID=locSugCauseBadParam>
  134. This error indicates that "Invalid Data" was submitted to
  135. Certificate Server. This can occur if A) You are submitting
  136. a request that is not formatted correctly or B) The
  137. Certification Authority used a network share or relative
  138. path to point to the "Shared Folder" when configuring
  139. Certificate Server.
  140. </LocID>
  141. <%ElseIf nLastStatus=&H8007000D And nResult=&H8007000D Then 'updated entry - ERROR_INVALID_DATA%>
  142. <LocID ID=locSugCauseBadLength>
  143. The encoded length of your request is 7F. Some old programs
  144. cannot handle certificates of this size, so Certificate
  145. Services will not issue the certificate. Please reapply
  146. for this certificate and change the length of the value
  147. you entered for Name, Department, etc., <I>or</I> ask
  148. your administrator to change this setting.
  149. </LocID>
  150. <%ElseIf nLastStatus=&H80093005 And nResult=&H80093005 Then 'new entry - OSS_DATA_ERROR%>
  151. <%
  152. ' Note:
  153. ' This error and the next are similar, however, I suspect
  154. ' that this error occurs when the request is only slightly garbled and
  155. ' probably mostly parsable, while the next error occurs when
  156. ' the request is truly fubar.
  157. %>
  158. <LocID ID=locSugCauseBadData1>
  159. The certificate request contained bad data.
  160. If you are submitting a saved request, make sure that the
  161. request contains no garbage data outside the BEGIN and END tags,
  162. and that the file containing the saved request is not corrupted.
  163. </LocID>
  164. <%ElseIf nLastStatus=&H00000000 And nResult=&H8007000D Then 'new entry - ERROR_SUCCESS, ERROR_INVALID_DATA%>
  165. <LocID ID=locSugCauseBadData2>
  166. The certificate request contained bad data.
  167. If you are submitting a saved request, make sure that the
  168. request contains no garbage data outside the BEGIN and END tags,
  169. and that the file containing the saved request is not corrupted.
  170. </LocID>
  171. <%ElseIf nLastStatus=&H80093004 Then 'new entry - OSS_MORE_INPUT%>
  172. <LocID ID=locSugCauseEmpty>
  173. The certificate request was empty.
  174. <Font Color=#FF0000>This should never happen, and it indicates an internal error.</Font>
  175. </LocID>
  176. <%ElseIf nLastStatus=&H80094004 And nResult=&H80094004 Then 'new entry - CERTSRV_E_PROPERTY_EMPTY%>
  177. <LocID ID=locSugCauseNoCert>
  178. You have have attempted to check on a certificate that has
  179. not been requested. Most likely, the certificate server has
  180. been reinstalled and the database containing the original
  181. request was destroyed.
  182. </LocID>
  183. <%ElseIf nLastStatus=&H800706BA Or nResult=&H80070005 Then 'new entry - RPC_S_SERVER_UNAVAILABLE, ERROR_ACCESS_DENIED%>
  184. <LocID ID=locSugCauseNotStarted2>
  185. The Certification Authority Service has not been started.
  186. </LocID>
  187. <%ElseIf nLastStatus=&H800706BA Then 'new entry - RPC_S_SERVER_UNAVAILABLE%>
  188. <LocID ID=locSugCauseNotStarted3>
  189. 1. The CA is not running. <BR>
  190. 2. The CA is too busy to accept requests. <BR>
  191. 3. The network connection to the CA is having problems.<BR>
  192. </LocID>
  193. <%ElseIf nLastStatus=&H80094801 Or nResult=&H80094801 Then 'new entry - CERTSRV_E_NO_CERT_TYPE%>
  194. <LocID ID=locSugCauseNoTemplate>
  195. The certificate request contains no certificate template information.
  196. <Font Color=#FF0000>This should never happen, and it indicates an internal error.</Font>
  197. </LocID>
  198. <%ElseIf ""=Request.Form And ""=Request.QueryString Then%>
  199. <LocID ID=locSugCauseNoFormData>
  200. No form data was included in the HTTP request. This is most likely caused by
  201. reaching this page through a bookmark.
  202. </LocID>
  203. <%Else%>
  204. <LocID ID=locSugCauseUnknown>
  205. No suggestions.
  206. </LocID>
  207. <%End If%>
  208. </DD></DL>
  209. <%End If%>
  210. </DD></DL>
  211. </Span>
  212. <%If "chkpnd"=sMode Then%>
  213. <Form Action="certrmpn.asp" Method=Post>
  214. <Input Type=Hidden Name=Action Value="rmpn">
  215. <Input Type=Hidden Name=ReqID Value="<%=Server.HTMLEncode(Request.Form("ReqID"))%>">
  216. <P><Input ID=locBtnRemove Type=Submit Value="Remove"> - Remove this request from your list of pending requests.
  217. </Form>
  218. <%End If%>
  219. <!--
  220. <Pre>
  221. <%=Request.Form("CertRequest")%>
  222. </Pre>
  223. -->
  224. <!-- Green HR --><Table Border=0 CellSpacing=0 CellPadding=0 Width=100%><TR><TD BgColor=#008080><Img Src="certspc.gif" Alt="" Height=2 Width=1></TD></TR></Table>
  225. <!-- White HR --><Table Border=0 CellSpacing=0 CellPadding=0 Width=100%><TR><TD BgColor=#FFFFFF><Img Src="certspc.gif" Alt="" Height=5 Width=1></TD></TR></Table>
  226. </Font>
  227. <!-- ############################################################ -->
  228. <!-- End of standard text. Scripts follow -->
  229. <!-- no scripts -->
  230. </Body>
  231. </HTML>
  232. <%Session.Abandon()%>