CertSrv.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:38k
源码类别:

模拟服务器

开发平台:

C/C++

  1. //+---------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright (C) Microsoft Corporation, 1992 - 1999
  5. //
  6. //  File:       CertSrv.h
  7. //  Contents:   Main Certificate Server header
  8. //              Also includes .h files for the COM interfaces
  9. //
  10. //----------------------------------------------------------------------------
  11. #if !defined( _CERTSRV_H_ )
  12. #define _CERTSRV_H_
  13. #include <certadm.h>
  14. #include <certbcli.h>
  15. #include <certcli.h>
  16. #include <certenc.h>
  17. #include <certexit.h>
  18. #include <certif.h>
  19. #include <certpol.h>
  20. #include <certmod.h>
  21. #include <certview.h>
  22. #ifndef DBG_CERTSRV
  23. # if defined(_DEBUG)
  24. #  define DBG_CERTSRV     1
  25. # elif defined(DBG)
  26. #  define DBG_CERTSRV     DBG
  27. # else
  28. #  define DBG_CERTSRV     0
  29. # endif
  30. #endif
  31. #define wszSERVICE_NAME TEXT("CertSvc")
  32. #define wszREGKEYNOSYSTEMCERTSVCPATH 
  33. TEXT("CurrentControlSet\Services\") 
  34. wszSERVICE_NAME
  35. #define wszREGKEYCERTSVCPATH TEXT("SYSTEM\") wszREGKEYNOSYSTEMCERTSVCPATH
  36. #define wszREGKEYBASE wszREGKEYCERTSVCPATH // obsolete definition
  37. //======================================================================
  38. // Full path to "CertSvcConfiguration":
  39. #define wszREGKEYCONFIGPATH wszREGKEYCERTSVCPATH TEXT("\") wszREGKEYCONFIG
  40. #define wszREGKEYCONFIGPATH_BS wszREGKEYCONFIGPATH TEXT("\")
  41. #define wszREGKEYCONFIGCANAME wszREGKEYCONFIGPATH_BS // obsolete definition
  42. //======================================================================
  43. // Full path to "CertSvcConfigurationRestoreInProgress":
  44. #define wszREGKEYCONFIGRESTORE wszREGKEYCONFIGPATH_BS wszREGKEYRESTOREINPROGRESS
  45. //======================================================================
  46. // Key Under "CertSvc":
  47. #define wszREGKEYCONFIG TEXT("Configuration")
  48. //======================================================================
  49. // Values Under "CertSvcConfiguration":
  50. #define wszREGACTIVE       TEXT("Active")
  51. #define wszREGDIRECTORY       TEXT("ConfigurationDirectory")
  52. #define wszREGDBDIRECTORY             TEXT("DBDirectory")
  53. #define wszREGDBLOGDIRECTORY          TEXT("DBLogDirectory")
  54. #define wszREGDBSYSDIRECTORY          TEXT("DBSystemDirectory")
  55. #define wszREGDBTEMPDIRECTORY         TEXT("DBTempDirectory")
  56. #define wszREGDBSESSIONCOUNT       TEXT("DBSessionCount")
  57. #define wszREGDBLASTFULLBACKUP       TEXT("DBLastFullBackup")
  58. #define wszREGDBLASTINCREMENTALBACKUP TEXT("DBLastIncrementalBackup")
  59. #define wszREGDBLASTRECOVERY       TEXT("DBLastRecovery")
  60. #define wszREGWEBCLIENTCAMACHINE      TEXT("WebClientCAMachine")
  61. #define wszREGVERSION       TEXT("Version")
  62. #define wszREGWEBCLIENTCANAME         TEXT("WebClientCAName")
  63. #define wszREGWEBCLIENTCATYPE         TEXT("WebClientCAType")
  64. #define wszREGDBOPTIONALFLAGS         TEXT("DBOptionalFlags")
  65. // Default value for wszREGDBSESSIONCOUNT
  66. #define DBSESSIONCOUNTDEFAULT      20
  67. // Default value for wszREGMAXINCOMINGMESSAGESIZE
  68. #define MAXINCOMINGMESSAGESIZEDEFAULT      (64 * 1024)
  69. // Value for wszREGVERSION:
  70. #define CSVER_MAJOR      2 // high 16 bits
  71. #define CSVER_MINOR      1 // low 16 bits
  72. // stamp, for all time,the whistler version:
  73. #define CSVER_WHISTLER               ((2<<16)|(1))
  74. // Keys Under "CertSvcConfiguration":
  75. #define wszREGKEYRESTOREINPROGRESS   TEXT("RestoreInProgress")
  76. //======================================================================
  77. // Values Under "CertSvcConfiguration<CAName>":
  78. #define wszREGCADESCRIPTION          TEXT("CADescription")
  79. #define wszREGCACERTHASH      TEXT("CACertHash")
  80. #define wszREGCASERIALNUMBER      TEXT("CACertSerialNumber")
  81. #define wszREGCAXCHGCERTHASH      TEXT("CAXchgCertHash")
  82. #define wszREGKRACERTHASH      TEXT("KRACertHash")
  83. #define wszREGKRACERTCOUNT      TEXT("KRACertCount")
  84. #define wszREGKRAFLAGS      TEXT("KRAFlags")
  85. #define wszREGCATYPE      TEXT("CAType")
  86. #define wszREGCERTENROLLCOMPATIBLE   TEXT("CertEnrollCompatible")
  87. #define wszREGENFORCEX500NAMELENGTHS TEXT("EnforceX500NameLengths")
  88. #define wszREGCOMMONNAME      TEXT("CommonName")
  89. #define wszREGCLOCKSKEWMINUTES      TEXT("ClockSkewMinutes")
  90. #define wszREGCRLNEXTPUBLISH         TEXT("CRLNextPublish")
  91. #define wszREGCRLPERIODSTRING      TEXT("CRLPeriod")
  92. #define wszREGCRLPERIODCOUNT      TEXT("CRLPeriodUnits")
  93. #define wszREGCRLOVERLAPPERIODSTRING TEXT("CRLOverlapPeriod")
  94. #define wszREGCRLOVERLAPPERIODCOUNT  TEXT("CRLOverlapUnits")
  95. #define wszREGCRLDELTANEXTPUBLISH    TEXT("CRLDeltaNextPublish")
  96. #define wszREGCRLDELTAPERIODSTRING   TEXT("CRLDeltaPeriod")
  97. #define wszREGCRLDELTAPERIODCOUNT    TEXT("CRLDeltaPeriodUnits")
  98. #define wszREGCRLDELTAOVERLAPPERIODSTRING TEXT("CRLDeltaOverlapPeriod")
  99. #define wszREGCRLDELTAOVERLAPPERIODCOUNT  TEXT("CRLDeltaOverlapUnits")
  100. #define wszREGCRLPUBLICATIONURLS     TEXT("CRLPublicationURLs")
  101. #define wszREGCACERTPUBLICATIONURLS  TEXT("CACertPublicationURLs")
  102. #define wszREGCAXCHGVALIDITYPERIODSTRING  TEXT("CAXchgValidityPeriod")
  103. #define wszREGCAXCHGVALIDITYPERIODCOUNT   TEXT("CAXchgValidityPeriodUnits")
  104. #define wszREGCAXCHGOVERLAPPERIODSTRING   TEXT("CAXchgOverlapPeriod")
  105. #define wszREGCAXCHGOVERLAPPERIODCOUNT    TEXT("CAXchgOverlapPeriodUnits")
  106. #define wszREGCRLPATH_OLD            TEXT("CRLPath")
  107. #define wszREGCRLEDITFLAGS      TEXT("CRLEditFlags")
  108. #define wszREGCRLFLAGS      TEXT("CRLFlags")
  109. #define wszREGCRLATTEMPTREPUBLISH    TEXT("CRLAttemptRepublish")
  110. #define wszREGENABLED      TEXT("Enabled")
  111. #define wszREGFORCETELETEX           TEXT("ForceTeletex")
  112. #define wszREGLOGLEVEL      TEXT("LogLevel")
  113. #define wszREGHIGHSERIAL      TEXT("HighSerial")
  114. #define wszREGPOLICYFLAGS      TEXT("PolicyFlags")
  115. #define wszREGNAMESEPARATOR          TEXT("SubjectNameSeparator")
  116. #define wszREGSUBJECTTEMPLATE      TEXT("SubjectTemplate")
  117. #define wszREGCAUSEDS      TEXT("UseDS")
  118. #define wszREGVALIDITYPERIODSTRING   TEXT("ValidityPeriod")
  119. #define wszREGVALIDITYPERIODCOUNT    TEXT("ValidityPeriodUnits")
  120. #define wszREGPARENTCAMACHINE        TEXT("ParentCAMachine")
  121. #define wszREGPARENTCANAME           TEXT("ParentCAName")
  122. #define wszREGREQUESTFILENAME        TEXT("RequestFileName")
  123. #define wszREGREQUESTID              TEXT("RequestId")
  124. #define wszREGREQUESTKEYCONTAINER    TEXT("RequestKeyContainer")
  125. #define wszREGREQUESTKEYINDEX        TEXT("RequestKeyIndex")
  126. #define wszREGCASERVERNAME           TEXT("CAServerName")
  127. #define wszREGCACERTFILENAME         TEXT("CACertFileName")
  128. #define wszREGCASECURITY             TEXT("Security")
  129. #define wszREGAUDITFILTER            TEXT("AuditFilter")
  130. #define wszREGOFFICERRIGHTS          TEXT("OfficerRights")
  131. #define wszREGMAXINCOMINGMESSAGESIZE TEXT("MaxIncomingMessageSize")
  132. #define wszREGROLESEPARATIONENABLED  TEXT("RoleSeparationEnabled")
  133. #define wszREGSETUPSTATUS            TEXT("SetupStatus")
  134. #define wszLOCKICERTREQUEST          TEXT("LockICertRequest")    
  135. #define wszREGDSCONFIGDN      TEXT("DSConfigDN")    
  136. #define wszREGDSDOMAINDN      TEXT("DSDomainDN")    
  137. #define wszPFXFILENAMEEXT      TEXT(".p12")
  138. #define wszDATFILENAMEEXT      TEXT(".dat")
  139. #define wszLOGFILENAMEEXT      TEXT(".log")
  140. #define wszPATFILENAMEEXT      TEXT(".pat")
  141. #define wszDBFILENAMEEXT      TEXT(".edb")
  142. #define szDBBASENAMEPARM      "edb"
  143. #define wszDBBASENAMEPARM      TEXT(szDBBASENAMEPARM)
  144. #define wszLOGPATH      TEXT("CertLog")
  145. #define wszDBBACKUPSUBDIR      TEXT("DataBase")
  146. #define wszDBBACKUPCERTBACKDAT      TEXT("certbkxp.dat")
  147. #ifndef __ENUM_CATYPES__
  148. #define __ENUM_CATYPES__
  149. // Values for wszREGCATYPE:
  150. typedef enum {
  151.     ENUM_ENTERPRISE_ROOTCA = 0,
  152.     ENUM_ENTERPRISE_SUBCA = 1,
  153.     //ENUM_UNUSED2 = 2,
  154.     ENUM_STANDALONE_ROOTCA = 3,
  155.     ENUM_STANDALONE_SUBCA = 4,
  156.     ENUM_UNKNOWN_CA = 5,
  157. } ENUM_CATYPES;
  158. #endif __ENUM_CATYPES__
  159. // Default value for wszREGCLOCKSKEWMINUTES
  160. #define CCLOCKSKEWMINUTESDEFAULT       10
  161. // Default validity period for ROOT CA certs:
  162. #define dwVALIDITYPERIODCOUNTDEFAULT_ROOT 5
  163. // Default validity periods for certs issued by a CA:
  164. #define dwVALIDITYPERIODCOUNTDEFAULT_ENTERPRISE 2
  165. #define dwVALIDITYPERIODCOUNTDEFAULT_STANDALONE 1
  166. #define dwVALIDITYPERIODENUMDEFAULT       ENUM_PERIOD_YEARS
  167. #define wszVALIDITYPERIODSTRINGDEFAULT       wszPERIODYEARS
  168. #define dwCAXCHGVALIDITYPERIODCOUNTDEFAULT    1
  169. #define dwCAXCHGVALIDITYPERIODENUMDEFAULT     ENUM_PERIOD_WEEKS
  170. #define wszCAXCHGVALIDITYPERIODSTRINGDEFAULT  wszPERIODWEEKS
  171. #define dwCAXCHGOVERLAPPERIODCOUNTDEFAULT     1
  172. #define dwCAXCHGOVERLAPPERIODENUMDEFAULT      ENUM_PERIOD_DAYS
  173. #define wszCAXCHGOVERLAPPERIODSTRINGDEFAULT   wszPERIODDAYS
  174. #define dwCRLPERIODCOUNTDEFAULT       1
  175. #define wszCRLPERIODSTRINGDEFAULT       wszPERIODWEEKS
  176. #define dwCRLOVERLAPPERIODCOUNTDEFAULT       0 // 0 --> disabled
  177. #define wszCRLOVERLAPPERIODSTRINGDEFAULT      wszPERIODHOURS
  178. #define dwCRLDELTAPERIODCOUNTDEFAULT          1
  179. #define wszCRLDELTAPERIODSTRINGDEFAULT        wszPERIODDAYS
  180. #define dwCRLDELTAOVERLAPPERIODCOUNTDEFAULT   0 // 0 --> disabled
  181. #define wszCRLDELTAOVERLAPPERIODSTRINGDEFAULT wszPERIODMINUTES
  182. // Values for wszREGLOGLEVEL:
  183. #define CERTLOG_MINIMAL (DWORD) 0
  184. #define CERTLOG_TERSE (DWORD) 1
  185. #define CERTLOG_ERROR (DWORD) 2
  186. #define CERTLOG_WARNING (DWORD) 3
  187. #define CERTLOG_VERBOSE (DWORD) 4
  188. // Values for wszREGSETUPSTATUS:
  189. #define SETUP_SERVER_FLAG 0x00000001 // server installed
  190. #define SETUP_CLIENT_FLAG 0x00000002 // client installed
  191. #define SETUP_SUSPEND_FLAG 0x00000004 // incomplete install
  192. #define SETUP_REQUEST_FLAG 0x00000008 // new cert requested
  193. #define SETUP_ONLINE_FLAG 0x00000010 // requested online
  194. #define SETUP_DENIED_FLAG 0x00000020 // request denied
  195. #define SETUP_CREATEDB_FLAG 0x00000040 // create new DB
  196. #define SETUP_ATTEMPT_VROOT_CREATE 0x00000080 // try to create vroots
  197. #define SETUP_FORCECRL_FLAG      0x00000100 // force new CRL(s)
  198. #define SETUP_UPDATE_CAOBJECT_SVRTYPE      0x00000200 // add server type to CA DS object "flags" attr
  199. #define SETUP_SERVER_UPGRADED_FLAG      0x00000400 // server was upgraded
  200. #define SETUP_W2K_SECURITY_NOT_UPGRADED_FLAG 0x00000800 // still need to upgrade security
  201. // Values for wszREGCRLFLAGS:
  202. #define CRLF_DELTA_USE_OLDEST_UNEXPIRED_BASE 0x00000001 // use oldest base:
  203. // else use newest base CRL that satisfies base CRL propagation delay
  204. #define CRLF_DELETE_EXPIRED_CRLS 0x00000002
  205. #define CRLF_CRLNUMBER_CRITICAL 0x00000004
  206. #define CRLF_REVCHECK_IGNORE_OFFLINE 0x00000008
  207. #define CRLF_IGNORE_INVALID_POLICIES 0x00000010
  208. #define CRLF_REBUILD_MODIFIED_SUBJECT_ONLY 0x00000020
  209. #define CRLF_SAVE_FAILED_CERTS 0x00000040
  210. #define CRLF_IGNORE_UNKNOWN_CMC_ATTRIBUTES 0x00000080
  211. #define CRLF_ACCEPT_OLDRFC_CMC 0x00000100
  212. #define CRLF_PUBLISH_EXPIRED_CERT_CRLS 0x00000200
  213. // Values for wszREGKRAFLAGS:
  214. #define KRAF_ENABLEFOREIGN 0x00000001 // allow foreign cert, key archival
  215. #define KRAF_SAVEBADREQUESTKEY 0x00000002 // save failed request w/archived key
  216. // Values for numeric prefixes for
  217. // wszREGCRLPUBLICATIONURLS and wszREGCACERTPUBLICATIONURLS:
  218. //
  219. // URL publication template Flags values, encoded as a decimal prefix for URL
  220. // publication templates in the registry:
  221. //   "1:c:winntSystem32CertSrvCertEnrollMyCA.crl"
  222. //   "2:http://MyServer.MyDomain.com/CertEnrollMyCA.crl"
  223. #define CSURL_SERVERPUBLISH 0x00000001
  224. #define CSURL_ADDTOCERTCDP 0x00000002
  225. #define CSURL_ADDTOFRESHESTCRL 0x00000004
  226. #define CSURL_ADDTOCRLCDP 0x00000008
  227. #define CSURL_PUBLISHRETRY 0x00000010
  228. #define CSURL_ADDTOCERTOCSP 0x00000020
  229. //======================================================================
  230. // Keys Under "CertSvcConfiguration<CAName>":
  231. #define wszREGKEYCSP TEXT("CSP")
  232. #define wszREGKEYENCRYPTIONCSP TEXT("EncryptionCSP")
  233. #define wszREGKEYEXITMODULES TEXT("ExitModules")
  234. #define wszREGKEYPOLICYMODULES         TEXT("PolicyModules")
  235. #define wszSECUREDATTRIBUTES TEXT("SignedAttributes")
  236. #define wszzDEFAULTSIGNEDATTRIBUTES     TEXT("RequesterName")
  237. //======================================================================
  238. // Values Under "CertSvcConfigurationRestoreInProgress":
  239. #define wszREGBACKUPLOGDIRECTORY TEXT("BackupLogDirectory")
  240. #define wszREGCHECKPOINTFILE TEXT("CheckPointFile")
  241. #define wszREGHIGHLOGNUMBER TEXT("HighLogNumber")
  242. #define wszREGLOWLOGNUMBER TEXT("LowLogNumber")
  243. #define wszREGLOGPATH TEXT("LogPath")
  244. #define wszREGRESTOREMAPCOUNT TEXT("RestoreMapCount")
  245. #define wszREGRESTOREMAP TEXT("RestoreMap")
  246. #define wszREGDATABASERECOVERED TEXT("DatabaseRecovered")
  247. #define wszREGRESTORESTATUS TEXT("RestoreStatus")
  248. // values under ConfigurationPolicyModules in nt5 beta 2
  249. #define wszREGB2ICERTMANAGEMODULE   TEXT("ICertManageModule")
  250. // values under Configuration in nt4 sp4
  251. #define wszREGSP4DEFAULTCONFIGURATION  TEXT("DefaultConfiguration")
  252. // values under ca in nt4 sp4
  253. #define wszREGSP4KEYSETNAME            TEXT("KeySetName")
  254. #define wszREGSP4SUBJECTNAMESEPARATOR  TEXT("SubjectNameSeparator")
  255. #define wszREGSP4NAMES                 TEXT("Names")
  256. #define wszREGSP4QUERIES               TEXT("Queries")
  257. // both nt4 sp4 and nt5 beta 2
  258. #define wszREGNETSCAPECERTTYPE         TEXT("NetscapeCertType")
  259. #define wszNETSCAPEREVOCATIONTYPE      TEXT("Netscape")
  260. //======================================================================
  261. // Values Under "CertSvcConfiguration<CAName>CSP":
  262. // and "CertSvcConfiguration<CAName>EncryptionCSP":
  263. #define wszREGPROVIDERTYPE     TEXT("ProviderType")
  264. #define wszREGPROVIDER         TEXT("Provider")
  265. #define wszHASHALGORITHM       TEXT("HashAlgorithm")
  266. #define wszENCRYPTIONALGORITHM TEXT("EncryptionAlgorithm")
  267. #define wszMACHINEKEYSET       TEXT("MachineKeyset")
  268. #define wszREGKEYSIZE        TEXT("KeySize")
  269. //======================================================================
  270. // Value strings for "CertSvcConfiguration<CAName>SubjectNameSeparator":
  271. #define szNAMESEPARATORDEFAULT   "n"
  272. #define wszNAMESEPARATORDEFAULT   TEXT(szNAMESEPARATORDEFAULT)
  273. //======================================================================
  274. // Value strings for "CertSvcConfiguration<CAName>ValidityPeriod", etc.:
  275. #define wszPERIODYEARS TEXT("Years")
  276. #define wszPERIODMONTHS TEXT("Months")
  277. #define wszPERIODWEEKS TEXT("Weeks")
  278. #define wszPERIODDAYS TEXT("Days")
  279. #define wszPERIODHOURS TEXT("Hours")
  280. #define wszPERIODMINUTES TEXT("Minutes")
  281. #define wszPERIODSECONDS TEXT("Seconds")
  282. //======================================================================
  283. // Values Under "CertSvcConfiguration<CAName>PolicyModules<ProgId>":
  284. #define wszREGISSUERCERTURLFLAGS    TEXT("IssuerCertURLFlags")
  285. #define wszREGEDITFLAGS     TEXT("EditFlags")
  286. #define wszREGSUBJECTALTNAME     TEXT("SubjectAltName")
  287. #define wszREGSUBJECTALTNAME2     TEXT("SubjectAltName2")
  288. #define wszREGREQUESTDISPOSITION    TEXT("RequestDisposition")
  289. #define wszREGCAPATHLENGTH     TEXT("CAPathLength")
  290. #define wszREGREVOCATIONTYPE     TEXT("RevocationType")
  291. #define wszREGLDAPREVOCATIONCRLURL_OLD TEXT("LDAPRevocationCRLURL")
  292. #define wszREGREVOCATIONCRLURL_OLD TEXT("RevocationCRLURL")
  293. #define wszREGFTPREVOCATIONCRLURL_OLD TEXT("FTPRevocationCRLURL")
  294. #define wszREGFILEREVOCATIONCRLURL_OLD TEXT("FileRevocationCRLURL")
  295. #define wszREGREVOCATIONURL TEXT("RevocationURL")
  296. #define wszREGLDAPISSUERCERTURL_OLD TEXT("LDAPIssuerCertURL")
  297. #define wszREGISSUERCERTURL_OLD TEXT("IssuerCertURL")
  298. #define wszREGFTPISSUERCERTURL_OLD TEXT("FTPIssuerCertURL")
  299. #define wszREGFILEISSUERCERTURL_OLD TEXT("FileIssuerCertURL")
  300. #define wszREGENABLEREQUESTEXTENSIONLIST  TEXT("EnableRequestExtensionList")
  301. #define wszREGDISABLEEXTENSIONLIST  TEXT("DisableExtensionList")
  302. #define wszREGDEFAULTSMIME TEXT("DefaultSMIME")
  303. // wszREGCAPATHLENGTH Values:
  304. #define CAPATHLENGTH_INFINITE 0xffffffff
  305. // wszREGREQUESTDISPOSITION Values:
  306. #define REQDISP_PENDING 0x00000000
  307. #define REQDISP_ISSUE 0x00000001
  308. #define REQDISP_DENY 0x00000002
  309. #define REQDISP_USEREQUESTATTRIBUTE 0x00000003
  310. #define REQDISP_MASK 0x000000ff
  311. #define REQDISP_PENDINGFIRST 0x00000100
  312. #define REQDISP_DEFAULT_STANDALONE (REQDISP_PENDINGFIRST | REQDISP_ISSUE)
  313. #define REQDISP_DEFAULT_ENTERPRISE (REQDISP_ISSUE)
  314. // wszREGREVOCATIONTYPE Values:
  315. #define REVEXT_CDPLDAPURL_OLD 0x00000001
  316. #define REVEXT_CDPHTTPURL_OLD 0x00000002
  317. #define REVEXT_CDPFTPURL_OLD 0x00000004
  318. #define REVEXT_CDPFILEURL_OLD 0x00000008
  319. #define REVEXT_CDPURLMASK_OLD 0x000000ff
  320. #define REVEXT_CDPENABLE 0x00000100
  321. #define REVEXT_ASPENABLE 0x00000200
  322. #define REVEXT_DEFAULT_NODS (REVEXT_CDPENABLE)
  323. #define REVEXT_DEFAULT_DS (REVEXT_CDPENABLE)
  324. // wszREGISSUERCERTURLFLAGS Values:
  325. #define ISSCERT_LDAPURL_OLD 0x00000001
  326. #define ISSCERT_HTTPURL_OLD 0x00000002
  327. #define ISSCERT_FTPURL_OLD 0x00000004
  328. #define ISSCERT_FILEURL_OLD 0x00000008
  329. #define ISSCERT_URLMASK_OLD 0x000000ff
  330. #define ISSCERT_ENABLE 0x00000100
  331. #define ISSCERT_DEFAULT_NODS (ISSCERT_ENABLE)
  332. #define ISSCERT_DEFAULT_DS (ISSCERT_ENABLE)
  333. // wszREGEDITFLAGS Values:    Defaults:
  334. // Under CA key: wszREGCRLEDITFLAGS Values (EDITF_ENABLEAKI* only):
  335. #define EDITF_ENABLEREQUESTEXTENSIONS 0x00000001 // neither
  336. #define EDITF_REQUESTEXTENSIONLIST 0x00000002 // Standalone
  337. #define EDITF_DISABLEEXTENSIONLIST 0x00000004 // both
  338. #define EDITF_ADDOLDKEYUSAGE 0x00000008 // both
  339. #define EDITF_ADDOLDCERTTYPE 0x00000010 // neither
  340. #define EDITF_ATTRIBUTEENDDATE 0x00000020 // Standalone
  341. #define EDITF_BASICCONSTRAINTSCRITICAL 0x00000040 // Standalone
  342. #define EDITF_BASICCONSTRAINTSCA 0x00000080 // Standalone
  343. #define EDITF_ENABLEAKIKEYID 0x00000100 // both
  344. #define EDITF_ATTRIBUTECA 0x00000200 // Standalone
  345. #define EDITF_IGNOREREQUESTERGROUP      0x00000400 // Standalone
  346. #define EDITF_ENABLEAKIISSUERNAME 0x00000800 // both
  347. #define EDITF_ENABLEAKIISSUERSERIAL 0x00001000 // both
  348. #define EDITF_ENABLEAKICRITICAL 0x00002000 // both
  349. #define EDITF_SERVERUPGRADED 0x00004000 // neither
  350. #define EDITF_ATTRIBUTEEKU 0x00008000 // Standalone
  351. #define EDITF_ENABLEDEFAULTSMIME 0x00010000 // Enterprise
  352. #define EDITF_DEFAULT_STANDALONE (EDITF_REQUESTEXTENSIONLIST | 
  353.  EDITF_DISABLEEXTENSIONLIST | 
  354.  EDITF_ADDOLDKEYUSAGE | 
  355.  EDITF_ATTRIBUTEENDDATE | 
  356.  EDITF_BASICCONSTRAINTSCRITICAL | 
  357.  EDITF_BASICCONSTRAINTSCA | 
  358.  EDITF_ENABLEAKIKEYID | 
  359.  EDITF_ATTRIBUTECA | 
  360.  EDITF_ATTRIBUTEEKU)
  361. #define EDITF_DEFAULT_ENTERPRISE (EDITF_REQUESTEXTENSIONLIST | 
  362.  EDITF_DISABLEEXTENSIONLIST | 
  363.                                          EDITF_BASICCONSTRAINTSCRITICAL | 
  364.                                          EDITF_ENABLEAKIKEYID | 
  365.  EDITF_ADDOLDKEYUSAGE | 
  366.  EDITF_ENABLEDEFAULTSMIME)
  367. //======================================================================
  368. // Values Under "CertSvcConfiguration<CAName>ExitModules<ProgId>":
  369. // LDAP based CRL and URL issuance
  370. #define wszREGLDAPREVOCATIONDN_OLD    TEXT("LDAPRevocationDN")
  371. #define wszREGLDAPREVOCATIONDNTEMPLATE_OLD TEXT("LDAPRevocationDNTemplate")
  372. #define wszCRLPUBLISHRETRYCOUNT    TEXT("CRLPublishRetryCount")
  373. #define wszREGCERTPUBLISHFLAGS     TEXT("PublishCertFlags")
  374. // wszREGCERTPUBLISHFLAGS Values:
  375. #define EXITPUB_FILE 0x00000001
  376. #define EXITPUB_ACTIVEDIRECTORY 0x00000002
  377. #define EXITPUB_EMAILNOTIFYALL 0x00000004
  378. #define EXITPUB_EMAILNOTIFYSMARTCARD 0x00000008
  379. #define EXITPUB_REMOVEOLDCERTS 0x00000010
  380. #define EXITPUB_DEFAULT_ENTERPRISE EXITPUB_ACTIVEDIRECTORY
  381. #define EXITPUB_DEFAULT_STANDALONE EXITPUB_FILE
  382. #define wszCLASS_CERTADMIN   TEXT("CertificateAuthority.Admin")
  383. #define wszCLASS_CERTCONFIG   TEXT("CertificateAuthority.Config")
  384. #define wszCLASS_CERTGETCONFIG   TEXT("CertificateAuthority.GetConfig")
  385. #define wszCLASS_CERTENCODE   TEXT("CertificateAuthority.Encode")
  386. #define wszCLASS_CERTREQUEST   TEXT("CertificateAuthority.Request")
  387. #define wszCLASS_CERTSERVEREXIT   TEXT("CertificateAuthority.ServerExit")
  388. #define wszCLASS_CERTSERVERPOLICY TEXT("CertificateAuthority.ServerPolicy")
  389. #define wszCLASS_CERTVIEW   TEXT("CertificateAuthority.View")
  390. // class name templates
  391. #define wszMICROSOFTCERTMODULE_PREFIX  TEXT("CertificateAuthority_MicrosoftDefault") 
  392. #define wszCERTEXITMODULE_POSTFIX TEXT(".Exit")
  393. #define wszCERTMANAGEEXIT_POSTFIX TEXT(".ExitManage")
  394. #define wszCERTPOLICYMODULE_POSTFIX TEXT(".Policy")
  395. #define wszCERTMANAGEPOLICY_POSTFIX TEXT(".PolicyManage")
  396. // actual policy/exit manage class names
  397. #define wszCLASS_CERTMANAGEEXITMODULE   wszMICROSOFTCERTMODULE_PREFIX wszCERTMANAGEEXIT_POSTFIX 
  398. #define wszCLASS_CERTMANAGEPOLICYMODULE wszMICROSOFTCERTMODULE_PREFIX wszCERTMANAGEPOLICY_POSTFIX 
  399. // actual policy/exit class names
  400. #define wszCLASS_CERTEXIT wszMICROSOFTCERTMODULE_PREFIX wszCERTEXITMODULE_POSTFIX
  401. #define wszCLASS_CERTPOLICY wszMICROSOFTCERTMODULE_PREFIX wszCERTPOLICYMODULE_POSTFIX
  402. #define wszCAPOLICYFILE L"CAPolicy.inf"
  403. #define wszINFSECTION_CDP L"CRLDistributionPoint"
  404. #define wszINFSECTION_AIA L"AuthorityInformationAccess"
  405. #define wszINFSECTION_EKU L"EnhancedKeyUsageExtension"
  406. #define wszINFSECTION_CCDP L"CrossCertificateDistributionPointsExtension"
  407. #define wszINFSECTION_CERTSERVER L"certsrv_server"
  408. #define wszINFKEY_RENEWALKEYLENGTH L"RenewalKeyLength"
  409. #define wszINFKEY_RENEWALVALIDITYPERIODSTRING L"RenewalValidityPeriod"
  410. #define wszINFKEY_RENEWALVALIDITYPERIODCOUNT L"RenewalValidityPeriodUnits"
  411. #define wszINFKEY_UTF8 L"UTF8"
  412. #define wszINFKEY_CRLPERIODSTRING wszREGCRLPERIODSTRING
  413. #define wszINFKEY_CRLPERIODCOUNT wszREGCRLPERIODCOUNT
  414. #define wszINFKEY_CRLDELTAPERIODSTRING wszREGCRLDELTAPERIODSTRING
  415. #define wszINFKEY_CRLDELTAPERIODCOUNT wszREGCRLDELTAPERIODCOUNT
  416. #define wszINFKEY_CRITICAL L"Critical"
  417. #define wszINFKEY_EMPTY L"Empty"
  418. #define wszINFKEY_CCDPSYNCDELTATIME L"SyncDeltaTime"
  419. #define wszINFSECTION_CAPOLICY L"CAPolicy"
  420. #define wszINFSECTION_POLICYSTATEMENT L"PolicyStatementExtension"
  421. #define wszINFSECTION_APPLICATIONPOLICYSTATEMENT L"ApplicationPolicyStatementExtension"
  422. #define wszINFKEY_POLICIES L"Policies"
  423. #define wszINFKEY_OID L"OID"
  424. #define wszINFKEY_NOTICE L"Notice"
  425. #define wszINFSECTION_REQUESTATTRIBUTES L"RequestAttributes"
  426. #define wszINFSECTION_NAMECONSTRAINTS L"NameConstraintsExtension"
  427. #define wszINFKEY_INCLUDE L"Include"
  428. #define wszINFKEY_EXCLUDE L"Exclude"
  429. #define wszINFKEY_UPN L"UPN"
  430. #define wszINFKEY_EMAIL L"EMail"
  431. #define wszINFKEY_DNS L"DNS"
  432. #define wszINFKEY_DIRECTORYNAME L"DirectoryName"
  433. #define wszINFKEY_URL L"URL"
  434. #define wszINFKEY_IPADDRESS L"IPAddress"
  435. #define wszINFKEY_REGISTEREDID L"RegisteredId"
  436. #define wszINFSECTION_POLICYMAPPINGS L"PolicyMappingsExtension"
  437. #define wszINFSECTION_APPLICATIONPOLICYMAPPINGS L"ApplicationPolicyMappingsExtension"
  438. #define wszINFSECTION_POLICYCONSTRAINTS L"PolicyConstraintsExtension"
  439. #define wszINFSECTION_APPLICATIONPOLICYCONSTRAINTS L"ApplicationPolicyConstraintsExtension"
  440. #define wszINFKEY_REQUIREEXPLICITPOLICY L"RequireExplicitPolicy"
  441. #define wszINFKEY_INHIBITPOLICYMAPPING L"InhibitPolicyMapping"
  442. #define wszINFSECTION_BASICCONSTRAINTS L"BasicConstraintsExtension"
  443. #define wszINFKEY_PATHLENGTH L"PathLength"
  444. // exit module mail support
  445. #define wszREGEXITSMTPKEY L"SMTP"
  446. #define wszREGEXITSMTPFROM L"From"
  447. #define wszREGEXITSMTPCC L"CC"
  448. #define wszREGEXITSMTPSUBJECT L"Subject"
  449. //+--------------------------------------------------------------------------
  450. // Name properties:
  451. #define wszPROPDISTINGUISHEDNAME   TEXT("DistinguishedName")
  452. #define wszPROPRAWNAME             TEXT("RawName")
  453. #define wszPROPCOUNTRY             TEXT("Country")
  454. #define wszPROPORGANIZATION        TEXT("Organization")
  455. #define wszPROPORGUNIT             TEXT("OrgUnit")
  456. #define wszPROPCOMMONNAME          TEXT("CommonName")
  457. #define wszPROPLOCALITY            TEXT("Locality")
  458. #define wszPROPSTATE               TEXT("State")
  459. #define wszPROPTITLE               TEXT("Title")
  460. #define wszPROPGIVENNAME           TEXT("GivenName")
  461. #define wszPROPINITIALS            TEXT("Initials")
  462. #define wszPROPSURNAME             TEXT("SurName")
  463. #define wszPROPDOMAINCOMPONENT     TEXT("DomainComponent")
  464. #define wszPROPEMAIL               TEXT("EMail")
  465. #define wszPROPSTREETADDRESS       TEXT("StreetAddress")
  466. #define wszPROPUNSTRUCTUREDNAME    TEXT("UnstructuredName")
  467. #define wszPROPUNSTRUCTUREDADDRESS TEXT("UnstructuredAddress")
  468. #define wszPROPDEVICESERIALNUMBER  TEXT("DeviceSerialNumber")
  469. //+--------------------------------------------------------------------------
  470. // Subject Name properties:
  471. #define wszPROPSUBJECTDOT     TEXT("Subject.")
  472. #define wszPROPSUBJECTDISTINGUISHEDNAME 
  473.     wszPROPSUBJECTDOT wszPROPDISTINGUISHEDNAME
  474. #define wszPROPSUBJECTRAWNAME       wszPROPSUBJECTDOT wszPROPRAWNAME
  475. #define wszPROPSUBJECTCOUNTRY       wszPROPSUBJECTDOT wszPROPCOUNTRY
  476. #define wszPROPSUBJECTORGANIZATION  wszPROPSUBJECTDOT wszPROPORGANIZATION
  477. #define wszPROPSUBJECTORGUNIT       wszPROPSUBJECTDOT wszPROPORGUNIT
  478. #define wszPROPSUBJECTCOMMONNAME    wszPROPSUBJECTDOT wszPROPCOMMONNAME
  479. #define wszPROPSUBJECTLOCALITY      wszPROPSUBJECTDOT wszPROPLOCALITY
  480. #define wszPROPSUBJECTSTATE         wszPROPSUBJECTDOT wszPROPSTATE
  481. #define wszPROPSUBJECTTITLE     wszPROPSUBJECTDOT wszPROPTITLE
  482. #define wszPROPSUBJECTGIVENNAME     wszPROPSUBJECTDOT wszPROPGIVENNAME
  483. #define wszPROPSUBJECTINITIALS     wszPROPSUBJECTDOT wszPROPINITIALS
  484. #define wszPROPSUBJECTSURNAME     wszPROPSUBJECTDOT wszPROPSURNAME
  485. #define wszPROPSUBJECTDOMAINCOMPONENT wszPROPSUBJECTDOT wszPROPDOMAINCOMPONENT
  486. #define wszPROPSUBJECTEMAIL     wszPROPSUBJECTDOT wszPROPEMAIL
  487. #define wszPROPSUBJECTSTREETADDRESS wszPROPSUBJECTDOT wszPROPSTREETADDRESS
  488. #define wszPROPSUBJECTUNSTRUCTUREDNAME wszPROPSUBJECTDOT wszPROPUNSTRUCTUREDNAME
  489. #define wszPROPSUBJECTUNSTRUCTUREDADDRESS wszPROPSUBJECTDOT wszPROPUNSTRUCTUREDADDRESS
  490. #define wszPROPSUBJECTDEVICESERIALNUMBER wszPROPSUBJECTDOT wszPROPDEVICESERIALNUMBER
  491. //+--------------------------------------------------------------------------
  492. // Request properties:
  493. #define wszPROPREQUESTDOT             TEXT("Request.")
  494. #define wszPROPREQUESTREQUESTID     TEXT("RequestID")
  495. #define wszPROPREQUESTRAWREQUEST     TEXT("RawRequest")
  496. #define wszPROPREQUESTRAWARCHIVEDKEY     TEXT("RawArchivedKey")
  497. #define wszPROPREQUESTKEYRECOVERYHASHES     TEXT("KeyRecoveryHashes")
  498. #define wszPROPREQUESTRAWOLDCERTIFICATE     TEXT("RawOldCertificate")
  499. #define wszPROPREQUESTATTRIBUTES     TEXT("RequestAttributes")
  500. #define wszPROPREQUESTTYPE     TEXT("RequestType")
  501. #define wszPROPREQUESTFLAGS     TEXT("RequestFlags")
  502. #define wszPROPREQUESTSTATUSCODE     TEXT("StatusCode")
  503. #define wszPROPREQUESTDISPOSITION     TEXT("Disposition")
  504. #define wszPROPREQUESTDISPOSITIONMESSAGE    TEXT("DispositionMessage")
  505. #define wszPROPREQUESTSUBMITTEDWHEN     TEXT("SubmittedWhen")
  506. #define wszPROPREQUESTRESOLVEDWHEN     TEXT("ResolvedWhen")
  507. #define wszPROPREQUESTREVOKEDWHEN     TEXT("RevokedWhen")
  508. #define wszPROPREQUESTREVOKEDEFFECTIVEWHEN  TEXT("RevokedEffectiveWhen")
  509. #define wszPROPREQUESTREVOKEDREASON     TEXT("RevokedReason")
  510. #define wszPROPREQUESTERNAME     TEXT("RequesterName")
  511. #define wszPROPCALLERNAME     TEXT("CallerName")
  512. #define wszPROPSIGNERPOLICIES     TEXT("SignerPolicies")
  513. #define wszPROPSIGNERAPPLICATIONPOLICIES    TEXT("SignerApplicationPolicies")
  514. //+--------------------------------------------------------------------------
  515. // Request attribute properties:
  516. #define wszPROPCHALLENGE TEXT("Challenge")
  517. #define wszPROPEXPECTEDCHALLENGE TEXT("ExpectedChallenge")
  518. #define wszPROPDISPOSITION TEXT("Disposition")
  519. #define wszPROPDISPOSITIONDENY TEXT("Deny")
  520. #define wszPROPDISPOSITIONPENDING TEXT("Pending")
  521. #define wszPROPVALIDITYPERIODSTRING TEXT("ValidityPeriod")
  522. #define wszPROPVALIDITYPERIODCOUNT TEXT("ValidityPeriodUnits")
  523. #define wszPROPCERTTYPE TEXT("CertType")
  524. #define wszPROPCERTTEMPLATE TEXT("CertificateTemplate")
  525. #define wszPROPCERTUSAGE TEXT("CertificateUsage")
  526. #define wszPROPREQUESTOSVERSION TEXT("RequestOSVersion")
  527. #define wszPROPREQUESTCSPPROVIDER       TEXT("RequestCSPProvider")
  528. #define wszPROPEXITCERTFILE TEXT("CertFile")
  529. #define wszPROPCLIENTBROWSERMACHINE TEXT("cbm")
  530. #define wszPROPCERTCLIENTMACHINE TEXT("ccm")
  531. //+--------------------------------------------------------------------------
  532. // "System" properties
  533. // ".#" means ".0", ".1", ".2" ... may be appended to the property name to
  534. // collect context specific values.  For some properties, the suffix selects
  535. // the CA certificate context.  For others, it selects the the CA CRL context.
  536. #define wszPROPCATYPE                   TEXT("CAType")
  537. #define wszPROPSANITIZEDCANAME          TEXT("SanitizedCAName")
  538. #define wszPROPSANITIZEDSHORTNAME       TEXT("SanitizedShortName")
  539. #define wszPROPMACHINEDNSNAME           TEXT("MachineDNSName")
  540. #define wszPROPMODULEREGLOC             TEXT("ModuleRegistryLocation")
  541. #define wszPROPUSEDS                    TEXT("fUseDS")
  542. #define wszPROPSERVERUPGRADED           TEXT("fServerUpgraded")
  543. #define wszPROPCONFIGDN TEXT("ConfigDN")
  544. #define wszPROPDOMAINDN TEXT("DomainDN")
  545. #define wszPROPLOGLEVEL TEXT("LogLevel")
  546. // Request Context properties:
  547. #define wszPROPREQUESTERCAACCESS TEXT("RequesterCAAccess")
  548. #define wszPROPUSERDN TEXT("UserDN")
  549. #define wszPROPTEMPLATECHANGESEQUENCENUMBER     TEXT("TemplateChangeSequenceNumber")
  550. // CA Certificate properties: (all ".#" extensible except wszPROPCERTCOUNT)
  551. #define wszPROPCERTCOUNT                TEXT("CertCount")
  552. #define wszPROPRAWCACERTIFICATE         TEXT("RawCACertificate")
  553. #define wszPROPCERTSTATE                TEXT("CertState")
  554. #define wszPROPCERTSUFFIX               TEXT("CertSuffix")
  555. // CA CRL properties: (all ".#" extensible)
  556. #define wszPROPRAWCRL                   TEXT("RawCRL")
  557. #define wszPROPRAWDELTACRL              TEXT("RawDeltaCRL")
  558. #define wszPROPCRLINDEX                 TEXT("CRLIndex")
  559. #define wszPROPCRLSTATE                 TEXT("CRLState")
  560. #define wszPROPCRLSUFFIX                TEXT("CRLSuffix")
  561. // Values for wszPROPCERTSTATE (see certadm.h):
  562. //   CA_DISP_REVOKED    // This Cert has been revoked.
  563. //   CA_DISP_VALID      // This Cert is still valid
  564. //   CA_DISP_INVALID    // This Cert has expired.
  565. //   CA_DISP_ERROR      // Cert unavailable (placehholder in registry?)
  566. // Values for wszPROPCRLSTATE (see certadm.h):
  567. //   CA_DISP_REVOKED // All unexpired certs using this Cert's CRL have been
  568. // // revoked.
  569. //   CA_DISP_VALID // This Cert is still publishing CRLs as needed.
  570. //   CA_DISP_INVALID    // All certs using this Cert's CRL are expired.
  571. //   CA_DISP_ERROR      // This Cert's CRL is managed by another Cert.
  572. // "Settable" system properties:
  573. #define wszPROPEVENTLOGTERSE TEXT("EventLogTerse")
  574. #define wszPROPEVENTLOGERROR TEXT("EventLogError")
  575. #define wszPROPEVENTLOGWARNING TEXT("EventLogWarning")
  576. #define wszPROPEVENTLOGVERBOSE TEXT("EventLogVerbose")
  577. //+--------------------------------------------------------------------------
  578. // Certificate properties:
  579. #define wszPROPCERTIFICATEREQUESTID        TEXT("RequestID")
  580. #define wszPROPRAWCERTIFICATE        TEXT("RawCertificate")
  581. #define wszPROPCERTIFICATEHASH        TEXT("CertificateHash")
  582. #define wszPROPCERTIFICATETEMPLATE        TEXT("CertificateTemplate")
  583. #define wszPROPCERTIFICATEENROLLMENTFLAGS      TEXT("EnrollmentFlags")
  584. #define wszPROPCERTIFICATEGENERALFLAGS         TEXT("GeneralFlags")
  585. #define wszPROPCERTIFICATESERIALNUMBER        TEXT("SerialNumber")
  586. #define wszPROPCERTIFICATENOTBEFOREDATE        TEXT("NotBefore")
  587. #define wszPROPCERTIFICATENOTAFTERDATE        TEXT("NotAfter")
  588. #define wszPROPCERTIFICATESUBJECTKEYIDENTIFIER TEXT("SubjectKeyIdentifier")
  589. #define wszPROPCERTIFICATERAWPUBLICKEY        TEXT("RawPublicKey")
  590. #define wszPROPCERTIFICATEPUBLICKEYLENGTH      TEXT("PublicKeyLength")
  591. #define wszPROPCERTIFICATEPUBLICKEYALGORITHM   TEXT("PublicKeyAlgorithm")
  592. #define wszPROPCERTIFICATERAWPUBLICKEYALGORITHMPARAMETERS 
  593.     TEXT("RawPublicKeyAlgorithmParameters")
  594. #define wszPROPCERTIFICATEUPN        TEXT("UPN")
  595. // Obsolete:
  596. #define wszPROPCERTIFICATETYPE        TEXT("CertificateType")
  597. #define wszPROPCERTIFICATERAWSMIMECAPABILITIES TEXT("RawSMIMECapabilities")
  598. #define wszPROPNAMETYPE        TEXT("NameType")
  599. //+--------------------------------------------------------------------------
  600. // Certificate extension properties:
  601. #define EXTENSION_CRITICAL_FLAG       0x00000001
  602. #define EXTENSION_DISABLE_FLAG       0x00000002
  603. #define EXTENSION_POLICY_MASK       0x0000ffff // Settable by admin+policy
  604. #define EXTENSION_ORIGIN_REQUEST      0x00010000
  605. #define EXTENSION_ORIGIN_POLICY       0x00020000
  606. #define EXTENSION_ORIGIN_ADMIN       0x00030000
  607. #define EXTENSION_ORIGIN_SERVER       0x00040000
  608. #define EXTENSION_ORIGIN_RENEWALCERT  0x00050000
  609. #define EXTENSION_ORIGIN_IMPORTEDCERT 0x00060000
  610. #define EXTENSION_ORIGIN_PKCS7       0x00070000
  611. #define EXTENSION_ORIGIN_CMC       0x00080000
  612. #define EXTENSION_ORIGIN_MASK       0x000f0000
  613. //+--------------------------------------------------------------------------
  614. // Extension properties:
  615. #define wszPROPEXTREQUESTID TEXT("ExtensionRequestId")
  616. #define wszPROPEXTNAME TEXT("ExtensionName")
  617. #define wszPROPEXTFLAGS TEXT("ExtensionFlags")
  618. #define wszPROPEXTRAWVALUE TEXT("ExtensionRawValue")
  619. //+--------------------------------------------------------------------------
  620. // Attribute properties:
  621. #define wszPROPATTRIBREQUESTID TEXT("AttributeRequestId")
  622. #define wszPROPATTRIBNAME TEXT("AttributeName")
  623. #define wszPROPATTRIBVALUE TEXT("AttributeValue")
  624. //+--------------------------------------------------------------------------
  625. // CRL properties:
  626. #define wszPROPCRLROWID TEXT("CRLRowId")
  627. #define wszPROPCRLNUMBER TEXT("CRLNumber")
  628. #define wszPROPCRLMINBASE TEXT("CRLMinBase") // Delta CRLs only
  629. #define wszPROPCRLNAMEID TEXT("CRLNameId")
  630. #define wszPROPCRLCOUNT TEXT("CRLCount")
  631. #define wszPROPCRLTHISUPDATE TEXT("CRLThisUpdate")
  632. #define wszPROPCRLNEXTUPDATE TEXT("CRLNextUpdate")
  633. #define wszPROPCRLTHISPUBLISH TEXT("CRLThisPublish")
  634. #define wszPROPCRLNEXTPUBLISH TEXT("CRLNextPublish")
  635. #define wszPROPCRLEFFECTIVE TEXT("CRLEffective")
  636. #define wszPROPCRLPROPAGATIONCOMPLETE TEXT("CRLPropagationComplete")
  637. #define wszPROPCRLLASTPUBLISHED TEXT("CRLLastPublished")
  638. #define wszPROPCRLPUBLISHATTEMPTS TEXT("CRLPublishAttempts")
  639. #define wszPROPCRLPUBLISHFLAGS TEXT("CRLPublishFlags")
  640. #define wszPROPCRLPUBLISHSTATUSCODE TEXT("CRLPublishStatusCode")
  641. #define wszPROPCRLPUBLISHERROR TEXT("CRLPublishError")
  642. #define wszPROPCRLRAWCRL TEXT("CRLRawCRL")
  643. //+--------------------------------------------------------------------------
  644. // CRL Published Flags:
  645. #define CPF_BASE 0x00000001
  646. #define CPF_DELTA 0x00000002
  647. #define CPF_COMPLETE 0x00000004
  648. #define CPF_SHADOW 0x00000008
  649. #define CPF_CASTORE_ERROR 0x00000010
  650. #define CPF_BADURL_ERROR 0x00000020
  651. #define CPF_MANUAL 0x00000040
  652. #define CPF_LDAP_ERROR 0x00000100
  653. #define CPF_FILE_ERROR 0x00000200
  654. #define CPF_FTP_ERROR 0x00000400
  655. #define CPF_HTTP_ERROR 0x00000800
  656. //+--------------------------------------------------------------------------
  657. // GetProperty/SetProperty Flags:
  658. //
  659. // Choose one Type
  660. #define PROPTYPE_LONG  0x00000001 // Signed long
  661. #define PROPTYPE_DATE  0x00000002 // Date+Time
  662. #define PROPTYPE_BINARY  0x00000003 // Binary data
  663. #define PROPTYPE_STRING  0x00000004 // Unicode String
  664. #define PROPTYPE_MASK  0x000000ff
  665. // Choose one Caller:
  666. #define PROPCALLER_SERVER  0x00000100
  667. #define PROPCALLER_POLICY  0x00000200
  668. #define PROPCALLER_EXIT  0x00000300
  669. #define PROPCALLER_ADMIN  0x00000400
  670. #define PROPCALLER_REQUEST  0x00000500
  671. #define PROPCALLER_MASK  0x00000f00
  672. #define PROPFLAGS_INDEXED  0x00010000
  673. // RequestFlags definitions:
  674. #define CR_FLG_FORCETELETEX  0x00000001
  675. #define CR_FLG_RENEWAL  0x00000002
  676. #define CR_FLG_FORCEUTF8  0x00000004
  677. #define CR_FLG_CAXCHGCERT  0x00000008
  678. #define CR_FLG_ENROLLONBEHALFOF  0x00000010
  679. #define CR_FLG_SUBJECTUNMODIFIED 0x00000020
  680. #define CR_FLG_OLDRFCCMC  0x40000000 // BUGBUG: temporary!!!
  681. #define CR_FLG_PUBLISHERROR  0x80000000
  682. // Disposition property values:
  683. // Disposition values for requests in the queue:
  684. #define DB_DISP_ACTIVE         8 // being processed
  685. #define DB_DISP_PENDING 9 // taken under submission
  686. #define DB_DISP_QUEUE_MAX 9 // max disposition value for queue view
  687. #define DB_DISP_FOREIGN 12 // archived foreign cert
  688. #define DB_DISP_CA_CERT 15 // CA cert
  689. #define DB_DISP_CA_CERT_CHAIN 16 // CA cert chain
  690. #define DB_DISP_KRA_CERT 17 // KRA cert
  691. // Disposition values for requests in the log:
  692. #define DB_DISP_LOG_MIN 20 // min disposition value for log view
  693. #define DB_DISP_ISSUED 20 // cert issued
  694. #define DB_DISP_REVOKED         21 // issued and revoked
  695. // Disposition values for failed requests in the log:
  696. #define DB_DISP_LOG_FAILED_MIN 30 // min disposition value for log view
  697. #define DB_DISP_ERROR 30 // request failed
  698. #define DB_DISP_DENIED 31 // request denied
  699. // VerifyRequest() return values
  700. #define VR_PENDING 0  // request will be accepted or denied later
  701. #define VR_INSTANT_OK 1  // request was accepted
  702. #define VR_INSTANT_BAD 2  // request was rejected
  703. //+--------------------------------------------------------------------------
  704. // Known request Attribute names and Value strings
  705. // RequestType attribute name:
  706. #define wszCERT_TYPE L"RequestType" // attribute name
  707. // RequestType attribute values:
  708. // Not specified:  // Non-specific certificate
  709. #define wszCERT_TYPE_CLIENT L"Client" // Client authentication cert
  710. #define wszCERT_TYPE_SERVER L"Server" // Server authentication cert
  711. #define wszCERT_TYPE_CODESIGN L"CodeSign" // Code signing certificate
  712. #define wszCERT_TYPE_CUSTOMER L"SetCustomer" // SET Customer certificate
  713. #define wszCERT_TYPE_MERCHANT L"SetMerchant" // SET Merchant certificate
  714. #define wszCERT_TYPE_PAYMENT L"SetPayment" // SET Payment certificate
  715. // Version attribute name:
  716. #define wszCERT_VERSION L"Version" // attribute name
  717. // Version attribute values:
  718. // Not specified:  // Whetever is current
  719. #define wszCERT_VERSION_1 L"1" // Version one certificate
  720. #define wszCERT_VERSION_2 L"2" // Version two certificate
  721. #define wszCERT_VERSION_3 L"3" // Version three certificate
  722. #endif // _CERTSRV_H_