Source code of Windows XP (NT5)
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.

673 lines
24 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1999
  5. //
  6. // File: csprop.h
  7. //
  8. // Contents: Cert Server Property interfaces
  9. //
  10. // History: 31-Jul-96 vich created
  11. //
  12. //---------------------------------------------------------------------------
  13. #ifndef __CSPROP_H__
  14. #define __CSPROP_H__
  15. #include "certdb.h"
  16. // begin_certsrv
  17. //+--------------------------------------------------------------------------
  18. // Name properties:
  19. #define wszPROPDISTINGUISHEDNAME TEXT("DistinguishedName")
  20. #define wszPROPRAWNAME TEXT("RawName")
  21. #define wszPROPCOUNTRY TEXT("Country")
  22. #define wszPROPORGANIZATION TEXT("Organization")
  23. #define wszPROPORGUNIT TEXT("OrgUnit")
  24. #define wszPROPCOMMONNAME TEXT("CommonName")
  25. #define wszPROPLOCALITY TEXT("Locality")
  26. #define wszPROPSTATE TEXT("State")
  27. #define wszPROPTITLE TEXT("Title")
  28. #define wszPROPGIVENNAME TEXT("GivenName")
  29. #define wszPROPINITIALS TEXT("Initials")
  30. #define wszPROPSURNAME TEXT("SurName")
  31. #define wszPROPDOMAINCOMPONENT TEXT("DomainComponent")
  32. #define wszPROPEMAIL TEXT("EMail")
  33. #define wszPROPSTREETADDRESS TEXT("StreetAddress")
  34. #define wszPROPUNSTRUCTUREDNAME TEXT("UnstructuredName")
  35. #define wszPROPUNSTRUCTUREDADDRESS TEXT("UnstructuredAddress")
  36. #define wszPROPDEVICESERIALNUMBER TEXT("DeviceSerialNumber")
  37. //+--------------------------------------------------------------------------
  38. // Subject Name properties:
  39. #define wszPROPSUBJECTDOT TEXT("Subject.")
  40. #define wszPROPSUBJECTDISTINGUISHEDNAME \
  41. wszPROPSUBJECTDOT wszPROPDISTINGUISHEDNAME
  42. #define wszPROPSUBJECTRAWNAME wszPROPSUBJECTDOT wszPROPRAWNAME
  43. #define wszPROPSUBJECTCOUNTRY wszPROPSUBJECTDOT wszPROPCOUNTRY
  44. #define wszPROPSUBJECTORGANIZATION wszPROPSUBJECTDOT wszPROPORGANIZATION
  45. #define wszPROPSUBJECTORGUNIT wszPROPSUBJECTDOT wszPROPORGUNIT
  46. #define wszPROPSUBJECTCOMMONNAME wszPROPSUBJECTDOT wszPROPCOMMONNAME
  47. #define wszPROPSUBJECTLOCALITY wszPROPSUBJECTDOT wszPROPLOCALITY
  48. #define wszPROPSUBJECTSTATE wszPROPSUBJECTDOT wszPROPSTATE
  49. #define wszPROPSUBJECTTITLE wszPROPSUBJECTDOT wszPROPTITLE
  50. #define wszPROPSUBJECTGIVENNAME wszPROPSUBJECTDOT wszPROPGIVENNAME
  51. #define wszPROPSUBJECTINITIALS wszPROPSUBJECTDOT wszPROPINITIALS
  52. #define wszPROPSUBJECTSURNAME wszPROPSUBJECTDOT wszPROPSURNAME
  53. #define wszPROPSUBJECTDOMAINCOMPONENT wszPROPSUBJECTDOT wszPROPDOMAINCOMPONENT
  54. #define wszPROPSUBJECTEMAIL wszPROPSUBJECTDOT wszPROPEMAIL
  55. #define wszPROPSUBJECTSTREETADDRESS wszPROPSUBJECTDOT wszPROPSTREETADDRESS
  56. #define wszPROPSUBJECTUNSTRUCTUREDNAME wszPROPSUBJECTDOT wszPROPUNSTRUCTUREDNAME
  57. #define wszPROPSUBJECTUNSTRUCTUREDADDRESS wszPROPSUBJECTDOT wszPROPUNSTRUCTUREDADDRESS
  58. #define wszPROPSUBJECTDEVICESERIALNUMBER wszPROPSUBJECTDOT wszPROPDEVICESERIALNUMBER
  59. // end_certsrv
  60. //+--------------------------------------------------------------------------
  61. // Issuer Name properties:
  62. #define wszPROPISSUERDOT TEXT("Issuer.")
  63. #define wszPROPISSUERDISTINGUISHEDNAME \
  64. wszPROPISSUERDOT wszPROPDISTINGUISHEDNAME
  65. #define wszPROPISSUERRAWNAME wszPROPISSUERDOT wszPROPRAWNAME
  66. #define wszPROPISSUERCOUNTRY wszPROPISSUERDOT wszPROPCOUNTRY
  67. #define wszPROPISSUERORGANIZATION wszPROPISSUERDOT wszPROPORGANIZATION
  68. #define wszPROPISSUERORGUNIT wszPROPISSUERDOT wszPROPORGUNIT
  69. #define wszPROPISSUERCOMMONNAME wszPROPISSUERDOT wszPROPCOMMONNAME
  70. #define wszPROPISSUERLOCALITY wszPROPISSUERDOT wszPROPLOCALITY
  71. #define wszPROPISSUERSTATE wszPROPISSUERDOT wszPROPSTATE
  72. #define wszPROPISSUERTITLE wszPROPISSUERDOT wszPROPTITLE
  73. #define wszPROPISSUERGIVENNAME wszPROPISSUERDOT wszPROPGIVENNAME
  74. #define wszPROPISSUERINITIALS wszPROPISSUERDOT wszPROPINITIALS
  75. #define wszPROPISSUERSURNAME wszPROPISSUERDOT wszPROPSURNAME
  76. #define wszPROPISSUERDOMAINCOMPONENT wszPROPISSUERDOT wszPROPDOMAINCOMPONENT
  77. #define wszPROPISSUEREMAIL wszPROPISSUERDOT wszPROPEMAIL
  78. #define wszPROPISSUERSTREETADDRESS wszPROPISSUERDOT wszPROPSTREETADDRESS
  79. #define wszPROPISSUERUNSTRUCTUREDNAME wszPROPISSUERDOT wszPROPUNSTRUCTUREDNAME
  80. #define wszPROPISSUERUNSTRUCTUREDADDRESS wszPROPISSUERDOT wszPROPUNSTRUCTUREDADDRESS
  81. #define wszPROPISSUERDEVICESERIALNUMBER wszPROPISSUERDOT wszPROPDEVICESERIALNUMBER
  82. #define wszPROPISSUERCOUNTRYOBJID \
  83. wszPROPISSUERDOT TEXT(szOID_COUNTRY_NAME)
  84. #define wszPROPISSUERORGANIZATIONOBJID \
  85. wszPROPISSUERDOT TEXT(szOID_ORGANIZATION_NAME)
  86. #define wszPROPISSUERORGUNITOBJID \
  87. wszPROPISSUERDOT TEXT(szOID_ORGANIZATIONAL_UNIT_NAME)
  88. #define wszPROPISSUERCOMMONNAMEOBJID \
  89. wszPROPISSUERDOT TEXT(szOID_COMMON_NAME)
  90. #define wszPROPISSUERLOCALITYOBJID \
  91. wszPROPISSUERDOT TEXT(szOID_LOCALITY_NAME)
  92. #define wszPROPISSUERSTATEOBJID \
  93. wszPROPISSUERDOT TEXT(szOID_STATE_OR_PROVINCE_NAME)
  94. #define wszPROPISSUERTITLEOBJID \
  95. wszPROPISSUERDOT TEXT(szOID_TITLE)
  96. #define wszPROPISSUERGIVENNAMEOBJID \
  97. wszPROPISSUERDOT TEXT(szOID_GIVEN_NAME)
  98. #define wszPROPISSUERINITIALSOBJID \
  99. wszPROPISSUERDOT TEXT(szOID_INITIALS)
  100. #define wszPROPISSUERSURNAMEOBJID \
  101. wszPROPISSUERDOT TEXT(szOID_SUR_NAME)
  102. #define wszPROPISSUERDOMAINCOMPONENTOBJID \
  103. wszPROPISSUERDOT TEXT(szOID_DOMAIN_COMPONENT)
  104. #define wszPROPISSUEREMAILOBJID \
  105. wszPROPISSUERDOT TEXT(szOID_RSA_emailAddr)
  106. #define wszPROPISSUERSTREETADDRESSOBJID \
  107. wszPROPISSUERDOT TEXT(szOID_STREET_ADDRESS)
  108. #define wszPROPISSUERUNSTRUCTUREDNAMEOBJID \
  109. wszPROPISSUERDOT TEXT(szOID_RSA_unstructName)
  110. #define wszPROPISSUERUNSTRUCTUREDADDRESSOBJID \
  111. wszPROPISSUERDOT TEXT(szOID_RSA_unstructAddr)
  112. #define wszPROPISSUERDEVICESERIALNUMBEROBJID \
  113. wszPROPISSUERDOT TEXT(szOID_DEVICE_SERIAL_NUMBER)
  114. //+--------------------------------------------------------------------------
  115. // For mapping request attribute names to internal property names:
  116. // Map to wszPROPSUBJECTCOUNTRY:
  117. #define wszATTRCOUNTRY1 TEXT("C")
  118. #define wszATTRCOUNTRY2 TEXT("Country")
  119. // Map to wszPROPSUBJECTORGANIZATION:
  120. #define wszATTRORG1 TEXT("O")
  121. #define wszATTRORG2 TEXT("Org")
  122. #define wszATTRORG3 TEXT("Organization")
  123. // Map to wszPROPSUBJECTORGUNIT:
  124. #define wszATTRORGUNIT1 TEXT("OU")
  125. #define wszATTRORGUNIT2 TEXT("OrgUnit")
  126. #define wszATTRORGUNIT3 TEXT("OrganizationUnit")
  127. #define wszATTRORGUNIT4 TEXT("OrganizationalUnit")
  128. // Map to wszPROPSUBJECTCOMMONNAME:
  129. #define wszATTRCOMMONNAME1 TEXT("CN")
  130. #define wszATTRCOMMONNAME2 TEXT("CommonName")
  131. // Map to wszPROPSUBJECTLOCALITY:
  132. #define wszATTRLOCALITY1 TEXT("L")
  133. #define wszATTRLOCALITY2 TEXT("Locality")
  134. // Map to wszPROPSUBJECTSTATE:
  135. #define wszATTRSTATE1 TEXT("S")
  136. #define wszATTRSTATE2 TEXT("ST")
  137. #define wszATTRSTATE3 TEXT("State")
  138. // Map to wszPROPSUBJECTTITLE:
  139. #define wszATTRTITLE1 TEXT("T")
  140. #define wszATTRTITLE2 TEXT("Title")
  141. // Map to wszPROPSUBJECTGIVENNAME:
  142. #define wszATTRGIVENNAME1 TEXT("G")
  143. #define wszATTRGIVENNAME2 TEXT("GivenName")
  144. // Map to wszPROPSUBJECTINITIALS:
  145. #define wszATTRINITIALS1 TEXT("I")
  146. #define wszATTRINITIALS2 TEXT("Initials")
  147. // Map to wszPROPSUBJECTSURNAME:
  148. #define wszATTRSURNAME1 TEXT("SN")
  149. #define wszATTRSURNAME2 TEXT("SurName")
  150. // Map to wszPROPSUBJECTDOMAINCOMPONENT:
  151. #define wszATTRDOMAINCOMPONENT1 TEXT("DC")
  152. #define wszATTRDOMAINCOMPONENT2 TEXT("DomainComponent")
  153. // Map to wszPROPSUBJECTEMAIL:
  154. #define wszATTREMAIL1 TEXT("E")
  155. #define wszATTREMAIL2 TEXT("EMail")
  156. // Map to wszPROPSUBJECTSTREETADDRESS:
  157. #define wszATTRSTREETADDRESS1 TEXT("Street")
  158. #define wszATTRSTREETADDRESS2 TEXT("StreetAddress")
  159. // Map to wszPROPSUBJECTUNSTRUCTUREDNAME:
  160. #define wszATTRUNSTRUCTUREDNAME1 TEXT("UnstructuredName")
  161. // Map to wszPROPSUBJECTUNSTRUCTUREDADDRESS:
  162. #define wszATTRUNSTRUCTUREDADDRESS1 TEXT("UnstructuredAddress")
  163. // Map to wszPROPSUBJECTDEVICESERIALNUMBER:
  164. #define wszATTRDEVICESERIALNUMBER1 TEXT("DeviceSerialNumber")
  165. // begin_certsrv
  166. //+--------------------------------------------------------------------------
  167. // Request properties:
  168. #define wszPROPREQUESTDOT TEXT("Request.")
  169. #define wszPROPREQUESTREQUESTID TEXT("RequestID")
  170. #define wszPROPREQUESTRAWREQUEST TEXT("RawRequest")
  171. #define wszPROPREQUESTRAWARCHIVEDKEY TEXT("RawArchivedKey")
  172. #define wszPROPREQUESTKEYRECOVERYHASHES TEXT("KeyRecoveryHashes")
  173. #define wszPROPREQUESTRAWOLDCERTIFICATE TEXT("RawOldCertificate")
  174. #define wszPROPREQUESTATTRIBUTES TEXT("RequestAttributes")
  175. #define wszPROPREQUESTTYPE TEXT("RequestType")
  176. #define wszPROPREQUESTFLAGS TEXT("RequestFlags")
  177. #define wszPROPREQUESTSTATUSCODE TEXT("StatusCode")
  178. #define wszPROPREQUESTDISPOSITION TEXT("Disposition")
  179. #define wszPROPREQUESTDISPOSITIONMESSAGE TEXT("DispositionMessage")
  180. #define wszPROPREQUESTSUBMITTEDWHEN TEXT("SubmittedWhen")
  181. #define wszPROPREQUESTRESOLVEDWHEN TEXT("ResolvedWhen")
  182. #define wszPROPREQUESTREVOKEDWHEN TEXT("RevokedWhen")
  183. #define wszPROPREQUESTREVOKEDEFFECTIVEWHEN TEXT("RevokedEffectiveWhen")
  184. #define wszPROPREQUESTREVOKEDREASON TEXT("RevokedReason")
  185. #define wszPROPREQUESTERNAME TEXT("RequesterName")
  186. #define wszPROPCALLERNAME TEXT("CallerName")
  187. #define wszPROPREQUESTERADDRESS TEXT("RequesterAddress") // no_certsrv
  188. #define wszPROPSIGNERPOLICIES TEXT("SignerPolicies")
  189. #define wszPROPSIGNERAPPLICATIONPOLICIES TEXT("SignerApplicationPolicies")
  190. //+--------------------------------------------------------------------------
  191. // Request attribute properties:
  192. #define wszPROPCHALLENGE TEXT("Challenge")
  193. #define wszPROPEXPECTEDCHALLENGE TEXT("ExpectedChallenge")
  194. #define wszPROPDISPOSITION TEXT("Disposition")
  195. #define wszPROPDISPOSITIONDENY TEXT("Deny")
  196. #define wszPROPDISPOSITIONPENDING TEXT("Pending")
  197. #define wszPROPVALIDITYPERIODSTRING TEXT("ValidityPeriod")
  198. #define wszPROPVALIDITYPERIODCOUNT TEXT("ValidityPeriodUnits")
  199. #define wszPROPCERTTYPE TEXT("CertType")
  200. #define wszPROPCERTTEMPLATE TEXT("CertificateTemplate")
  201. #define wszPROPCERTUSAGE TEXT("CertificateUsage")
  202. #define wszPROPREQUESTOSVERSION TEXT("RequestOSVersion")
  203. #define wszPROPREQUESTCSPPROVIDER TEXT("RequestCSPProvider")
  204. #define wszPROPEXITCERTFILE TEXT("CertFile")
  205. #define wszPROPCLIENTBROWSERMACHINE TEXT("cbm")
  206. #define wszPROPCERTCLIENTMACHINE TEXT("ccm")
  207. //+--------------------------------------------------------------------------
  208. // "System" properties
  209. // ".#" means ".0", ".1", ".2" ... may be appended to the property name to
  210. // collect context specific values. For some properties, the suffix selects
  211. // the CA certificate context. For others, it selects the the CA CRL context.
  212. #define wszPROPCATYPE TEXT("CAType")
  213. #define wszPROPSANITIZEDCANAME TEXT("SanitizedCAName")
  214. #define wszPROPSANITIZEDSHORTNAME TEXT("SanitizedShortName")
  215. #define wszPROPMACHINEDNSNAME TEXT("MachineDNSName")
  216. #define wszPROPMODULEREGLOC TEXT("ModuleRegistryLocation")
  217. #define wszPROPUSEDS TEXT("fUseDS")
  218. #define wszPROPSERVERUPGRADED TEXT("fServerUpgraded")
  219. #define wszPROPCONFIGDN TEXT("ConfigDN")
  220. #define wszPROPDOMAINDN TEXT("DomainDN")
  221. #define wszPROPLOGLEVEL TEXT("LogLevel")
  222. // Request Context properties:
  223. #define wszPROPREQUESTERTOKEN TEXT("RequesterToken") // no_certsrv
  224. #define wszPROPREQUESTERCAACCESS TEXT("RequesterCAAccess")
  225. #define wszPROPUSERDN TEXT("UserDN")
  226. #define wszPROPTEMPLATECHANGESEQUENCENUMBER TEXT("TemplateChangeSequenceNumber")
  227. // CA Certificate properties: (all ".#" extensible except wszPROPCERTCOUNT)
  228. #define wszPROPCERTCOUNT TEXT("CertCount")
  229. #define wszPROPRAWCACERTIFICATE TEXT("RawCACertificate")
  230. #define wszPROPCERTSTATE TEXT("CertState")
  231. #define wszPROPCERTSUFFIX TEXT("CertSuffix")
  232. // CA CRL properties: (all ".#" extensible)
  233. #define wszPROPRAWCRL TEXT("RawCRL")
  234. #define wszPROPRAWDELTACRL TEXT("RawDeltaCRL")
  235. #define wszPROPCRLINDEX TEXT("CRLIndex")
  236. #define wszPROPCRLSTATE TEXT("CRLState")
  237. #define wszPROPCRLSUFFIX TEXT("CRLSuffix")
  238. // Values for wszPROPCERTSTATE (see certadm.h):
  239. // CA_DISP_REVOKED // This Cert has been revoked.
  240. // CA_DISP_VALID // This Cert is still valid
  241. // CA_DISP_INVALID // This Cert has expired.
  242. // CA_DISP_ERROR // Cert unavailable (placehholder in registry?)
  243. // Values for wszPROPCRLSTATE (see certadm.h):
  244. // CA_DISP_REVOKED // All unexpired certs using this Cert's CRL have been
  245. // // revoked.
  246. // CA_DISP_VALID // This Cert is still publishing CRLs as needed.
  247. // CA_DISP_INVALID // All certs using this Cert's CRL are expired.
  248. // CA_DISP_ERROR // This Cert's CRL is managed by another Cert.
  249. // "Settable" system properties:
  250. #define wszPROPEVENTLOGTERSE TEXT("EventLogTerse")
  251. #define wszPROPEVENTLOGERROR TEXT("EventLogError")
  252. #define wszPROPEVENTLOGWARNING TEXT("EventLogWarning")
  253. #define wszPROPEVENTLOGVERBOSE TEXT("EventLogVerbose")
  254. //+--------------------------------------------------------------------------
  255. // Certificate properties:
  256. #define wszPROPCERTIFICATEREQUESTID TEXT("RequestID")
  257. #define wszPROPRAWCERTIFICATE TEXT("RawCertificate")
  258. #define wszPROPCERTIFICATEHASH TEXT("CertificateHash")
  259. #define wszPROPCERTIFICATETEMPLATE TEXT("CertificateTemplate")
  260. #define wszPROPCERTIFICATEENROLLMENTFLAGS TEXT("EnrollmentFlags")
  261. #define wszPROPCERTIFICATEGENERALFLAGS TEXT("GeneralFlags")
  262. #define wszPROPCERTIFICATESERIALNUMBER TEXT("SerialNumber")
  263. #define wszPROPCERTIFICATEISSUERNAMEID TEXT("IssuerNameID")//no_certsrv
  264. #define wszPROPCERTIFICATENOTBEFOREDATE TEXT("NotBefore")
  265. #define wszPROPCERTIFICATENOTAFTERDATE TEXT("NotAfter")
  266. #define wszPROPCERTIFICATESUBJECTKEYIDENTIFIER TEXT("SubjectKeyIdentifier")
  267. #define wszPROPCERTIFICATERAWPUBLICKEY TEXT("RawPublicKey")
  268. #define wszPROPCERTIFICATEPUBLICKEYLENGTH TEXT("PublicKeyLength")
  269. #define wszPROPCERTIFICATEPUBLICKEYALGORITHM TEXT("PublicKeyAlgorithm")
  270. #define wszPROPCERTIFICATERAWPUBLICKEYALGORITHMPARAMETERS \
  271. TEXT("RawPublicKeyAlgorithmParameters")
  272. #define wszPROPCERTIFICATEUPN TEXT("UPN")
  273. // Obsolete:
  274. #define wszPROPCERTIFICATETYPE TEXT("CertificateType")
  275. #define wszPROPCERTIFICATERAWSMIMECAPABILITIES TEXT("RawSMIMECapabilities")
  276. #define wszPROPNAMETYPE TEXT("NameType")
  277. //+--------------------------------------------------------------------------
  278. // Certificate extension properties:
  279. #define EXTENSION_CRITICAL_FLAG 0x00000001
  280. #define EXTENSION_DISABLE_FLAG 0x00000002
  281. #define EXTENSION_POLICY_MASK 0x0000ffff // Settable by admin+policy
  282. #define EXTENSION_ORIGIN_REQUEST 0x00010000
  283. #define EXTENSION_ORIGIN_POLICY 0x00020000
  284. #define EXTENSION_ORIGIN_ADMIN 0x00030000
  285. #define EXTENSION_ORIGIN_SERVER 0x00040000
  286. #define EXTENSION_ORIGIN_RENEWALCERT 0x00050000
  287. #define EXTENSION_ORIGIN_IMPORTEDCERT 0x00060000
  288. #define EXTENSION_ORIGIN_PKCS7 0x00070000
  289. #define EXTENSION_ORIGIN_CMC 0x00080000
  290. #define EXTENSION_ORIGIN_MASK 0x000f0000
  291. //+--------------------------------------------------------------------------
  292. // Extension properties:
  293. #define wszPROPEXTREQUESTID TEXT("ExtensionRequestId")
  294. #define wszPROPEXTNAME TEXT("ExtensionName")
  295. #define wszPROPEXTFLAGS TEXT("ExtensionFlags")
  296. #define wszPROPEXTRAWVALUE TEXT("ExtensionRawValue")
  297. //+--------------------------------------------------------------------------
  298. // Attribute properties:
  299. #define wszPROPATTRIBREQUESTID TEXT("AttributeRequestId")
  300. #define wszPROPATTRIBNAME TEXT("AttributeName")
  301. #define wszPROPATTRIBVALUE TEXT("AttributeValue")
  302. //+--------------------------------------------------------------------------
  303. // CRL properties:
  304. #define wszPROPCRLROWID TEXT("CRLRowId")
  305. #define wszPROPCRLNUMBER TEXT("CRLNumber")
  306. #define wszPROPCRLMINBASE TEXT("CRLMinBase") // Delta CRLs only
  307. #define wszPROPCRLNAMEID TEXT("CRLNameId")
  308. #define wszPROPCRLCOUNT TEXT("CRLCount")
  309. #define wszPROPCRLTHISUPDATE TEXT("CRLThisUpdate")
  310. #define wszPROPCRLNEXTUPDATE TEXT("CRLNextUpdate")
  311. #define wszPROPCRLTHISPUBLISH TEXT("CRLThisPublish")
  312. #define wszPROPCRLNEXTPUBLISH TEXT("CRLNextPublish")
  313. #define wszPROPCRLEFFECTIVE TEXT("CRLEffective")
  314. #define wszPROPCRLPROPAGATIONCOMPLETE TEXT("CRLPropagationComplete")
  315. #define wszPROPCRLLASTPUBLISHED TEXT("CRLLastPublished")
  316. #define wszPROPCRLPUBLISHATTEMPTS TEXT("CRLPublishAttempts")
  317. #define wszPROPCRLPUBLISHFLAGS TEXT("CRLPublishFlags")
  318. #define wszPROPCRLPUBLISHSTATUSCODE TEXT("CRLPublishStatusCode")
  319. #define wszPROPCRLPUBLISHERROR TEXT("CRLPublishError")
  320. #define wszPROPCRLRAWCRL TEXT("CRLRawCRL")
  321. //+--------------------------------------------------------------------------
  322. // CRL Published Flags:
  323. #define CPF_BASE 0x00000001
  324. #define CPF_DELTA 0x00000002
  325. #define CPF_COMPLETE 0x00000004
  326. #define CPF_SHADOW 0x00000008
  327. #define CPF_CASTORE_ERROR 0x00000010
  328. #define CPF_BADURL_ERROR 0x00000020
  329. #define CPF_MANUAL 0x00000040
  330. #define CPF_LDAP_ERROR 0x00000100
  331. #define CPF_FILE_ERROR 0x00000200
  332. #define CPF_FTP_ERROR 0x00000400
  333. #define CPF_HTTP_ERROR 0x00000800
  334. //+--------------------------------------------------------------------------
  335. // GetProperty/SetProperty Flags:
  336. //
  337. // Choose one Type
  338. #define PROPTYPE_LONG 0x00000001 // Signed long
  339. #define PROPTYPE_DATE 0x00000002 // Date+Time
  340. #define PROPTYPE_BINARY 0x00000003 // Binary data
  341. #define PROPTYPE_STRING 0x00000004 // Unicode String
  342. #define PROPTYPE_MASK 0x000000ff
  343. // Choose one Caller:
  344. #define PROPCALLER_SERVER 0x00000100
  345. #define PROPCALLER_POLICY 0x00000200
  346. #define PROPCALLER_EXIT 0x00000300
  347. #define PROPCALLER_ADMIN 0x00000400
  348. #define PROPCALLER_REQUEST 0x00000500
  349. #define PROPCALLER_MASK 0x00000f00
  350. // end_certsrv
  351. // Choose one Table:
  352. #define PROPTABLE_REQCERT 0x00000000 // OpenRow only
  353. #define PROPTABLE_REQUEST 0x00001000
  354. #define PROPTABLE_CERTIFICATE 0x00002000
  355. #define PROPTABLE_EXTENSION 0x00003000
  356. #define PROPTABLE_ATTRIBUTE 0x00004000
  357. #define PROPTABLE_CRL 0x00005000
  358. #define PROPTABLE_MASK 0x0000f000
  359. #define PROPFLAGS_INDEXED 0x00010000 // add_certsrv
  360. #define PROPFLAGS_MASK 0x000f0000
  361. #define PROPMARSHAL_LOCALSTRING 0x00100000
  362. #define PROPMARSHAL_NULLBSTROK 0x00200000
  363. #define PROPOPEN_READONLY 0x00400000 // OpenRow only
  364. #define PROPOPEN_DELETE 0x00800000 // OpenRow only
  365. #define PROPOPEN_CERTHASH 0x01000000 // OpenRow only
  366. // begin_certsrv
  367. // RequestFlags definitions:
  368. #define CR_FLG_FORCETELETEX 0x00000001
  369. #define CR_FLG_RENEWAL 0x00000002
  370. #define CR_FLG_FORCEUTF8 0x00000004
  371. #define CR_FLG_CAXCHGCERT 0x00000008
  372. #define CR_FLG_ENROLLONBEHALFOF 0x00000010
  373. #define CR_FLG_SUBJECTUNMODIFIED 0x00000020
  374. #define CR_FLG_OLDRFCCMC 0x40000000 // BUGBUG: temporary!!!
  375. #define CR_FLG_PUBLISHERROR 0x80000000
  376. // end_certsrv
  377. #define CB_DBMAXBINARY (4 * 1024)
  378. #define CB_DBMAXRAWCERTIFICATE (16 * 1024)
  379. #define CB_DBMAXRAWREQUEST (64 * 1024)
  380. #define CB_DBMAXRAWCRL (512 * 1024 * 1024) // 512mb
  381. #define CCH_DBMAXTEXT_MAXINTERNAL (255 / sizeof(WCHAR)) // 127 chars!
  382. #define CB_DBMAXTEXT_MAXINTERNAL (CCH_DBMAXTEXT_MAXINTERNAL * sizeof(WCHAR))
  383. #define CCH_DBMAXTEXT_SHORT 1024
  384. #define CB_DBMAXTEXT_SHORT (CCH_DBMAXTEXT_SHORT * sizeof(WCHAR))
  385. #define CCH_DBMAXTEXT_MEDIUM (4 * 1024)
  386. #define CB_DBMAXTEXT_MEDIUM (CCH_DBMAXTEXT_MEDIUM * sizeof(WCHAR))
  387. #define CCH_DBMAXTEXT_LONG (16 * 1024)
  388. #define CB_DBMAXTEXT_LONG (CCH_DBMAXTEXT_LONG * sizeof(WCHAR))
  389. #define CCH_DBMAXTEXT_OID CCH_DBMAXTEXT_MAXINTERNAL
  390. #define CB_DBMAXTEXT_OID CB_DBMAXTEXT_MAXINTERNAL
  391. #define CCH_DBMAXTEXT_REQUESTNAME CCH_DBMAXTEXT_SHORT
  392. #define CB_DBMAXTEXT_REQUESTNAME CB_DBMAXTEXT_SHORT
  393. #define CCH_DBMAXTEXT_DISPSTRING CCH_DBMAXTEXT_MEDIUM
  394. #define CB_DBMAXTEXT_DISPSTRING CB_DBMAXTEXT_MEDIUM
  395. #define CCH_DBMAXTEXT_RDN CCH_DBMAXTEXT_MEDIUM
  396. #define CB_DBMAXTEXT_RDN CB_DBMAXTEXT_MEDIUM
  397. #define CCH_DBMAXTEXT_DN CCH_DBMAXTEXT_MEDIUM
  398. #define CB_DBMAXTEXT_DN CB_DBMAXTEXT_MEDIUM
  399. #define CCH_DBMAXTEXT_ATTRNAME CCH_DBMAXTEXT_MAXINTERNAL
  400. #define CB_DBMAXTEXT_ATTRNAME CB_DBMAXTEXT_MAXINTERNAL
  401. #define CCH_DBMAXTEXT_ATTRVALUE CCH_DBMAXTEXT_MEDIUM
  402. #define CB_DBMAXTEXT_ATTRVALUE CB_DBMAXTEXT_MEDIUM
  403. #define CCH_DBMAXTEXT_ATTRSTRING CCH_DBMAXTEXT_LONG
  404. #define CB_DBMAXTEXT_ATTRSTRING CB_DBMAXTEXT_LONG
  405. #define cchHASHMAX 64
  406. #define cchSERIALNUMBERMAX 64
  407. #define cchUNSTRUCTUREDNAMEMAX CCH_DBMAXTEXT_SHORT
  408. #define cchUNSTRUCTUREDADDRESSMAX CCH_DBMAXTEXT_SHORT
  409. #define cchDEVICESERIALNUMBERMAX CCH_DBMAXTEXT_SHORT
  410. // Subject RDN string length limits from PKIX Part 1 doc:
  411. #define cchCOUNTRYNAMEMAX 2
  412. #define cchORGANIZATIONNAMEMAX 64
  413. #define cchORGANIZATIONALUNITNAMEMAX 64
  414. #define cchCOMMONNAMEMAX 64
  415. #define cchLOCALITYMANAMEMAX 128
  416. #define cchSTATEORPROVINCENAMEMAX 128
  417. #define cchTITLEMAX 64
  418. #define cchGIVENNAMEMAX 16
  419. #define cchINITIALSMAX 5
  420. #define cchSURNAMEMAX 40
  421. #define cchDOMAINCOMPONENTMAX 128
  422. #define cchEMAILMAX 128
  423. #define cchSTREETADDRESSMAX 30
  424. #ifdef cchCOMMONNAMEMAX_XELIB
  425. # if cchCOMMONNAMEMAX_XELIB != cchCOMMONNAMEMAX
  426. # error cchCOMMONNAMEMAX_XELIB != cchCOMMONNAMEMAX
  427. # endif
  428. #endif
  429. // begin_certsrv
  430. // Disposition property values:
  431. // Disposition values for requests in the queue:
  432. #define DB_DISP_ACTIVE 8 // being processed
  433. #define DB_DISP_PENDING 9 // taken under submission
  434. #define DB_DISP_QUEUE_MAX 9 // max disposition value for queue view
  435. #define DB_DISP_FOREIGN 12 // archived foreign cert
  436. #define DB_DISP_CA_CERT 15 // CA cert
  437. #define DB_DISP_CA_CERT_CHAIN 16 // CA cert chain
  438. #define DB_DISP_KRA_CERT 17 // KRA cert
  439. // Disposition values for requests in the log:
  440. #define DB_DISP_LOG_MIN 20 // min disposition value for log view
  441. #define DB_DISP_ISSUED 20 // cert issued
  442. #define DB_DISP_REVOKED 21 // issued and revoked
  443. // Disposition values for failed requests in the log:
  444. #define DB_DISP_LOG_FAILED_MIN 30 // min disposition value for log view
  445. #define DB_DISP_ERROR 30 // request failed
  446. #define DB_DISP_DENIED 31 // request denied
  447. // end_certsrv
  448. // CertIF property callback support:
  449. typedef HRESULT (WINAPI FNCIGETPROPERTY)(
  450. IN LONG Context,
  451. IN DWORD Flags,
  452. IN WCHAR const *pwszPropertyName,
  453. OUT VARIANT *pvarPropertyValue);
  454. FNCIGETPROPERTY PropCIGetProperty;
  455. typedef HRESULT (WINAPI FNCISETPROPERTY)(
  456. IN LONG Context,
  457. IN DWORD Flags,
  458. IN WCHAR const *pwszPropertyName,
  459. IN VARIANT const *pvarPropertyValue);
  460. FNCISETPROPERTY PropCISetProperty;
  461. typedef HRESULT (WINAPI FNCIGETEXTENSION)(
  462. IN LONG Context,
  463. IN DWORD Flags,
  464. IN WCHAR const *pwszExtensionName,
  465. OUT DWORD *pdwExtFlags,
  466. OUT VARIANT *pvarValue);
  467. FNCIGETEXTENSION PropCIGetExtension;
  468. typedef HRESULT (WINAPI FNCISETEXTENSION)(
  469. IN LONG Context,
  470. IN DWORD Flags,
  471. IN WCHAR const *pwszExtensionName,
  472. IN DWORD ExtFlags,
  473. IN VARIANT const *pvarValue);
  474. FNCISETEXTENSION PropCISetExtension;
  475. // CertIF property enumeration callback support:
  476. #define CIE_OBJECTID 0x00000001 // return object ids for names
  477. #define CIE_RESET 0x00000002
  478. #define CIE_TABLE_EXTENSIONS 0x00000010
  479. #define CIE_TABLE_ATTRIBUTES 0x00000020
  480. #define CIE_TABLE_MASK 0x000000f0
  481. #define CIE_CALLER_POLICY 0x00000200
  482. #define CIE_CALLER_EXIT 0x00000300
  483. #define CIE_CALLER_MASK 0x00000f00
  484. class CIENUM {
  485. public:
  486. CIENUM() { m_penum = NULL; }
  487. HRESULT EnumSetup(IN DWORD RequestId, IN LONG Context, IN DWORD Flags);
  488. HRESULT EnumNext(OUT BSTR *pstrPropertyName);
  489. HRESULT EnumClose();
  490. LONG GetContext() { return(m_Context); }
  491. DWORD GetFlags() { return(m_Flags); }
  492. private:
  493. IEnumCERTDBNAME *m_penum;
  494. LONG m_Context;
  495. DWORD m_Flags;
  496. };
  497. typedef HRESULT (WINAPI FNCIENUMSETUP)(
  498. IN LONG Context,
  499. IN LONG Flags,
  500. IN OUT CIENUM *pciEnum);
  501. FNCIENUMSETUP PropCIEnumSetup;
  502. typedef HRESULT (WINAPI FNCIENUMNEXT)(
  503. IN OUT CIENUM *pciEnum,
  504. OUT BSTR *pstrPropertyName);
  505. FNCIENUMNEXT PropCIEnumNext;
  506. typedef HRESULT (WINAPI FNCIENUMCLOSE)(
  507. IN OUT CIENUM *pciEnum);
  508. FNCIENUMCLOSE PropCIEnumClose;
  509. #endif // __CSPROP_H__