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.

1049 lines
44 KiB

  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 "CertSvc\Configuration\":
  39. #define wszREGKEYCONFIGPATH wszREGKEYCERTSVCPATH TEXT("\\") wszREGKEYCONFIG
  40. #define wszREGKEYCONFIGPATH_BS wszREGKEYCONFIGPATH TEXT("\\")
  41. #define wszREGKEYCONFIGCANAME wszREGKEYCONFIGPATH_BS // obsolete definition
  42. //======================================================================
  43. // Full path to "CertSvc\Configuration\RestoreInProgress":
  44. #define wszREGKEYCONFIGRESTORE wszREGKEYCONFIGPATH_BS wszREGKEYRESTOREINPROGRESS
  45. //======================================================================
  46. // Key Under "CertSvc":
  47. #define wszREGKEYCONFIG TEXT("Configuration")
  48. //======================================================================
  49. // Values Under "CertSvc\Configuration":
  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 wszREGDBFLAGS TEXT("DBFlags")
  58. #define wszREGDBLASTFULLBACKUP TEXT("DBLastFullBackup")
  59. #define wszREGDBLASTINCREMENTALBACKUP TEXT("DBLastIncrementalBackup")
  60. #define wszREGDBLASTRECOVERY TEXT("DBLastRecovery")
  61. #define wszREGWEBCLIENTCAMACHINE TEXT("WebClientCAMachine")
  62. #define wszREGVERSION TEXT("Version")
  63. #define wszREGWEBCLIENTCANAME TEXT("WebClientCAName")
  64. #define wszREGWEBCLIENTCATYPE TEXT("WebClientCAType")
  65. #define wszREGLDAPFLAGS TEXT("LDAPFlags")
  66. #define wszREGCERTSRVDEBUG TEXT("Debug")
  67. // Default value for wszREGDBSESSIONCOUNT
  68. #define DBSESSIONCOUNTDEFAULT 20
  69. // Values for wszREGDBFLAGS
  70. // Default is zero (same as a missing registry value):
  71. #define DBFLAGS_READONLY 0x00000001 // ignored in registry
  72. #define DBFLAGS_CREATEIFNEEDED 0x00000002
  73. #define DBFLAGS_CIRCULARLOGGING 0x00000004
  74. #define DBFLAGS_LAZYFLUSH 0x00000008
  75. #define DBFLAGS_MAXCACHESIZEX100 0x00000010
  76. #define DBFLAGS_CHECKPOINTDEPTH60MB 0x00000020
  77. #define DBFLAGS_LOGBUFFERSLARGE 0x00000040
  78. #define DBFLAGS_LOGBUFFERSHUGE 0x00000080
  79. #define DBFLAGS_LOGFILESIZE16MB 0x00000100
  80. #define DBFLAGS_MULTITHREADTRANSACTIONS 0x00000200
  81. #define DBFLAGS_DISABLESNAPSHOTBACKUP 0x00000400 // ignored in registry
  82. #define DBFLAGS_DEFAULT (DBFLAGS_LAZYFLUSH | \
  83. DBFLAGS_MAXCACHESIZEX100 | \
  84. DBFLAGS_CHECKPOINTDEPTH60MB | \
  85. DBFLAGS_LOGBUFFERSHUGE)
  86. // Values for wszREGLDAPSSLFLAGS
  87. // Default is zero (same as a missing registry value):
  88. // 0: Don't use SSL, but sign all LDAP traffic.
  89. // 3: Use SSL but don't sign LDAP traffic.
  90. #define LDAPF_SSLENABLE 0x00000001 // use SSL for LDAP traffic
  91. #define LDAPF_SIGNDISABLE 0x00000002 // disable signing LDAP traffic
  92. // Default value for wszREGMAXINCOMINGMESSAGESIZE
  93. #define MAXINCOMINGMESSAGESIZEDEFAULT (64 * 1024)
  94. // Default value for wszREGMAXINCOMINGALLOCSIZE
  95. #define MAXINCOMINGALLOCSIZEDEFAULT (64 * 1024)
  96. // Value for wszREGVERSION:
  97. // win2k version
  98. #define CSVER_MAJOR_WIN2K 1 // actually this wasn't define in win2k
  99. #define CSVER_MINOR_WIN2K 1
  100. // whistler version
  101. #define CSVER_MAJOR_WHISTLER 2
  102. #define CSVER_MINOR_WHISTLER_BETA2 1
  103. #define CSVER_MINOR_WHISTLER_BETA3 2
  104. // current version
  105. #define CSVER_MAJOR CSVER_MAJOR_WHISTLER // high 16 bits
  106. #define CSVER_MINOR CSVER_MINOR_WHISTLER_BETA3 // low 16 bits
  107. // version manipulation
  108. #define CSVER_EXTRACT_MAJOR(version) ((version)>>16)
  109. #define CSVER_EXTRACT_MINOR(version) ((version)&0xffff)
  110. #define CSVER_BUILD_VERSION(major, minor) (((major)<<16)|(minor))
  111. // Keys Under "CertSvc\Configuration":
  112. #define wszREGKEYRESTOREINPROGRESS TEXT("RestoreInProgress")
  113. #define wszREGKEYDBPARAMETERS TEXT("DBParameters")
  114. //======================================================================
  115. // Values Under "CertSvc\Configuration\<CAName>":
  116. #define wszREGCADESCRIPTION TEXT("CADescription")
  117. #define wszREGCACERTHASH TEXT("CACertHash")
  118. #define wszREGCASERIALNUMBER TEXT("CACertSerialNumber")
  119. #define wszREGCAXCHGCERTHASH TEXT("CAXchgCertHash")
  120. #define wszREGKRACERTHASH TEXT("KRACertHash")
  121. #define wszREGKRACERTCOUNT TEXT("KRACertCount")
  122. #define wszREGKRAFLAGS TEXT("KRAFlags")
  123. #define wszREGCATYPE TEXT("CAType")
  124. #define wszREGCERTENROLLCOMPATIBLE TEXT("CertEnrollCompatible")
  125. #define wszREGENFORCEX500NAMELENGTHS TEXT("EnforceX500NameLengths")
  126. #define wszREGCOMMONNAME TEXT("CommonName")
  127. #define wszREGCLOCKSKEWMINUTES TEXT("ClockSkewMinutes")
  128. #define wszREGCRLNEXTPUBLISH TEXT("CRLNextPublish")
  129. #define wszREGCRLPERIODSTRING TEXT("CRLPeriod")
  130. #define wszREGCRLPERIODCOUNT TEXT("CRLPeriodUnits")
  131. #define wszREGCRLOVERLAPPERIODSTRING TEXT("CRLOverlapPeriod")
  132. #define wszREGCRLOVERLAPPERIODCOUNT TEXT("CRLOverlapUnits")
  133. #define wszREGCRLDELTANEXTPUBLISH TEXT("CRLDeltaNextPublish")
  134. #define wszREGCRLDELTAPERIODSTRING TEXT("CRLDeltaPeriod")
  135. #define wszREGCRLDELTAPERIODCOUNT TEXT("CRLDeltaPeriodUnits")
  136. #define wszREGCRLDELTAOVERLAPPERIODSTRING TEXT("CRLDeltaOverlapPeriod")
  137. #define wszREGCRLDELTAOVERLAPPERIODCOUNT TEXT("CRLDeltaOverlapUnits")
  138. #define wszREGCRLPUBLICATIONURLS TEXT("CRLPublicationURLs")
  139. #define wszREGCACERTPUBLICATIONURLS TEXT("CACertPublicationURLs")
  140. #define wszREGCAXCHGVALIDITYPERIODSTRING TEXT("CAXchgValidityPeriod")
  141. #define wszREGCAXCHGVALIDITYPERIODCOUNT TEXT("CAXchgValidityPeriodUnits")
  142. #define wszREGCAXCHGOVERLAPPERIODSTRING TEXT("CAXchgOverlapPeriod")
  143. #define wszREGCAXCHGOVERLAPPERIODCOUNT TEXT("CAXchgOverlapPeriodUnits")
  144. #define wszREGCRLPATH_OLD TEXT("CRLPath")
  145. #define wszREGCRLEDITFLAGS TEXT("CRLEditFlags")
  146. #define wszREGCRLFLAGS TEXT("CRLFlags")
  147. #define wszREGCRLATTEMPTREPUBLISH TEXT("CRLAttemptRepublish")
  148. #define wszREGENABLED TEXT("Enabled")
  149. #define wszREGFORCETELETEX TEXT("ForceTeletex")
  150. #define wszREGLOGLEVEL TEXT("LogLevel")
  151. #define wszREGHIGHSERIAL TEXT("HighSerial")
  152. #define wszREGPOLICYFLAGS TEXT("PolicyFlags")
  153. #define wszREGNAMESEPARATOR TEXT("SubjectNameSeparator")
  154. #define wszREGSUBJECTTEMPLATE TEXT("SubjectTemplate")
  155. #define wszREGCAUSEDS TEXT("UseDS")
  156. #define wszREGVALIDITYPERIODSTRING TEXT("ValidityPeriod")
  157. #define wszREGVALIDITYPERIODCOUNT TEXT("ValidityPeriodUnits")
  158. #define wszREGPARENTCAMACHINE TEXT("ParentCAMachine")
  159. #define wszREGPARENTCANAME TEXT("ParentCAName")
  160. #define wszREGREQUESTFILENAME TEXT("RequestFileName")
  161. #define wszREGREQUESTID TEXT("RequestId")
  162. #define wszREGREQUESTKEYCONTAINER TEXT("RequestKeyContainer")
  163. #define wszREGREQUESTKEYINDEX TEXT("RequestKeyIndex")
  164. #define wszREGCASERVERNAME TEXT("CAServerName")
  165. #define wszREGCACERTFILENAME TEXT("CACertFileName")
  166. #define wszREGCASECURITY TEXT("Security")
  167. #define wszREGAUDITFILTER TEXT("AuditFilter")
  168. #define wszREGOFFICERRIGHTS TEXT("OfficerRights")
  169. #define wszREGMAXINCOMINGMESSAGESIZE TEXT("MaxIncomingMessageSize")
  170. #define wszREGMAXINCOMINGALLOCSIZE TEXT("MaxIncomingAllocSize")
  171. #define wszREGROLESEPARATIONENABLED TEXT("RoleSeparationEnabled")
  172. #define wszREGALTERNATEPUBLISHDOMAINS TEXT("AlternatePublishDomains")
  173. #define wszREGSETUPSTATUS TEXT("SetupStatus")
  174. #define wszREGINTERFACEFLAGS TEXT("InterfaceFlags")
  175. #define wszREGDSCONFIGDN TEXT("DSConfigDN")
  176. #define wszREGDSDOMAINDN TEXT("DSDomainDN")
  177. #define wszREGVIEWAGEMINUTES TEXT("ViewAgeMinutes")
  178. #define wszREGVIEWIDLEMINUTES TEXT("ViewIdleMinutes")
  179. #define wszCRTFILENAMEEXT TEXT(".crt")
  180. #define wszPFXFILENAMEEXT TEXT(".p12")
  181. #define wszDATFILENAMEEXT TEXT(".dat")
  182. #define wszLOGFILENAMEEXT TEXT(".log")
  183. #define wszDBFILENAMEEXT TEXT(".edb")
  184. #define szDBBASENAMEPARM "edb"
  185. #define wszDBBASENAMEPARM TEXT(szDBBASENAMEPARM)
  186. #define wszLOGPATH TEXT("CertLog")
  187. #define wszDBBACKUPSUBDIR TEXT("DataBase")
  188. #define wszDBBACKUPCERTBACKDAT TEXT("certbkxp.dat")
  189. #ifndef __ENUM_CATYPES__
  190. #define __ENUM_CATYPES__
  191. // Values for wszREGCATYPE:
  192. typedef enum {
  193. ENUM_ENTERPRISE_ROOTCA = 0,
  194. ENUM_ENTERPRISE_SUBCA = 1,
  195. //ENUM_UNUSED2 = 2,
  196. ENUM_STANDALONE_ROOTCA = 3,
  197. ENUM_STANDALONE_SUBCA = 4,
  198. ENUM_UNKNOWN_CA = 5,
  199. } ENUM_CATYPES;
  200. typedef struct _CAINFO
  201. {
  202. DWORD cbSize;
  203. ENUM_CATYPES CAType;
  204. DWORD cCASignatureCerts;
  205. DWORD cCAExchangeCerts;
  206. DWORD cExitModules;
  207. LONG lPropIdMax;
  208. LONG lRoleSeparationEnabled;
  209. DWORD cKRACertUsedCount;
  210. DWORD cKRACertCount;
  211. DWORD fAdvancedServer;
  212. } CAINFO;
  213. #endif __ENUM_CATYPES__
  214. // Default value for wszREGCLOCKSKEWMINUTES
  215. #define CCLOCKSKEWMINUTESDEFAULT 10
  216. // Default value for wszREGVIEWAGEMINUTES, wszREGVIEWIDLEMINUTES
  217. #define CVIEWAGEMINUTESDEFAULT 16
  218. #define CVIEWIDLEMINUTESDEFAULT (CVIEWAGEMINUTESDEFAULT / 2)
  219. // Default validity period for ROOT CA certs:
  220. #define dwVALIDITYPERIODCOUNTDEFAULT_ROOT 5
  221. // Default validity periods for certs issued by a CA:
  222. #define dwVALIDITYPERIODCOUNTDEFAULT_ENTERPRISE 2
  223. #define dwVALIDITYPERIODCOUNTDEFAULT_STANDALONE 1
  224. #define dwVALIDITYPERIODENUMDEFAULT ENUM_PERIOD_YEARS
  225. #define wszVALIDITYPERIODSTRINGDEFAULT wszPERIODYEARS
  226. #define dwCAXCHGVALIDITYPERIODCOUNTDEFAULT 1
  227. #define dwCAXCHGVALIDITYPERIODENUMDEFAULT ENUM_PERIOD_WEEKS
  228. #define wszCAXCHGVALIDITYPERIODSTRINGDEFAULT wszPERIODWEEKS
  229. #define dwCAXCHGOVERLAPPERIODCOUNTDEFAULT 1
  230. #define dwCAXCHGOVERLAPPERIODENUMDEFAULT ENUM_PERIOD_DAYS
  231. #define wszCAXCHGOVERLAPPERIODSTRINGDEFAULT wszPERIODDAYS
  232. #define dwCRLPERIODCOUNTDEFAULT 1
  233. #define wszCRLPERIODSTRINGDEFAULT wszPERIODWEEKS
  234. #define dwCRLOVERLAPPERIODCOUNTDEFAULT 0 // 0 --> disabled
  235. #define wszCRLOVERLAPPERIODSTRINGDEFAULT wszPERIODHOURS
  236. #define dwCRLDELTAPERIODCOUNTDEFAULT 1
  237. #define wszCRLDELTAPERIODSTRINGDEFAULT wszPERIODDAYS
  238. #define dwCRLDELTAOVERLAPPERIODCOUNTDEFAULT 0 // 0 --> disabled
  239. #define wszCRLDELTAOVERLAPPERIODSTRINGDEFAULT wszPERIODMINUTES
  240. // Values for wszREGLOGLEVEL:
  241. #define CERTLOG_MINIMAL (DWORD) 0
  242. #define CERTLOG_TERSE (DWORD) 1
  243. #define CERTLOG_ERROR (DWORD) 2
  244. #define CERTLOG_WARNING (DWORD) 3
  245. #define CERTLOG_VERBOSE (DWORD) 4
  246. #define CERTLOG_EXHAUSTIVE (DWORD) 5
  247. // Values for wszREGSETUPSTATUS:
  248. #define SETUP_SERVER_FLAG 0x00000001 // server installed
  249. #define SETUP_CLIENT_FLAG 0x00000002 // client installed
  250. #define SETUP_SUSPEND_FLAG 0x00000004 // incomplete install
  251. #define SETUP_REQUEST_FLAG 0x00000008 // new cert requested
  252. #define SETUP_ONLINE_FLAG 0x00000010 // requested online
  253. #define SETUP_DENIED_FLAG 0x00000020 // request denied
  254. #define SETUP_CREATEDB_FLAG 0x00000040 // create new DB
  255. #define SETUP_ATTEMPT_VROOT_CREATE 0x00000080 // try to create vroots
  256. #define SETUP_FORCECRL_FLAG 0x00000100 // force new CRL(s)
  257. #define SETUP_UPDATE_CAOBJECT_SVRTYPE 0x00000200 // add server type to CA DS object "flags" attr
  258. #define SETUP_SERVER_UPGRADED_FLAG 0x00000400 // server was upgraded
  259. #define SETUP_W2K_SECURITY_NOT_UPGRADED_FLAG 0x00000800 // still need to upgrade security
  260. #define SETUP_SECURITY_CHANGED 0x00001000 // permissons changed while CA was down, certsrv will
  261. // need to update DS & service when it restarts
  262. // Values for wszREGCRLFLAGS:
  263. #define CRLF_DELTA_USE_OLDEST_UNEXPIRED_BASE 0x00000001 // use oldest base:
  264. // else use newest base CRL that satisfies base CRL propagation delay
  265. #define CRLF_DELETE_EXPIRED_CRLS 0x00000002
  266. #define CRLF_CRLNUMBER_CRITICAL 0x00000004
  267. #define CRLF_REVCHECK_IGNORE_OFFLINE 0x00000008
  268. #define CRLF_IGNORE_INVALID_POLICIES 0x00000010
  269. #define CRLF_REBUILD_MODIFIED_SUBJECT_ONLY 0x00000020
  270. #define CRLF_SAVE_FAILED_CERTS 0x00000040
  271. #define CRLF_IGNORE_UNKNOWN_CMC_ATTRIBUTES 0x00000080
  272. #define CRLF_IGNORE_CROSS_CERT_TRUST_ERROR 0x00000100
  273. #define CRLF_PUBLISH_EXPIRED_CERT_CRLS 0x00000200
  274. #define CRLF_ENFORCE_ENROLLMENT_AGENT 0x00000400
  275. #define CRLF_DISABLE_RDN_REORDER 0x00000800
  276. #define CRLF_DISABLE_ROOT_CROSS_CERTS 0x00001000
  277. #define CRLF_LOG_FULL_RESPONSE 0x00002000 // hex dump response to console
  278. #define CRLF_USE_XCHG_CERT_TEMPLATE 0x00004000 // enforce xchg template access
  279. #define CRLF_USE_CROSS_CERT_TEMPLATE 0x00008000 // enforce cross template access
  280. #define CRLF_ALLOW_REQUEST_ATTRIBUTE_SUBJECT 0x00010000
  281. #define CRLF_REVCHECK_IGNORE_NOREVCHECK 0x00020000
  282. #define CRLF_PRESERVE_EXPIRED_CA_CERTS 0x00040000
  283. #define CRLF_PRESERVE_REVOKED_CA_CERTS 0x00080000
  284. // Values for wszREGKRAFLAGS:
  285. #define KRAF_ENABLEFOREIGN 0x00000001 // allow foreign cert, key archival
  286. #define KRAF_SAVEBADREQUESTKEY 0x00000002 // save failed request w/archived key
  287. #define KRAF_ENABLEARCHIVEALL 0x00000004
  288. // Values for wszREGINTERFACEFLAGS:
  289. #define IF_LOCKICERTREQUEST 0x00000001
  290. #define IF_NOREMOTEICERTREQUEST 0x00000002
  291. #define IF_NOLOCALICERTREQUEST 0x00000004
  292. #define IF_NORPCICERTREQUEST 0x00000008
  293. #define IF_NOREMOTEICERTADMIN 0x00000010
  294. #define IF_NOLOCALICERTADMIN 0x00000020
  295. #define IF_NOREMOTEICERTADMINBACKUP 0x00000040
  296. #define IF_NOLOCALICERTADMINBACKUP 0x00000080
  297. #define IF_NOSNAPSHOTBACKUP 0x00000100
  298. #define IF_ENFORCEENCRYPTICERTREQUEST 0x00000200
  299. #define IF_ENFORCEENCRYPTICERTADMIN 0x00000400
  300. #define IF_DEFAULT (IF_NOREMOTEICERTADMINBACKUP)
  301. // Values for numeric prefixes for
  302. // wszREGCRLPUBLICATIONURLS and wszREGCACERTPUBLICATIONURLS:
  303. //
  304. // URL publication template Flags values, encoded as a decimal prefix for URL
  305. // publication templates in the registry:
  306. // "1:c:\winnt\System32\CertSrv\CertEnroll\MyCA.crl"
  307. // "2:http:\//MyServer.MyDomain.com/CertEnroll\MyCA.crl"
  308. #define CSURL_SERVERPUBLISH 0x00000001
  309. #define CSURL_ADDTOCERTCDP 0x00000002
  310. #define CSURL_ADDTOFRESHESTCRL 0x00000004
  311. #define CSURL_ADDTOCRLCDP 0x00000008
  312. #define CSURL_PUBLISHRETRY 0x00000010
  313. #define CSURL_ADDTOCERTOCSP 0x00000020
  314. #define CSURL_SERVERPUBLISHDELTA 0x00000040
  315. //======================================================================
  316. // Keys Under "CertSvc\Configuration\<CAName>":
  317. #define wszREGKEYCSP TEXT("CSP")
  318. #define wszREGKEYENCRYPTIONCSP TEXT("EncryptionCSP")
  319. #define wszREGKEYEXITMODULES TEXT("ExitModules")
  320. #define wszREGKEYPOLICYMODULES TEXT("PolicyModules")
  321. #define wszSECUREDATTRIBUTES TEXT("SignedAttributes")
  322. #define wszzDEFAULTSIGNEDATTRIBUTES TEXT("RequesterName\0")
  323. //======================================================================
  324. // Values Under "CertSvc\Configuration\RestoreInProgress":
  325. #define wszREGBACKUPLOGDIRECTORY TEXT("BackupLogDirectory")
  326. #define wszREGCHECKPOINTFILE TEXT("CheckPointFile")
  327. #define wszREGHIGHLOGNUMBER TEXT("HighLogNumber")
  328. #define wszREGLOWLOGNUMBER TEXT("LowLogNumber")
  329. #define wszREGLOGPATH TEXT("LogPath")
  330. #define wszREGRESTOREMAPCOUNT TEXT("RestoreMapCount")
  331. #define wszREGRESTOREMAP TEXT("RestoreMap")
  332. #define wszREGDATABASERECOVERED TEXT("DatabaseRecovered")
  333. #define wszREGRESTORESTATUS TEXT("RestoreStatus")
  334. // values under \Configuration\PolicyModules in nt5 beta 2
  335. #define wszREGB2ICERTMANAGEMODULE TEXT("ICertManageModule")
  336. // values under \Configuration in nt4 sp4
  337. #define wszREGSP4DEFAULTCONFIGURATION TEXT("DefaultConfiguration")
  338. // values under ca in nt4 sp4
  339. #define wszREGSP4KEYSETNAME TEXT("KeySetName")
  340. #define wszREGSP4SUBJECTNAMESEPARATOR TEXT("SubjectNameSeparator")
  341. #define wszREGSP4NAMES TEXT("Names")
  342. #define wszREGSP4QUERIES TEXT("Queries")
  343. // both nt4 sp4 and nt5 beta 2
  344. #define wszREGNETSCAPECERTTYPE TEXT("NetscapeCertType")
  345. #define wszNETSCAPEREVOCATIONTYPE TEXT("Netscape")
  346. //======================================================================
  347. // Values Under "CertSvc\Configuration\<CAName>\CSP":
  348. // and "CertSvc\Configuration\<CAName>\EncryptionCSP":
  349. #define wszREGPROVIDERTYPE TEXT("ProviderType")
  350. #define wszREGPROVIDER TEXT("Provider")
  351. #define wszHASHALGORITHM TEXT("HashAlgorithm")
  352. #define wszENCRYPTIONALGORITHM TEXT("EncryptionAlgorithm")
  353. #define wszMACHINEKEYSET TEXT("MachineKeyset")
  354. #define wszREGKEYSIZE TEXT("KeySize")
  355. //======================================================================
  356. // Value strings for "CertSvc\Configuration\<CAName>\SubjectNameSeparator":
  357. #define szNAMESEPARATORDEFAULT "\n"
  358. #define wszNAMESEPARATORDEFAULT TEXT(szNAMESEPARATORDEFAULT)
  359. //======================================================================
  360. // Value strings for "CertSvc\Configuration\<CAName>\ValidityPeriod", etc.:
  361. #define wszPERIODYEARS TEXT("Years")
  362. #define wszPERIODMONTHS TEXT("Months")
  363. #define wszPERIODWEEKS TEXT("Weeks")
  364. #define wszPERIODDAYS TEXT("Days")
  365. #define wszPERIODHOURS TEXT("Hours")
  366. #define wszPERIODMINUTES TEXT("Minutes")
  367. #define wszPERIODSECONDS TEXT("Seconds")
  368. //======================================================================
  369. // Values Under "CertSvc\Configuration\<CAName>\PolicyModules\<ProgId>":
  370. #define wszREGISSUERCERTURLFLAGS TEXT("IssuerCertURLFlags")
  371. #define wszREGEDITFLAGS TEXT("EditFlags")
  372. #define wszREGSUBJECTALTNAME TEXT("SubjectAltName")
  373. #define wszREGSUBJECTALTNAME2 TEXT("SubjectAltName2")
  374. #define wszREGREQUESTDISPOSITION TEXT("RequestDisposition")
  375. #define wszREGCAPATHLENGTH TEXT("CAPathLength")
  376. #define wszREGREVOCATIONTYPE TEXT("RevocationType")
  377. #define wszREGLDAPREVOCATIONCRLURL_OLD TEXT("LDAPRevocationCRLURL")
  378. #define wszREGREVOCATIONCRLURL_OLD TEXT("RevocationCRLURL")
  379. #define wszREGFTPREVOCATIONCRLURL_OLD TEXT("FTPRevocationCRLURL")
  380. #define wszREGFILEREVOCATIONCRLURL_OLD TEXT("FileRevocationCRLURL")
  381. #define wszREGREVOCATIONURL TEXT("RevocationURL")
  382. #define wszREGLDAPISSUERCERTURL_OLD TEXT("LDAPIssuerCertURL")
  383. #define wszREGISSUERCERTURL_OLD TEXT("IssuerCertURL")
  384. #define wszREGFTPISSUERCERTURL_OLD TEXT("FTPIssuerCertURL")
  385. #define wszREGFILEISSUERCERTURL_OLD TEXT("FileIssuerCertURL")
  386. #define wszREGENABLEREQUESTEXTENSIONLIST TEXT("EnableRequestExtensionList")
  387. #define wszREGENABLEENROLLEEREQUESTEXTENSIONLIST TEXT("EnableEnrolleeRequestExtensionList")
  388. #define wszREGDISABLEEXTENSIONLIST TEXT("DisableExtensionList")
  389. #define wszREGDEFAULTSMIME TEXT("DefaultSMIME")
  390. // wszREGCAPATHLENGTH Values:
  391. #define CAPATHLENGTH_INFINITE 0xffffffff
  392. // wszREGREQUESTDISPOSITION Values:
  393. #define REQDISP_PENDING 0x00000000
  394. #define REQDISP_ISSUE 0x00000001
  395. #define REQDISP_DENY 0x00000002
  396. #define REQDISP_USEREQUESTATTRIBUTE 0x00000003
  397. #define REQDISP_MASK 0x000000ff
  398. #define REQDISP_PENDINGFIRST 0x00000100
  399. #define REQDISP_DEFAULT_STANDALONE (REQDISP_PENDINGFIRST | REQDISP_ISSUE)
  400. #define REQDISP_DEFAULT_ENTERPRISE (REQDISP_ISSUE)
  401. // wszREGREVOCATIONTYPE Values:
  402. #define REVEXT_CDPLDAPURL_OLD 0x00000001
  403. #define REVEXT_CDPHTTPURL_OLD 0x00000002
  404. #define REVEXT_CDPFTPURL_OLD 0x00000004
  405. #define REVEXT_CDPFILEURL_OLD 0x00000008
  406. #define REVEXT_CDPURLMASK_OLD 0x000000ff
  407. #define REVEXT_CDPENABLE 0x00000100
  408. #define REVEXT_ASPENABLE 0x00000200
  409. #define REVEXT_DEFAULT_NODS (REVEXT_CDPENABLE)
  410. #define REVEXT_DEFAULT_DS (REVEXT_CDPENABLE)
  411. // wszREGISSUERCERTURLFLAGS Values:
  412. #define ISSCERT_LDAPURL_OLD 0x00000001
  413. #define ISSCERT_HTTPURL_OLD 0x00000002
  414. #define ISSCERT_FTPURL_OLD 0x00000004
  415. #define ISSCERT_FILEURL_OLD 0x00000008
  416. #define ISSCERT_URLMASK_OLD 0x000000ff
  417. #define ISSCERT_ENABLE 0x00000100
  418. #define ISSCERT_DEFAULT_NODS (ISSCERT_ENABLE)
  419. #define ISSCERT_DEFAULT_DS (ISSCERT_ENABLE)
  420. // wszREGEDITFLAGS Values: Defaults:
  421. // Under CA key: wszREGCRLEDITFLAGS Values (EDITF_ENABLEAKI* only):
  422. #define EDITF_ENABLEREQUESTEXTENSIONS 0x00000001 // neither
  423. #define EDITF_REQUESTEXTENSIONLIST 0x00000002 // both
  424. #define EDITF_DISABLEEXTENSIONLIST 0x00000004 // both
  425. #define EDITF_ADDOLDKEYUSAGE 0x00000008 // both
  426. #define EDITF_ADDOLDCERTTYPE 0x00000010 // neither
  427. #define EDITF_ATTRIBUTEENDDATE 0x00000020 // Standalone
  428. #define EDITF_BASICCONSTRAINTSCRITICAL 0x00000040 // both
  429. #define EDITF_BASICCONSTRAINTSCA 0x00000080 // Standalone
  430. #define EDITF_ENABLEAKIKEYID 0x00000100 // both
  431. #define EDITF_ATTRIBUTECA 0x00000200 // Standalone
  432. #define EDITF_IGNOREREQUESTERGROUP 0x00000400 // neither
  433. #define EDITF_ENABLEAKIISSUERNAME 0x00000800 // neither
  434. #define EDITF_ENABLEAKIISSUERSERIAL 0x00001000 // neither
  435. #define EDITF_ENABLEAKICRITICAL 0x00002000 // neither
  436. #define EDITF_SERVERUPGRADED 0x00004000 // neither
  437. #define EDITF_ATTRIBUTEEKU 0x00008000 // Standalone
  438. #define EDITF_ENABLEDEFAULTSMIME 0x00010000 // Enterprise
  439. #define EDITF_EMAILOPTIONAL 0x00020000 // neither
  440. #define EDITF_ATTRIBUTESUBJECTALTNAME2 0x00040000 // neither
  441. #define EDITF_ENABLELDAPREFERRALS 0x00080000 // neither
  442. #define EDITF_ENABLECHASECLIENTDC 0x00100000 // Enterprise
  443. #define EDITF_DEFAULT_STANDALONE (EDITF_REQUESTEXTENSIONLIST | \
  444. EDITF_DISABLEEXTENSIONLIST | \
  445. EDITF_ADDOLDKEYUSAGE | \
  446. EDITF_ATTRIBUTEENDDATE | \
  447. EDITF_BASICCONSTRAINTSCRITICAL | \
  448. EDITF_BASICCONSTRAINTSCA | \
  449. EDITF_ENABLEAKIKEYID | \
  450. EDITF_ATTRIBUTECA | \
  451. EDITF_ATTRIBUTEEKU)
  452. #define EDITF_DEFAULT_ENTERPRISE (EDITF_REQUESTEXTENSIONLIST | \
  453. EDITF_DISABLEEXTENSIONLIST | \
  454. EDITF_ADDOLDKEYUSAGE | \
  455. EDITF_BASICCONSTRAINTSCRITICAL | \
  456. EDITF_ENABLEAKIKEYID | \
  457. EDITF_ENABLEDEFAULTSMIME | \
  458. EDITF_ENABLECHASECLIENTDC)
  459. //======================================================================
  460. // Values Under "CertSvc\Configuration\<CAName>\ExitModules\<ProgId>":
  461. // LDAP based CRL and URL issuance
  462. #define wszREGLDAPREVOCATIONDN_OLD TEXT("LDAPRevocationDN")
  463. #define wszREGLDAPREVOCATIONDNTEMPLATE_OLD TEXT("LDAPRevocationDNTemplate")
  464. #define wszCRLPUBLISHRETRYCOUNT TEXT("CRLPublishRetryCount")
  465. #define wszREGCERTPUBLISHFLAGS TEXT("PublishCertFlags")
  466. // wszREGCERTPUBLISHFLAGS Values:
  467. #define EXITPUB_FILE 0x00000001
  468. #define EXITPUB_ACTIVEDIRECTORY 0x00000002
  469. #define EXITPUB_REMOVEOLDCERTS 0x00000010
  470. #define EXITPUB_DEFAULT_ENTERPRISE EXITPUB_ACTIVEDIRECTORY
  471. #define EXITPUB_DEFAULT_STANDALONE EXITPUB_FILE
  472. #define wszCLASS_CERTADMIN TEXT("CertificateAuthority.Admin")
  473. #define wszCLASS_CERTCONFIG TEXT("CertificateAuthority.Config")
  474. #define wszCLASS_CERTGETCONFIG TEXT("CertificateAuthority.GetConfig")
  475. #define wszCLASS_CERTENCODE TEXT("CertificateAuthority.Encode")
  476. #define wszCLASS_CERTREQUEST TEXT("CertificateAuthority.Request")
  477. #define wszCLASS_CERTSERVEREXIT TEXT("CertificateAuthority.ServerExit")
  478. #define wszCLASS_CERTSERVERPOLICY TEXT("CertificateAuthority.ServerPolicy")
  479. #define wszCLASS_CERTVIEW TEXT("CertificateAuthority.View")
  480. // class name templates
  481. #define wszMICROSOFTCERTMODULE_PREFIX TEXT("CertificateAuthority_MicrosoftDefault")
  482. #define wszCERTMANAGE_SUFFIX TEXT("Manage")
  483. #define wszCERTEXITMODULE_POSTFIX TEXT(".Exit")
  484. #define wszCERTMANAGEEXIT_POSTFIX wszCERTEXITMODULE_POSTFIX wszCERTMANAGE_SUFFIX
  485. #define wszCERTPOLICYMODULE_POSTFIX TEXT(".Policy")
  486. #define wszCERTMANAGEPOLICY_POSTFIX wszCERTPOLICYMODULE_POSTFIX wszCERTMANAGE_SUFFIX
  487. // actual policy/exit manage class names
  488. #define wszCLASS_CERTMANAGEEXITMODULE wszMICROSOFTCERTMODULE_PREFIX wszCERTMANAGEEXIT_POSTFIX
  489. #define wszCLASS_CERTMANAGEPOLICYMODULE wszMICROSOFTCERTMODULE_PREFIX wszCERTMANAGEPOLICY_POSTFIX
  490. // actual policy/exit class names
  491. #define wszCLASS_CERTEXIT wszMICROSOFTCERTMODULE_PREFIX wszCERTEXITMODULE_POSTFIX
  492. #define wszCLASS_CERTPOLICY wszMICROSOFTCERTMODULE_PREFIX wszCERTPOLICYMODULE_POSTFIX
  493. #define wszCAPOLICYFILE L"CAPolicy.inf"
  494. #define wszINFSECTION_CDP L"CRLDistributionPoint"
  495. #define wszINFSECTION_AIA L"AuthorityInformationAccess"
  496. #define wszINFSECTION_EKU L"EnhancedKeyUsageExtension"
  497. #define wszINFSECTION_CCDP L"CrossCertificateDistributionPointsExtension"
  498. #define wszINFSECTION_CERTSERVER L"certsrv_server"
  499. #define wszINFKEY_RENEWALKEYLENGTH L"RenewalKeyLength"
  500. #define wszINFKEY_RENEWALVALIDITYPERIODSTRING L"RenewalValidityPeriod"
  501. #define wszINFKEY_RENEWALVALIDITYPERIODCOUNT L"RenewalValidityPeriodUnits"
  502. #define wszINFKEY_UTF8 L"UTF8"
  503. #define wszINFKEY_CRLPERIODSTRING wszREGCRLPERIODSTRING
  504. #define wszINFKEY_CRLPERIODCOUNT wszREGCRLPERIODCOUNT
  505. #define wszINFKEY_CRLDELTAPERIODSTRING wszREGCRLDELTAPERIODSTRING
  506. #define wszINFKEY_CRLDELTAPERIODCOUNT wszREGCRLDELTAPERIODCOUNT
  507. #define wszINFKEY_LOADDEFAULTTEMPLATES L"LoadDefaultTemplates"
  508. #define wszINFKEY_ENABLEKEYCOUNTING L"EnableKeyCounting"
  509. #define wszINFKEY_CRITICAL L"Critical"
  510. #define wszINFKEY_EMPTY L"Empty"
  511. #define wszINFKEY_CCDPSYNCDELTATIME L"SyncDeltaTime"
  512. #define wszINFSECTION_CAPOLICY L"CAPolicy"
  513. #define wszINFSECTION_POLICYSTATEMENT L"PolicyStatementExtension"
  514. #define wszINFSECTION_APPLICATIONPOLICYSTATEMENT L"ApplicationPolicyStatementExtension"
  515. #define wszINFKEY_POLICIES L"Policies"
  516. #define wszINFKEY_OID L"OID"
  517. #define wszINFKEY_NOTICE L"Notice"
  518. #define wszINFSECTION_REQUESTATTRIBUTES L"RequestAttributes"
  519. #define wszINFSECTION_NAMECONSTRAINTS L"NameConstraintsExtension"
  520. #define wszINFKEY_INCLUDE L"Include"
  521. #define wszINFKEY_EXCLUDE L"Exclude"
  522. #define wszINFKEY_UPN L"UPN"
  523. #define wszINFKEY_EMAIL L"EMail"
  524. #define wszINFKEY_DNS L"DNS"
  525. #define wszINFKEY_DIRECTORYNAME L"DirectoryName"
  526. #define wszINFKEY_URL L"URL"
  527. #define wszINFKEY_IPADDRESS L"IPAddress"
  528. #define wszINFKEY_REGISTEREDID L"RegisteredId"
  529. #define wszINFKEY_OTHERNAME L"OtherName"
  530. #define wszINFSECTION_POLICYMAPPINGS L"PolicyMappingsExtension"
  531. #define wszINFSECTION_APPLICATIONPOLICYMAPPINGS L"ApplicationPolicyMappingsExtension"
  532. #define wszINFSECTION_POLICYCONSTRAINTS L"PolicyConstraintsExtension"
  533. #define wszINFSECTION_APPLICATIONPOLICYCONSTRAINTS L"ApplicationPolicyConstraintsExtension"
  534. #define wszINFKEY_REQUIREEXPLICITPOLICY L"RequireExplicitPolicy"
  535. #define wszINFKEY_INHIBITPOLICYMAPPING L"InhibitPolicyMapping"
  536. #define wszINFSECTION_BASICCONSTRAINTS L"BasicConstraintsExtension"
  537. #define wszINFKEY_PATHLENGTH L"PathLength"
  538. //======================================================================
  539. // Values Under "CertSvc\Configuration\<CAName>\ExitModules\CertificateAuthority_MicrosoftDefault.Exit\SMTP":
  540. //
  541. // exit module mail support
  542. //
  543. #define wszREGEXITSMTPKEY L"SMTP"
  544. #define wszREGEXITSMTPTEMPLATES L"Templates"
  545. #define wszREGEXITSMTPEVENTFILTER L"EventFilter"
  546. #define wszREGEXITSMTPSERVER L"SMTPServer"
  547. #define wszREGEXITSMTPAUTHENTICATE L"SMTPAuthenticate"
  548. // Subkeys:
  549. #define wszREGEXITDENIEDKEY L"Denied"
  550. #define wszREGEXITISSUEDKEY L"Issued"
  551. #define wszREGEXITPENDINGKEY L"Pending"
  552. #define wszREGEXITREVOKEDKEY L"Revoked"
  553. #define wszREGEXITCRLISSUEDKEY L"CRLIssued"
  554. #define wszREGEXITSHUTDOWNKEY L"Shutdown"
  555. #define wszREGEXITSTARTUPKEY L"Startup"
  556. //======================================================================
  557. // Values Under
  558. // "CertSvc\Configuration\<CAName>\ExitModules\CertificateAuthority_MicrosoftDefault.Exit\SMTP\Issued|
  559. // Pending|Denied|Revoked|CRLIssued|Shutdown":
  560. #define wszREGEXITSMTPFROM L"From"
  561. #define wszREGEXITSMTPTO L"To"
  562. #define wszREGEXITSMTPCC L"Cc"
  563. #define wszREGEXITTITLEFORMAT L"TitleFormat"
  564. #define wszREGEXITTITLEARG L"TitleArg"
  565. #define wszREGEXITBODYFORMAT L"BodyFormat"
  566. #define wszREGEXITBODYARG L"BodyArg"
  567. #define wszREGEXITPROPNOTFOUND L"???"
  568. //+--------------------------------------------------------------------------
  569. // Name properties:
  570. #define wszPROPDISTINGUISHEDNAME TEXT("DistinguishedName")
  571. #define wszPROPRAWNAME TEXT("RawName")
  572. #define wszPROPCOUNTRY TEXT("Country")
  573. #define wszPROPORGANIZATION TEXT("Organization")
  574. #define wszPROPORGUNIT TEXT("OrgUnit")
  575. #define wszPROPCOMMONNAME TEXT("CommonName")
  576. #define wszPROPLOCALITY TEXT("Locality")
  577. #define wszPROPSTATE TEXT("State")
  578. #define wszPROPTITLE TEXT("Title")
  579. #define wszPROPGIVENNAME TEXT("GivenName")
  580. #define wszPROPINITIALS TEXT("Initials")
  581. #define wszPROPSURNAME TEXT("SurName")
  582. #define wszPROPDOMAINCOMPONENT TEXT("DomainComponent")
  583. #define wszPROPEMAIL TEXT("EMail")
  584. #define wszPROPSTREETADDRESS TEXT("StreetAddress")
  585. #define wszPROPUNSTRUCTUREDNAME TEXT("UnstructuredName")
  586. #define wszPROPUNSTRUCTUREDADDRESS TEXT("UnstructuredAddress")
  587. #define wszPROPDEVICESERIALNUMBER TEXT("DeviceSerialNumber")
  588. //+--------------------------------------------------------------------------
  589. // Subject Name properties:
  590. #define wszPROPSUBJECTDOT TEXT("Subject.")
  591. #define wszPROPSUBJECTDISTINGUISHEDNAME \
  592. wszPROPSUBJECTDOT wszPROPDISTINGUISHEDNAME
  593. #define wszPROPSUBJECTRAWNAME wszPROPSUBJECTDOT wszPROPRAWNAME
  594. #define wszPROPSUBJECTCOUNTRY wszPROPSUBJECTDOT wszPROPCOUNTRY
  595. #define wszPROPSUBJECTORGANIZATION wszPROPSUBJECTDOT wszPROPORGANIZATION
  596. #define wszPROPSUBJECTORGUNIT wszPROPSUBJECTDOT wszPROPORGUNIT
  597. #define wszPROPSUBJECTCOMMONNAME wszPROPSUBJECTDOT wszPROPCOMMONNAME
  598. #define wszPROPSUBJECTLOCALITY wszPROPSUBJECTDOT wszPROPLOCALITY
  599. #define wszPROPSUBJECTSTATE wszPROPSUBJECTDOT wszPROPSTATE
  600. #define wszPROPSUBJECTTITLE wszPROPSUBJECTDOT wszPROPTITLE
  601. #define wszPROPSUBJECTGIVENNAME wszPROPSUBJECTDOT wszPROPGIVENNAME
  602. #define wszPROPSUBJECTINITIALS wszPROPSUBJECTDOT wszPROPINITIALS
  603. #define wszPROPSUBJECTSURNAME wszPROPSUBJECTDOT wszPROPSURNAME
  604. #define wszPROPSUBJECTDOMAINCOMPONENT wszPROPSUBJECTDOT wszPROPDOMAINCOMPONENT
  605. #define wszPROPSUBJECTEMAIL wszPROPSUBJECTDOT wszPROPEMAIL
  606. #define wszPROPSUBJECTSTREETADDRESS wszPROPSUBJECTDOT wszPROPSTREETADDRESS
  607. #define wszPROPSUBJECTUNSTRUCTUREDNAME wszPROPSUBJECTDOT wszPROPUNSTRUCTUREDNAME
  608. #define wszPROPSUBJECTUNSTRUCTUREDADDRESS wszPROPSUBJECTDOT wszPROPUNSTRUCTUREDADDRESS
  609. #define wszPROPSUBJECTDEVICESERIALNUMBER wszPROPSUBJECTDOT wszPROPDEVICESERIALNUMBER
  610. //+--------------------------------------------------------------------------
  611. // Request properties:
  612. #define wszPROPREQUESTDOT TEXT("Request.")
  613. #define wszPROPREQUESTREQUESTID TEXT("RequestID")
  614. #define wszPROPREQUESTRAWREQUEST TEXT("RawRequest")
  615. #define wszPROPREQUESTRAWARCHIVEDKEY TEXT("RawArchivedKey")
  616. #define wszPROPREQUESTKEYRECOVERYHASHES TEXT("KeyRecoveryHashes")
  617. #define wszPROPREQUESTRAWOLDCERTIFICATE TEXT("RawOldCertificate")
  618. #define wszPROPREQUESTATTRIBUTES TEXT("RequestAttributes")
  619. #define wszPROPREQUESTTYPE TEXT("RequestType")
  620. #define wszPROPREQUESTFLAGS TEXT("RequestFlags")
  621. #define wszPROPREQUESTSTATUSCODE TEXT("StatusCode")
  622. #define wszPROPREQUESTDISPOSITION TEXT("Disposition")
  623. #define wszPROPREQUESTDISPOSITIONMESSAGE TEXT("DispositionMessage")
  624. #define wszPROPREQUESTSUBMITTEDWHEN TEXT("SubmittedWhen")
  625. #define wszPROPREQUESTRESOLVEDWHEN TEXT("ResolvedWhen")
  626. #define wszPROPREQUESTREVOKEDWHEN TEXT("RevokedWhen")
  627. #define wszPROPREQUESTREVOKEDEFFECTIVEWHEN TEXT("RevokedEffectiveWhen")
  628. #define wszPROPREQUESTREVOKEDREASON TEXT("RevokedReason")
  629. #define wszPROPREQUESTERNAME TEXT("RequesterName")
  630. #define wszPROPCALLERNAME TEXT("CallerName")
  631. #define wszPROPSIGNERPOLICIES TEXT("SignerPolicies")
  632. #define wszPROPSIGNERAPPLICATIONPOLICIES TEXT("SignerApplicationPolicies")
  633. #define wszPROPOFFICER TEXT("Officer")
  634. //+--------------------------------------------------------------------------
  635. // Request attribute properties:
  636. #define wszPROPCHALLENGE TEXT("Challenge")
  637. #define wszPROPEXPECTEDCHALLENGE TEXT("ExpectedChallenge")
  638. #define wszPROPDISPOSITION TEXT("Disposition")
  639. #define wszPROPDISPOSITIONDENY TEXT("Deny")
  640. #define wszPROPDISPOSITIONPENDING TEXT("Pending")
  641. #define wszPROPVALIDITYPERIODSTRING TEXT("ValidityPeriod")
  642. #define wszPROPVALIDITYPERIODCOUNT TEXT("ValidityPeriodUnits")
  643. #define wszPROPCERTTYPE TEXT("CertType")
  644. #define wszPROPCERTTEMPLATE TEXT("CertificateTemplate")
  645. #define wszPROPCERTUSAGE TEXT("CertificateUsage")
  646. #define wszPROPREQUESTOSVERSION TEXT("RequestOSVersion")
  647. #define wszPROPREQUESTCSPPROVIDER TEXT("RequestCSPProvider")
  648. #define wszPROPEXITCERTFILE TEXT("CertFile")
  649. #define wszPROPCLIENTBROWSERMACHINE TEXT("cbm")
  650. #define wszPROPCERTCLIENTMACHINE TEXT("ccm")
  651. #define wszPROPCLIENTDCDNS L"cdc"
  652. #define wszPROPREQUESTMACHINEDNS L"rmd"
  653. #define wszPROPSUBJECTALTNAME2 TEXT("san")
  654. #define wszPROPDNS TEXT("dns")
  655. #define wszPROPDN TEXT("dn")
  656. #define wszPROPURL TEXT("url")
  657. #define wszPROPIPADDRESS TEXT("ipaddress")
  658. #define wszPROPGUID TEXT("guid")
  659. #define wszPROPOID TEXT("oid")
  660. #define wszPROPUPN TEXT("upn")
  661. #define wszPROPUPN TEXT("upn")
  662. #define szPROPASNTAG "{asn}"
  663. #define wszPROPUTF8TAG TEXT("{utf8}")
  664. #define wszPROPOCTETTAG TEXT("{octet}")
  665. #define wszPROPASNTAG TEXT(szPROPASNTAG)
  666. //+--------------------------------------------------------------------------
  667. // "System" properties
  668. // ".#" means ".0", ".1", ".2" ... may be appended to the property name to
  669. // collect context specific values. For some properties, the suffix selects
  670. // the CA certificate context. For others, it selects the the CA CRL context.
  671. #define wszPROPCATYPE TEXT("CAType")
  672. #define wszPROPSANITIZEDCANAME TEXT("SanitizedCAName")
  673. #define wszPROPSANITIZEDSHORTNAME TEXT("SanitizedShortName")
  674. #define wszPROPMACHINEDNSNAME TEXT("MachineDNSName")
  675. #define wszPROPMODULEREGLOC TEXT("ModuleRegistryLocation")
  676. #define wszPROPUSEDS TEXT("fUseDS")
  677. #define wszPROPDELTACRLSDISABLED TEXT("fDeltaCRLsDisabled")
  678. #define wszPROPSERVERUPGRADED TEXT("fServerUpgraded")
  679. #define wszPROPCONFIGDN TEXT("ConfigDN")
  680. #define wszPROPDOMAINDN TEXT("DomainDN")
  681. #define wszPROPLOGLEVEL TEXT("LogLevel")
  682. #define wszPROPSESSIONCOUNT TEXT("SessionCount")
  683. #define wszPROPTEMPLATECHANGESEQUENCENUMBER TEXT("TemplateChangeSequenceNumber")
  684. // Request Context properties:
  685. #define wszPROPREQUESTERCAACCESS TEXT("RequesterCAAccess")
  686. #define wszPROPUSERDN TEXT("UserDN")
  687. #define wszPROPKEYARCHIVED TEXT("KeyArchived")
  688. // CA Certificate properties: (all ".#" extensible except wszPROPCERTCOUNT)
  689. #define wszPROPCERTCOUNT TEXT("CertCount")
  690. #define wszPROPRAWCACERTIFICATE TEXT("RawCACertificate")
  691. #define wszPROPCERTSTATE TEXT("CertState")
  692. #define wszPROPCERTSUFFIX TEXT("CertSuffix")
  693. // CA CRL properties: (all ".#" extensible)
  694. #define wszPROPRAWCRL TEXT("RawCRL")
  695. #define wszPROPRAWDELTACRL TEXT("RawDeltaCRL")
  696. #define wszPROPCRLINDEX TEXT("CRLIndex")
  697. #define wszPROPCRLSTATE TEXT("CRLState")
  698. #define wszPROPCRLSUFFIX TEXT("CRLSuffix")
  699. // Values for wszPROPCERTSTATE (see certadm.h):
  700. // CA_DISP_REVOKED // This Cert has been revoked.
  701. // CA_DISP_VALID // This Cert is still valid
  702. // CA_DISP_INVALID // This Cert has expired.
  703. // CA_DISP_ERROR // Cert unavailable (placehholder in registry?)
  704. // Values for wszPROPCRLSTATE (see certadm.h):
  705. // CA_DISP_REVOKED // All unexpired certs using this Cert's CRL have been
  706. // // revoked.
  707. // CA_DISP_VALID // This Cert is still publishing CRLs as needed.
  708. // CA_DISP_INVALID // All certs using this Cert's CRL are expired.
  709. // CA_DISP_ERROR // This Cert's CRL is managed by another Cert.
  710. // "Settable" system properties:
  711. #define wszPROPEVENTLOGTERSE TEXT("EventLogTerse")
  712. #define wszPROPEVENTLOGERROR TEXT("EventLogError")
  713. #define wszPROPEVENTLOGWARNING TEXT("EventLogWarning")
  714. #define wszPROPEVENTLOGVERBOSE TEXT("EventLogVerbose")
  715. #define wszPROPEVENTLOGEXHAUSTIVE TEXT("EventLogExhaustive")
  716. #define wszPROPDCNAME TEXT("DCName")
  717. //+--------------------------------------------------------------------------
  718. // Certificate properties:
  719. #define wszPROPCERTIFICATEREQUESTID TEXT("RequestID")
  720. #define wszPROPRAWCERTIFICATE TEXT("RawCertificate")
  721. #define wszPROPCERTIFICATEHASH TEXT("CertificateHash")
  722. #define wszPROPCERTIFICATETEMPLATE TEXT("CertificateTemplate")
  723. #define wszPROPCERTIFICATEENROLLMENTFLAGS TEXT("EnrollmentFlags")
  724. #define wszPROPCERTIFICATEGENERALFLAGS TEXT("GeneralFlags")
  725. #define wszPROPCERTIFICATESERIALNUMBER TEXT("SerialNumber")
  726. #define wszPROPCERTIFICATENOTBEFOREDATE TEXT("NotBefore")
  727. #define wszPROPCERTIFICATENOTAFTERDATE TEXT("NotAfter")
  728. #define wszPROPCERTIFICATESUBJECTKEYIDENTIFIER TEXT("SubjectKeyIdentifier")
  729. #define wszPROPCERTIFICATERAWPUBLICKEY TEXT("RawPublicKey")
  730. #define wszPROPCERTIFICATEPUBLICKEYLENGTH TEXT("PublicKeyLength")
  731. #define wszPROPCERTIFICATEPUBLICKEYALGORITHM TEXT("PublicKeyAlgorithm")
  732. #define wszPROPCERTIFICATERAWPUBLICKEYALGORITHMPARAMETERS \
  733. TEXT("RawPublicKeyAlgorithmParameters")
  734. #define wszPROPCERTIFICATEUPN TEXT("UPN")
  735. // Obsolete:
  736. #define wszPROPCERTIFICATETYPE TEXT("CertificateType")
  737. #define wszPROPCERTIFICATERAWSMIMECAPABILITIES TEXT("RawSMIMECapabilities")
  738. #define wszPROPNAMETYPE TEXT("NameType")
  739. //+--------------------------------------------------------------------------
  740. // Certificate extension properties:
  741. #define EXTENSION_CRITICAL_FLAG 0x00000001
  742. #define EXTENSION_DISABLE_FLAG 0x00000002
  743. #define EXTENSION_POLICY_MASK 0x0000ffff // Settable by admin+policy
  744. #define EXTENSION_ORIGIN_REQUEST 0x00010000
  745. #define EXTENSION_ORIGIN_POLICY 0x00020000
  746. #define EXTENSION_ORIGIN_ADMIN 0x00030000
  747. #define EXTENSION_ORIGIN_SERVER 0x00040000
  748. #define EXTENSION_ORIGIN_RENEWALCERT 0x00050000
  749. #define EXTENSION_ORIGIN_IMPORTEDCERT 0x00060000
  750. #define EXTENSION_ORIGIN_PKCS7 0x00070000
  751. #define EXTENSION_ORIGIN_CMC 0x00080000
  752. #define EXTENSION_ORIGIN_CACERT 0x00090000
  753. #define EXTENSION_ORIGIN_MASK 0x000f0000
  754. //+--------------------------------------------------------------------------
  755. // Extension properties:
  756. #define wszPROPEXTREQUESTID TEXT("ExtensionRequestId")
  757. #define wszPROPEXTNAME TEXT("ExtensionName")
  758. #define wszPROPEXTFLAGS TEXT("ExtensionFlags")
  759. #define wszPROPEXTRAWVALUE TEXT("ExtensionRawValue")
  760. //+--------------------------------------------------------------------------
  761. // Attribute properties:
  762. #define wszPROPATTRIBREQUESTID TEXT("AttributeRequestId")
  763. #define wszPROPATTRIBNAME TEXT("AttributeName")
  764. #define wszPROPATTRIBVALUE TEXT("AttributeValue")
  765. //+--------------------------------------------------------------------------
  766. // CRL properties:
  767. #define wszPROPCRLROWID TEXT("CRLRowId")
  768. #define wszPROPCRLNUMBER TEXT("CRLNumber")
  769. #define wszPROPCRLMINBASE TEXT("CRLMinBase") // Delta CRLs only
  770. #define wszPROPCRLNAMEID TEXT("CRLNameId")
  771. #define wszPROPCRLCOUNT TEXT("CRLCount")
  772. #define wszPROPCRLTHISUPDATE TEXT("CRLThisUpdate")
  773. #define wszPROPCRLNEXTUPDATE TEXT("CRLNextUpdate")
  774. #define wszPROPCRLTHISPUBLISH TEXT("CRLThisPublish")
  775. #define wszPROPCRLNEXTPUBLISH TEXT("CRLNextPublish")
  776. #define wszPROPCRLEFFECTIVE TEXT("CRLEffective")
  777. #define wszPROPCRLPROPAGATIONCOMPLETE TEXT("CRLPropagationComplete")
  778. #define wszPROPCRLLASTPUBLISHED TEXT("CRLLastPublished")
  779. #define wszPROPCRLPUBLISHATTEMPTS TEXT("CRLPublishAttempts")
  780. #define wszPROPCRLPUBLISHFLAGS TEXT("CRLPublishFlags")
  781. #define wszPROPCRLPUBLISHSTATUSCODE TEXT("CRLPublishStatusCode")
  782. #define wszPROPCRLPUBLISHERROR TEXT("CRLPublishError")
  783. #define wszPROPCRLRAWCRL TEXT("CRLRawCRL")
  784. //+--------------------------------------------------------------------------
  785. // CRL Published Flags:
  786. #define CPF_BASE 0x00000001
  787. #define CPF_DELTA 0x00000002
  788. #define CPF_COMPLETE 0x00000004
  789. #define CPF_SHADOW 0x00000008
  790. #define CPF_CASTORE_ERROR 0x00000010
  791. #define CPF_BADURL_ERROR 0x00000020
  792. #define CPF_MANUAL 0x00000040
  793. #define CPF_SIGNATURE_ERROR 0x00000080
  794. #define CPF_LDAP_ERROR 0x00000100
  795. #define CPF_FILE_ERROR 0x00000200
  796. #define CPF_FTP_ERROR 0x00000400
  797. #define CPF_HTTP_ERROR 0x00000800
  798. //+--------------------------------------------------------------------------
  799. // GetProperty/SetProperty Flags:
  800. //
  801. // Choose one Type
  802. #define PROPTYPE_LONG 0x00000001 // Signed long
  803. #define PROPTYPE_DATE 0x00000002 // Date+Time
  804. #define PROPTYPE_BINARY 0x00000003 // Binary data
  805. #define PROPTYPE_STRING 0x00000004 // Unicode String
  806. #define PROPTYPE_MASK 0x000000ff
  807. // Choose one Caller:
  808. #define PROPCALLER_SERVER 0x00000100
  809. #define PROPCALLER_POLICY 0x00000200
  810. #define PROPCALLER_EXIT 0x00000300
  811. #define PROPCALLER_ADMIN 0x00000400
  812. #define PROPCALLER_REQUEST 0x00000500
  813. #define PROPCALLER_MASK 0x00000f00
  814. #define PROPFLAGS_INDEXED 0x00010000
  815. // RequestFlags definitions:
  816. #define CR_FLG_FORCETELETEX 0x00000001
  817. #define CR_FLG_RENEWAL 0x00000002
  818. #define CR_FLG_FORCEUTF8 0x00000004
  819. #define CR_FLG_CAXCHGCERT 0x00000008
  820. #define CR_FLG_ENROLLONBEHALFOF 0x00000010
  821. #define CR_FLG_SUBJECTUNMODIFIED 0x00000020
  822. #define CR_FLG_VALIDENCRYPTEDKEYHASH 0x00000040
  823. #define CR_FLG_CACROSSCERT 0x00000080
  824. #define CR_FLG_PUBLISHERROR 0x80000000
  825. // Disposition property values:
  826. // Disposition values for requests in the queue:
  827. #define DB_DISP_ACTIVE 8 // being processed
  828. #define DB_DISP_PENDING 9 // taken under submission
  829. #define DB_DISP_QUEUE_MAX 9 // max disposition value for queue view
  830. #define DB_DISP_FOREIGN 12 // archived foreign cert
  831. #define DB_DISP_CA_CERT 15 // CA cert
  832. #define DB_DISP_CA_CERT_CHAIN 16 // CA cert chain
  833. #define DB_DISP_KRA_CERT 17 // KRA cert
  834. // Disposition values for requests in the log:
  835. #define DB_DISP_LOG_MIN 20 // min disposition value for log view
  836. #define DB_DISP_ISSUED 20 // cert issued
  837. #define DB_DISP_REVOKED 21 // issued and revoked
  838. // Disposition values for failed requests in the log:
  839. #define DB_DISP_LOG_FAILED_MIN 30 // min disposition value for log view
  840. #define DB_DISP_ERROR 30 // request failed
  841. #define DB_DISP_DENIED 31 // request denied
  842. // VerifyRequest() return values
  843. #define VR_PENDING 0 // request will be accepted or denied later
  844. #define VR_INSTANT_OK 1 // request was accepted
  845. #define VR_INSTANT_BAD 2 // request was rejected
  846. //+--------------------------------------------------------------------------
  847. // Known request Attribute names and Value strings
  848. // RequestType attribute name:
  849. #define wszCERT_TYPE L"RequestType" // attribute name
  850. // RequestType attribute values:
  851. // Not specified: // Non-specific certificate
  852. #define wszCERT_TYPE_CLIENT L"Client" // Client authentication cert
  853. #define wszCERT_TYPE_SERVER L"Server" // Server authentication cert
  854. #define wszCERT_TYPE_CODESIGN L"CodeSign" // Code signing certificate
  855. #define wszCERT_TYPE_CUSTOMER L"SetCustomer" // SET Customer certificate
  856. #define wszCERT_TYPE_MERCHANT L"SetMerchant" // SET Merchant certificate
  857. #define wszCERT_TYPE_PAYMENT L"SetPayment" // SET Payment certificate
  858. // Version attribute name:
  859. #define wszCERT_VERSION L"Version" // attribute name
  860. // Version attribute values:
  861. // Not specified: // Whetever is current
  862. #define wszCERT_VERSION_1 L"1" // Version one certificate
  863. #define wszCERT_VERSION_2 L"2" // Version two certificate
  864. #define wszCERT_VERSION_3 L"3" // Version three certificate
  865. #endif // _CERTSRV_H_