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.

2075 lines
66 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1999
  5. //
  6. // File: dbtable.cpp
  7. //
  8. // Contents: Cert Server Database interface implementation
  9. //
  10. //---------------------------------------------------------------------------
  11. #include <pch.cpp>
  12. #pragma hdrstop
  13. #include "csprop.h"
  14. // To Add a column to one of these tables:
  15. // 1) Add a wszPROP<COLNAME> #define to ..\include\csprop.h and run mkcsinc.bat
  16. // 2) Add a IDS_COLUMN_<COLNAME> #define to ..\certcli\resource.h and add the
  17. // display name to ..\certcli\certcli.rc. Add an entry to g_aColTable in
  18. // ..\certcli\column.cpp that maps wszPROP<COLNAME> to IDS_COLUMN_<COLNAME>.
  19. // 3) Add a DT?_<COLNAME> to the appropriate list of #defines in dbtable.h.
  20. // Renumber subsequent #defines if inserting into the table.
  21. // Change DT?_MAX.
  22. // Add a #define sz<COLNAME> "$ColName" ansi internal column name.
  23. // If the column is to be indexed, add a #define sz<TABLE>_<COLNAME>
  24. // "$<Table><ColName>Index"
  25. // The internal names of text columns and their indexes must begin with '$'.
  26. // 4) Find a similar column type in the same table array (g_adt<Table>) in
  27. // dbtable.cpp, and copy the entry. If inserting, fix subsequent
  28. // #if (DT?_<xxx> != CONSTANT) expressions to match the dbtable.h changes.
  29. // Fix the #if (DT?_MAX != CONSTANT) expression.
  30. // For the new g_adt<Table> entry, use NULL for pszIndexName if unindexed.
  31. //
  32. // Running the new certdb.dll on a machine will automatically create the new
  33. // column(s) and indexes, and leave them empty.
  34. //
  35. // If DBTF_COLUMNRENAMED is set, the old column name is appended to
  36. // pszFieldName. When starting the database, if the old column exists, the
  37. // old column data is copied to the new column FOR EVERY ROW. Upon successful
  38. // completion, the old column is deleted.
  39. //
  40. // Special case processing exists to convert ansi text column data to Unicode.
  41. // Special case processing exists for a few missing columns: Key Length is
  42. // computed, for example.
  43. //
  44. // If DBTF_INDEXRENAMED is set, the old index name is appended to pszIndexName.
  45. // When starting the database, if the old index exists, it is deleted.
  46. //---------------------------------------------------------------------------
  47. //
  48. // Requests Table:
  49. //
  50. //---------------------------------------------------------------------------
  51. DBTABLE g_adtRequests[] =
  52. {
  53. #if (DTR_REQUESTID != 0)
  54. #error -- bad DTR_REQUESTID index
  55. #endif
  56. { // ColumnType: DWORD
  57. wszPROPREQUESTREQUESTID, // pwszPropName
  58. NULL, // pwszPropNameObjId
  59. DBTF_INDEXPRIMARY, // dwFlags
  60. sizeof(LONG), // dwcbMax
  61. TABLE_REQUESTS, // dwTable
  62. szREQUESTID, // pszFieldName
  63. szREQUEST_REQUESTIDINDEX, // pszIndexName
  64. 0, // dbcolumnMax
  65. JET_bitColumnFixed | JET_bitColumnAutoincrement, // dbgrbit
  66. JET_coltypLong, // dbcoltyp
  67. 0 // dbcolumnid
  68. },
  69. #if (DTR_REQUESTRAWREQUEST != 1)
  70. #error -- bad DTR_REQUESTRAWREQUEST index
  71. #endif
  72. { // ColumnType: BLOB
  73. wszPROPREQUESTRAWREQUEST, // pwszPropName
  74. NULL, // pwszPropNameObjId
  75. 0, // dwFlags
  76. CB_DBMAXRAWREQUEST, // dwcbMax
  77. TABLE_REQUESTS, // dwTable
  78. szRAWREQUEST, // pszFieldName
  79. NULL, // pszIndexName
  80. CB_DBMAXRAWREQUEST, // dbcolumnMax
  81. 0, // dbgrbit
  82. JET_coltypLongBinary, // dbcoltyp
  83. 0 // dbcolumnid
  84. },
  85. #if (DTR_REQUESTRAWARCHIVEDKEY != 2)
  86. #error -- bad DTR_REQUESTRAWARCHIVEDKEY index
  87. #endif
  88. { // ColumnType: BLOB
  89. wszPROPREQUESTRAWARCHIVEDKEY, // pwszPropName
  90. NULL, // pwszPropNameObjId
  91. 0, // dwFlags
  92. CB_DBMAXRAWREQUEST, // dwcbMax
  93. TABLE_REQUESTS, // dwTable
  94. szRAWARCHIVEDKEY, // pszFieldName
  95. NULL, // pszIndexName
  96. CB_DBMAXRAWREQUEST, // dbcolumnMax
  97. 0, // dbgrbit
  98. JET_coltypLongBinary, // dbcoltyp
  99. 0 // dbcolumnid
  100. },
  101. #if (DTR_REQUESTKEYRECOVERYHASHES != 3)
  102. #error -- bad DTR_REQUESTKEYRECOVERYHASHES index
  103. #endif
  104. { // ColumnType: STRING
  105. wszPROPREQUESTKEYRECOVERYHASHES, // pwszPropName
  106. NULL, // pwszPropNameObjId
  107. 0, // dwFlags
  108. CB_DBMAXTEXT_MEDIUM, // dwcbMax
  109. TABLE_REQUESTS, // dwTable
  110. szKEYRECOVERYHASHES, // pszFieldName
  111. NULL, // pszIndexName
  112. CB_DBMAXTEXT_MEDIUM, // dbcolumnMax
  113. 0, // dbgrbit
  114. JET_coltypLongText, // dbcoltyp
  115. 0 // dbcolumnid
  116. },
  117. #if (DTR_REQUESTRAWOLDCERTIFICATE != 4)
  118. #error -- bad DTR_REQUESTRAWOLDCERTIFICATE index
  119. #endif
  120. { // ColumnType: BLOB
  121. wszPROPREQUESTRAWOLDCERTIFICATE, // pwszPropName
  122. NULL, // pwszPropNameObjId
  123. 0, // dwFlags
  124. CB_DBMAXRAWCERTIFICATE, // dwcbMax
  125. TABLE_REQUESTS, // dwTable
  126. szRAWOLDCERTIFICATE, // pszFieldName
  127. NULL, // pszIndexName
  128. CB_DBMAXRAWCERTIFICATE, // dbcolumnMax
  129. 0, // dbgrbit
  130. JET_coltypLongBinary, // dbcoltyp
  131. 0 // dbcolumnid
  132. },
  133. #if (DTR_REQUESTATTRIBUTES != 5)
  134. #error -- bad DTR_REQUESTATTRIBUTES index
  135. #endif
  136. { // ColumnType: STRING
  137. wszPROPREQUESTATTRIBUTES, // pwszPropName
  138. NULL, // pwszPropNameObjId
  139. 0, // dwFlags
  140. CB_DBMAXTEXT_ATTRSTRING, // dwcbMax
  141. TABLE_REQUESTS, // dwTable
  142. szREQUESTATTRIBUTES, // pszFieldName
  143. NULL, // pszIndexName
  144. CB_DBMAXTEXT_ATTRSTRING, // dbcolumnMax
  145. 0, // dbgrbit
  146. JET_coltypLongText, // dbcoltyp
  147. 0 // dbcolumnid
  148. },
  149. #if (DTR_REQUESTTYPE != 6)
  150. #error -- bad DTR_REQUESTTYPE index
  151. #endif
  152. { // ColumnType: DWORD
  153. wszPROPREQUESTTYPE, // pwszPropName
  154. NULL, // pwszPropNameObjId
  155. 0, // dwFlags
  156. sizeof(LONG), // dwcbMax
  157. TABLE_REQUESTS, // dwTable
  158. szREQUESTTYPE, // pszFieldName
  159. NULL, // pszIndexName
  160. 0, // dbcolumnMax
  161. JET_bitColumnFixed, // dbgrbit
  162. JET_coltypLong, // dbcoltyp
  163. 0 // dbcolumnid
  164. },
  165. #if (DTR_REQUESTFLAGS != 7)
  166. #error -- bad DTR_REQUESTFLAGS index
  167. #endif
  168. { // ColumnType: DWORD
  169. wszPROPREQUESTFLAGS, // pwszPropName
  170. NULL, // pwszPropNameObjId
  171. 0, // dwFlags
  172. sizeof(LONG), // dwcbMax
  173. TABLE_REQUESTS, // dwTable
  174. szREQUESTFLAGS, // pszFieldName
  175. NULL, // pszIndexName
  176. 0, // dbcolumnMax
  177. JET_bitColumnFixed, // dbgrbit
  178. JET_coltypLong, // dbcoltyp
  179. 0 // dbcolumnid
  180. },
  181. #if (DTR_REQUESTSTATUSCODE != 8)
  182. #error -- bad DTR_REQUESTSTATUSCODE index
  183. #endif
  184. { // ColumnType: DWORD
  185. wszPROPREQUESTSTATUSCODE, // pwszPropName
  186. NULL, // pwszPropNameObjId
  187. 0, // dwFlags
  188. sizeof(LONG), // dwcbMax
  189. TABLE_REQUESTS, // dwTable
  190. szSTATUSCODE, // pszFieldName
  191. NULL, // pszIndexName
  192. 0, // dbcolumnMax
  193. JET_bitColumnFixed, // dbgrbit
  194. JET_coltypLong, // dbcoltyp
  195. 0 // dbcolumnid
  196. },
  197. #if (DTR_REQUESTDISPOSITION != 9)
  198. #error -- bad DTR_REQUESTDISPOSITION index
  199. #endif
  200. { // ColumnType: DWORD
  201. wszPROPREQUESTDISPOSITION, // pwszPropName
  202. NULL, // pwszPropNameObjId
  203. 0, // dwFlags
  204. sizeof(LONG), // dwcbMax
  205. TABLE_REQUESTS, // dwTable
  206. szDISPOSITION, // pszFieldName
  207. szREQUEST_DISPOSITIONINDEX, // pszIndexName
  208. 0, // dbcolumnMax
  209. JET_bitColumnFixed, // dbgrbit
  210. JET_coltypLong, // dbcoltyp
  211. 0 // dbcolumnid
  212. },
  213. #if (DTR_REQUESTDISPOSITIONMESSAGE != 10)
  214. #error -- bad DTR_REQUESTDISPOSITIONMESSAGE index
  215. #endif
  216. { // ColumnType: STRING
  217. wszPROPREQUESTDISPOSITIONMESSAGE, // pwszPropName
  218. NULL, // pwszPropNameObjId
  219. 0, // dwFlags
  220. CB_DBMAXTEXT_DISPSTRING, // dwcbMax
  221. TABLE_REQUESTS, // dwTable
  222. szDISPOSITIONMESSAGE, // pszFieldName
  223. NULL, // pszIndexName
  224. CB_DBMAXTEXT_DISPSTRING, // dbcolumnMax
  225. 0, // dbgrbit
  226. JET_coltypLongText, // dbcoltyp
  227. 0 // dbcolumnid
  228. },
  229. #if (DTR_REQUESTSUBMITTEDWHEN != 11)
  230. #error -- bad DTR_REQUESTSUBMITTEDWHEN index
  231. #endif
  232. { // ColumnType: FILETIME
  233. wszPROPREQUESTSUBMITTEDWHEN, // pwszPropName
  234. NULL, // pwszPropNameObjId
  235. 0, // dwFlags
  236. sizeof(DATE), // dwcbMax
  237. TABLE_REQUESTS, // dwTable
  238. szSUBMITTEDWHEN, // pszFieldName
  239. NULL, // pszIndexName
  240. 0, // dbcolumnMax
  241. JET_bitColumnFixed, // dbgrbit
  242. JET_coltypDateTime, // dbcoltyp
  243. 0 // dbcolumnid
  244. },
  245. #if (DTR_REQUESTRESOLVEDWHEN != 12)
  246. #error -- bad DTR_REQUESTRESOLVEDWHEN index
  247. #endif
  248. { // ColumnType: FILETIME
  249. wszPROPREQUESTRESOLVEDWHEN, // pwszPropName
  250. NULL, // pwszPropNameObjId
  251. DBTF_INDEXIGNORENULL | DBTF_INDEXRENAMED, // dwFlags
  252. sizeof(DATE), // dwcbMax
  253. TABLE_REQUESTS, // dwTable
  254. szRESOLVEDWHEN, // pszFieldName
  255. szREQUEST_RESOLVEDWHENINDEX "\0" szREQUEST_RESOLVEDWHENINDEX_OLD, // pszIndexName
  256. 0, // dbcolumnMax
  257. JET_bitColumnFixed, // dbgrbit
  258. JET_coltypDateTime, // dbcoltyp
  259. 0 // dbcolumnid
  260. },
  261. #if (DTR_REQUESTREVOKEDWHEN != 13)
  262. #error -- bad DTR_REQUESTREVOKEDWHEN index
  263. #endif
  264. { // ColumnType: FILETIME
  265. wszPROPREQUESTREVOKEDWHEN, // pwszPropName
  266. NULL, // pwszPropNameObjId
  267. 0, // dwFlags
  268. sizeof(DATE), // dwcbMax
  269. TABLE_REQUESTS, // dwTable
  270. szREVOKEDWHEN, // pszFieldName
  271. NULL, // pszIndexName
  272. 0, // dbcolumnMax
  273. JET_bitColumnFixed, // dbgrbit
  274. JET_coltypDateTime, // dbcoltyp
  275. 0 // dbcolumnid
  276. },
  277. #if (DTR_REQUESTREVOKEDEFFECTIVEWHEN != 14)
  278. #error -- bad DTR_REQUESTREVOKEDEFFECTIVEWHEN index
  279. #endif
  280. { // ColumnType: FILETIME
  281. wszPROPREQUESTREVOKEDEFFECTIVEWHEN, // pwszPropName
  282. NULL, // pwszPropNameObjId
  283. DBTF_INDEXIGNORENULL | DBTF_INDEXRENAMED, // dwFlags
  284. sizeof(DATE), // dwcbMax
  285. TABLE_REQUESTS, // dwTable
  286. szREVOKEDEFFECTIVEWHEN, // pszFieldName
  287. szREQUEST_REVOKEDEFFECTIVEWHENINDEX "\0" szREQUEST_REVOKEDEFFECTIVEWHENINDEX_OLD, // pszIndexName
  288. 0, // dbcolumnMax
  289. JET_bitColumnFixed, // dbgrbit
  290. JET_coltypDateTime, // dbcoltyp
  291. 0 // dbcolumnid
  292. },
  293. #if (DTR_REQUESTREVOKEDREASON != 15)
  294. #error -- bad DTR_REQUESTREVOKEDREASON index
  295. #endif
  296. { // ColumnType: DWORD
  297. wszPROPREQUESTREVOKEDREASON, // pwszPropName
  298. NULL, // pwszPropNameObjId
  299. 0, // dwFlags
  300. sizeof(LONG), // dwcbMax
  301. TABLE_REQUESTS, // dwTable
  302. szREVOKEDREASON, // pszFieldName
  303. NULL, // pszIndexName
  304. 0, // dbcolumnMax
  305. JET_bitColumnFixed, // dbgrbit
  306. JET_coltypLong, // dbcoltyp
  307. 0 // dbcolumnid
  308. },
  309. #if (DTR_REQUESTERNAME != 16)
  310. #error -- bad DTR_REQUESTERNAME index
  311. #endif
  312. { // ColumnType: STRING
  313. wszPROPREQUESTERNAME, // pwszPropName
  314. NULL, // pwszPropNameObjId
  315. 0, // dwFlags
  316. CB_DBMAXTEXT_REQUESTNAME, // dwcbMax
  317. TABLE_REQUESTS, // dwTable
  318. szREQUESTERNAME, // pszFieldName
  319. szREQUEST_REQUESTERNAMEINDEX, // pszIndexName
  320. CB_DBMAXTEXT_REQUESTNAME, // dbcolumnMax
  321. 0, // dbgrbit
  322. JET_coltypLongText, // dbcoltyp
  323. 0 // dbcolumnid
  324. },
  325. #if (DTR_CALLERNAME != 17)
  326. #error -- bad DTR_CALLERNAME index
  327. #endif
  328. { // ColumnType: STRING
  329. wszPROPCALLERNAME, // pwszPropName
  330. NULL, // pwszPropNameObjId
  331. 0, // dwFlags
  332. CB_DBMAXTEXT_REQUESTNAME, // dwcbMax
  333. TABLE_REQUESTS, // dwTable
  334. szCALLERNAME, // pszFieldName
  335. szREQUEST_CALLERNAMEINDEX, // pszIndexName
  336. CB_DBMAXTEXT_REQUESTNAME, // dbcolumnMax
  337. 0, // dbgrbit
  338. JET_coltypLongText, // dbcoltyp
  339. 0 // dbcolumnid
  340. },
  341. #if (DTR_SIGNERPOLICIES != 18)
  342. #error -- bad DTR_SIGNERPOLICIES index
  343. #endif
  344. { // ColumnType: STRING
  345. wszPROPSIGNERPOLICIES, // pwszPropName
  346. NULL, // pwszPropNameObjId
  347. 0, // dwFlags
  348. CB_DBMAXTEXT_MEDIUM, // dwcbMax
  349. TABLE_REQUESTS, // dwTable
  350. szSIGNERPOLICIES, // pszFieldName
  351. NULL, // pszIndexName
  352. CB_DBMAXTEXT_MEDIUM, // dbcolumnMax
  353. 0, // dbgrbit
  354. JET_coltypLongText, // dbcoltyp
  355. 0 // dbcolumnid
  356. },
  357. #if (DTR_SIGNERAPPLICATIONPOLICIES != 19)
  358. #error -- bad DTR_SIGNERAPPLICATIONPOLICIES index
  359. #endif
  360. { // ColumnType: STRING
  361. wszPROPSIGNERAPPLICATIONPOLICIES, // pwszPropName
  362. NULL, // pwszPropNameObjId
  363. 0, // dwFlags
  364. CB_DBMAXTEXT_MEDIUM, // dwcbMax
  365. TABLE_REQUESTS, // dwTable
  366. szSIGNERAPPLICATIONPOLICIES, // pszFieldName
  367. NULL, // pszIndexName
  368. CB_DBMAXTEXT_MEDIUM, // dbcolumnMax
  369. 0, // dbgrbit
  370. JET_coltypLongText, // dbcoltyp
  371. 0 // dbcolumnid
  372. },
  373. #if (DTR_DISTINGUISHEDNAME != 20)
  374. #error -- bad DTR_DISTINGUISHEDNAME index
  375. #endif
  376. { // ColumnType: STRING
  377. wszPROPDISTINGUISHEDNAME, // pwszPropName
  378. NULL, // pwszPropNameObjId
  379. DBTF_SUBJECT, // dwFlags
  380. CB_DBMAXTEXT_DN, // dwcbMax
  381. TABLE_REQUESTS, // dwTable
  382. szDISTINGUISHEDNAME, // pszFieldName
  383. NULL, // pszIndexName
  384. CB_DBMAXTEXT_DN, // dbcolumnMax
  385. 0, // dbgrbit
  386. JET_coltypLongText, // dbcoltyp
  387. 0 // dbcolumnid
  388. },
  389. #if (DTR_RAWNAME != 21)
  390. #error -- bad DTR_RAWNAME index
  391. #endif
  392. { // ColumnType: BLOB
  393. wszPROPRAWNAME, // pwszPropName
  394. NULL, // pwszPropNameObjId
  395. DBTF_SUBJECT, // dwFlags
  396. CB_DBMAXBINARY, // dwcbMax
  397. TABLE_REQUESTS, // dwTable
  398. szRAWNAME, // pszFieldName
  399. NULL, // pszIndexName
  400. CB_DBMAXBINARY, // dbcolumnMax
  401. 0, // dbgrbit
  402. JET_coltypLongBinary, // dbcoltyp
  403. 0 // dbcolumnid
  404. },
  405. #if (DTR_COUNTRY != 22)
  406. #error -- bad DTR_COUNTRY index
  407. #endif
  408. { // ColumnType: STRING
  409. wszPROPCOUNTRY, // pwszPropName
  410. TEXT(szOID_COUNTRY_NAME), // pwszPropNameObjId
  411. DBTF_SUBJECT, // dwFlags
  412. CB_DBMAXTEXT_RDN, // dwcbMax
  413. TABLE_REQUESTS, // dwTable
  414. szCOUNTRY, // pszFieldName
  415. NULL, // pszIndexName
  416. CB_DBMAXTEXT_RDN, // dbcolumnMax
  417. 0, // dbgrbit
  418. JET_coltypLongText, // dbcoltyp
  419. 0 // dbcolumnid
  420. },
  421. #if (DTR_ORGANIZATION != 23)
  422. #error -- bad DTR_ORGANIZATION index
  423. #endif
  424. { // ColumnType: STRING
  425. wszPROPORGANIZATION, // pwszPropName
  426. TEXT(szOID_ORGANIZATION_NAME), // pwszPropNameObjId
  427. DBTF_SUBJECT, // dwFlags
  428. CB_DBMAXTEXT_RDN, // dwcbMax
  429. TABLE_REQUESTS, // dwTable
  430. szORGANIZATION, // pszFieldName
  431. NULL, // pszIndexName
  432. CB_DBMAXTEXT_RDN, // dbcolumnMax
  433. 0, // dbgrbit
  434. JET_coltypLongText, // dbcoltyp
  435. 0 // dbcolumnid
  436. },
  437. #if (DTR_ORGUNIT != 24)
  438. #error -- bad DTR_ORGUNIT index
  439. #endif
  440. { // ColumnType: STRING
  441. wszPROPORGUNIT, // pwszPropName
  442. TEXT(szOID_ORGANIZATIONAL_UNIT_NAME), // pwszPropNameObjId
  443. DBTF_SUBJECT, // dwFlags
  444. CB_DBMAXTEXT_RDN, // dwcbMax
  445. TABLE_REQUESTS, // dwTable
  446. szORGANIZATIONALUNIT, // pszFieldName
  447. NULL, // pszIndexName
  448. CB_DBMAXTEXT_RDN, // dbcolumnMax
  449. 0, // dbgrbit
  450. JET_coltypLongText, // dbcoltyp
  451. 0 // dbcolumnid
  452. },
  453. #if (DTR_COMMONNAME != 25)
  454. #error -- bad DTR_COMMONNAME index
  455. #endif
  456. { // ColumnType: STRING
  457. wszPROPCOMMONNAME, // pwszPropName
  458. TEXT(szOID_COMMON_NAME), // pwszPropNameObjId
  459. DBTF_SUBJECT, // dwFlags
  460. CB_DBMAXTEXT_RDN, // dwcbMax
  461. TABLE_REQUESTS, // dwTable
  462. szCOMMONNAME, // pszFieldName
  463. NULL, // pszIndexName
  464. CB_DBMAXTEXT_RDN, // dbcolumnMax
  465. 0, // dbgrbit
  466. JET_coltypLongText, // dbcoltyp
  467. 0 // dbcolumnid
  468. },
  469. #if (DTR_LOCALITY != 26)
  470. #error -- bad DTR_LOCALITY index
  471. #endif
  472. { // ColumnType: STRING
  473. wszPROPLOCALITY, // pwszPropName
  474. TEXT(szOID_LOCALITY_NAME), // pwszPropNameObjId
  475. DBTF_SUBJECT, // dwFlags
  476. CB_DBMAXTEXT_RDN, // dwcbMax
  477. TABLE_REQUESTS, // dwTable
  478. szLOCALITY, // pszFieldName
  479. NULL, // pszIndexName
  480. CB_DBMAXTEXT_RDN, // dbcolumnMax
  481. 0, // dbgrbit
  482. JET_coltypLongText, // dbcoltyp
  483. 0 // dbcolumnid
  484. },
  485. #if (DTR_STATE != 27)
  486. #error -- bad DTR_STATE index
  487. #endif
  488. { // ColumnType: STRING
  489. wszPROPSTATE, // pwszPropName
  490. TEXT(szOID_STATE_OR_PROVINCE_NAME), // pwszPropNameObjId
  491. DBTF_SUBJECT, // dwFlags
  492. CB_DBMAXTEXT_RDN, // dwcbMax
  493. TABLE_REQUESTS, // dwTable
  494. szSTATEORPROVINCE, // pszFieldName
  495. NULL, // pszIndexName
  496. CB_DBMAXTEXT_RDN, // dbcolumnMax
  497. 0, // dbgrbit
  498. JET_coltypLongText, // dbcoltyp
  499. 0 // dbcolumnid
  500. },
  501. #if (DTR_TITLE != 28)
  502. #error -- bad DTR_TITLE index
  503. #endif
  504. { // ColumnType: STRING
  505. wszPROPTITLE, // pwszPropName
  506. TEXT(szOID_TITLE), // pwszPropNameObjId
  507. DBTF_SUBJECT, // dwFlags
  508. CB_DBMAXTEXT_RDN, // dwcbMax
  509. TABLE_REQUESTS, // dwTable
  510. szTITLE, // pszFieldName
  511. NULL, // pszIndexName
  512. CB_DBMAXTEXT_RDN, // dbcolumnMax
  513. 0, // dbgrbit
  514. JET_coltypLongText, // dbcoltyp
  515. 0 // dbcolumnid
  516. },
  517. #if (DTR_GIVENNAME != 29)
  518. #error -- bad DTR_GIVENNAME index
  519. #endif
  520. { // ColumnType: STRING
  521. wszPROPGIVENNAME, // pwszPropName
  522. TEXT(szOID_GIVEN_NAME), // pwszPropNameObjId
  523. DBTF_SUBJECT, // dwFlags
  524. CB_DBMAXTEXT_RDN, // dwcbMax
  525. TABLE_REQUESTS, // dwTable
  526. szGIVENNAME, // pszFieldName
  527. NULL, // pszIndexName
  528. CB_DBMAXTEXT_RDN, // dbcolumnMax
  529. 0, // dbgrbit
  530. JET_coltypLongText, // dbcoltyp
  531. 0 // dbcolumnid
  532. },
  533. #if (DTR_INITIALS != 30)
  534. #error -- bad DTR_INITIALS index
  535. #endif
  536. { // ColumnType: STRING
  537. wszPROPINITIALS, // pwszPropName
  538. TEXT(szOID_INITIALS), // pwszPropNameObjId
  539. DBTF_SUBJECT, // dwFlags
  540. CB_DBMAXTEXT_RDN, // dwcbMax
  541. TABLE_REQUESTS, // dwTable
  542. szINITIALS, // pszFieldName
  543. NULL, // pszIndexName
  544. CB_DBMAXTEXT_RDN, // dbcolumnMax
  545. 0, // dbgrbit
  546. JET_coltypLongText, // dbcoltyp
  547. 0 // dbcolumnid
  548. },
  549. #if (DTR_SURNAME != 31)
  550. #error -- bad DTR_SURNAME index
  551. #endif
  552. { // ColumnType: STRING
  553. wszPROPSURNAME, // pwszPropName
  554. TEXT(szOID_SUR_NAME), // pwszPropNameObjId
  555. DBTF_SUBJECT, // dwFlags
  556. CB_DBMAXTEXT_RDN, // dwcbMax
  557. TABLE_REQUESTS, // dwTable
  558. szSURNAME, // pszFieldName
  559. NULL, // pszIndexName
  560. CB_DBMAXTEXT_RDN, // dbcolumnMax
  561. 0, // dbgrbit
  562. JET_coltypLongText, // dbcoltyp
  563. 0 // dbcolumnid
  564. },
  565. #if (DTR_DOMAINCOMPONENT != 32)
  566. #error -- bad DTR_DOMAINCOMPONENT index
  567. #endif
  568. { // ColumnType: STRING
  569. wszPROPDOMAINCOMPONENT, // pwszPropName
  570. TEXT(szOID_DOMAIN_COMPONENT), // pwszPropNameObjId
  571. DBTF_SUBJECT, // dwFlags
  572. CB_DBMAXTEXT_RDN, // dwcbMax
  573. TABLE_REQUESTS, // dwTable
  574. szDOMAINCOMPONENT, // pszFieldName
  575. NULL, // pszIndexName
  576. CB_DBMAXTEXT_RDN, // dbcolumnMax
  577. 0, // dbgrbit
  578. JET_coltypLongText, // dbcoltyp
  579. 0 // dbcolumnid
  580. },
  581. #if (DTR_EMAIL != 33)
  582. #error -- bad DTR_EMAIL index
  583. #endif
  584. { // ColumnType: STRING
  585. wszPROPEMAIL, // pwszPropName
  586. TEXT(szOID_RSA_emailAddr), // pwszPropNameObjId
  587. DBTF_SUBJECT, // dwFlags
  588. CB_DBMAXTEXT_RDN, // dwcbMax
  589. TABLE_REQUESTS, // dwTable
  590. szEMAIL, // pszFieldName
  591. NULL, // pszIndexName
  592. CB_DBMAXTEXT_RDN, // dbcolumnMax
  593. 0, // dbgrbit
  594. JET_coltypLongText, // dbcoltyp
  595. 0 // dbcolumnid
  596. },
  597. #if (DTR_STREETADDRESS != 34)
  598. #error -- bad DTR_STREETADDRESS index
  599. #endif
  600. { // ColumnType: STRING
  601. wszPROPSTREETADDRESS, // pwszPropName
  602. TEXT(szOID_STREET_ADDRESS), // pwszPropNameObjId
  603. DBTF_SUBJECT, // dwFlags
  604. CB_DBMAXTEXT_RDN, // dwcbMax
  605. TABLE_REQUESTS, // dwTable
  606. szSTREETADDRESS, // pszFieldName
  607. NULL, // pszIndexName
  608. CB_DBMAXTEXT_RDN, // dbcolumnMax
  609. 0, // dbgrbit
  610. JET_coltypLongText, // dbcoltyp
  611. 0 // dbcolumnid
  612. },
  613. #if (DTR_UNSTRUCTUREDNAME != 35)
  614. #error -- bad DTR_UNSTRUCTUREDNAME index
  615. #endif
  616. { // ColumnType: STRING
  617. wszPROPUNSTRUCTUREDNAME, // pwszPropName
  618. TEXT(szOID_RSA_unstructName), // pwszPropNameObjId
  619. DBTF_SUBJECT | DBTF_SOFTFAIL, // dwFlags
  620. CB_DBMAXTEXT_RDN, // dwcbMax
  621. TABLE_REQUESTS, // dwTable
  622. szUNSTRUCTUREDNAME, // pszFieldName
  623. NULL, // pszIndexName
  624. CB_DBMAXTEXT_RDN, // dbcolumnMax
  625. 0, // dbgrbit
  626. JET_coltypLongText, // dbcoltyp
  627. 0 // dbcolumnid
  628. },
  629. #if (DTR_UNSTRUCTUREDADDRESS != 36)
  630. #error -- bad DTR_UNSTRUCTUREDADDRESS index
  631. #endif
  632. { // ColumnType: STRING
  633. wszPROPUNSTRUCTUREDADDRESS, // pwszPropName
  634. TEXT(szOID_RSA_unstructAddr), // pwszPropNameObjId
  635. DBTF_SUBJECT | DBTF_SOFTFAIL, // dwFlags
  636. CB_DBMAXTEXT_RDN, // dwcbMax
  637. TABLE_REQUESTS, // dwTable
  638. szUNSTRUCTUREDADDRESS, // pszFieldName
  639. NULL, // pszIndexName
  640. CB_DBMAXTEXT_RDN, // dbcolumnMax
  641. 0, // dbgrbit
  642. JET_coltypLongText, // dbcoltyp
  643. 0 // dbcolumnid
  644. },
  645. #if (DTR_DEVICESERIALNUMBER != 37)
  646. #error -- bad DTR_DEVICESERIALNUMBER index
  647. #endif
  648. { // ColumnType: STRING
  649. wszPROPDEVICESERIALNUMBER, // pwszPropName
  650. TEXT(szOID_DEVICE_SERIAL_NUMBER), // pwszPropNameObjId
  651. DBTF_SUBJECT | DBTF_SOFTFAIL, // dwFlags
  652. CB_DBMAXTEXT_RDN, // dwcbMax
  653. TABLE_REQUESTS, // dwTable
  654. szDEVICESERIALNUMBER, // pszFieldName
  655. NULL, // pszIndexName
  656. CB_DBMAXTEXT_RDN, // dbcolumnMax
  657. 0, // dbgrbit
  658. JET_coltypLongText, // dbcoltyp
  659. 0 // dbcolumnid
  660. },
  661. #if (DTR_MAX != 38)
  662. #error -- bad DTR_MAX index
  663. #endif
  664. DBTABLE_NULL // Termination marker
  665. };
  666. //---------------------------------------------------------------------------
  667. //
  668. // Certificates Table:
  669. //
  670. //---------------------------------------------------------------------------
  671. DBTABLE g_adtCertificates[] =
  672. {
  673. #if (DTC_REQUESTID != 0)
  674. #error -- bad DTC_REQUESTID index
  675. #endif
  676. { // ColumnType: DWORD
  677. wszPROPCERTIFICATEREQUESTID, // pwszPropName
  678. NULL, // pwszPropNameObjId
  679. DBTF_INDEXPRIMARY, // dwFlags
  680. sizeof(LONG), // dwcbMax
  681. TABLE_CERTIFICATES, // dwTable
  682. szREQUESTID, // pszFieldName
  683. szCERTIFICATE_REQUESTIDINDEX, // pszIndexName
  684. 0, // dbcolumnMax
  685. JET_bitColumnFixed, // dbgrbit
  686. JET_coltypLong, // dbcoltyp
  687. 0 // dbcolumnid
  688. },
  689. #if (DTC_RAWCERTIFICATE != 1)
  690. #error -- bad DTC_RAWCERTIFICATE index
  691. #endif
  692. { // ColumnType: BLOB
  693. wszPROPRAWCERTIFICATE, // pwszPropName
  694. NULL, // pwszPropNameObjId
  695. 0, // dwFlags
  696. CB_DBMAXRAWCERTIFICATE, // dwcbMax
  697. TABLE_CERTIFICATES, // dwTable
  698. szRAWCERTIFICATE, // pszFieldName
  699. NULL, // pszIndexName
  700. CB_DBMAXRAWCERTIFICATE, // dbcolumnMax
  701. 0, // dbgrbit
  702. JET_coltypLongBinary, // dbcoltyp
  703. 0 // dbcolumnid
  704. },
  705. #if (DTC_CERTIFICATEHASH != 2)
  706. #error -- bad DTC_CERTIFICATEHASH index
  707. #endif
  708. { // ColumnType: STRING
  709. wszPROPCERTIFICATEHASH, // pwszPropName
  710. NULL, // pwszPropNameObjId
  711. DBTF_INDEXIGNORENULL, // dwFlags
  712. cchHASHMAX * sizeof(WCHAR), // dwcbMax
  713. TABLE_CERTIFICATES, // dwTable
  714. szCERTIFICATEHASH, // pszFieldName
  715. szCERTIFICATE_HASHINDEX, // pszIndexName
  716. cchHASHMAX * sizeof(WCHAR), // dbcolumnMax
  717. 0, // dbgrbit
  718. JET_coltypText, // dbcoltyp
  719. 0 // dbcolumnid
  720. },
  721. #if (DTC_CERTIFICATETEMPLATE != 3)
  722. #error -- bad DTC_CERTIFICATETEMPLATE index
  723. #endif
  724. { // ColumnType: STRING
  725. wszPROPCERTIFICATETEMPLATE, // pwszPropName
  726. NULL, // pwszPropNameObjId
  727. DBTF_POLICYWRITEABLE | DBTF_SOFTFAIL, // dwFlags
  728. CB_DBMAXTEXT_OID, // dwcbMax
  729. TABLE_CERTIFICATES, // dwTable
  730. szCERTIFICATETEMPLATE, // pszFieldName
  731. szCERTIFICATE_TEMPLATEINDEX, // pszIndexName
  732. CB_DBMAXTEXT_OID, // dbcolumnMax
  733. 0, // dbgrbit
  734. JET_coltypText, // dbcoltyp
  735. 0 // dbcolumnid
  736. },
  737. #if (DTC_CERTIFICATEENROLLMENTFLAGS != 4)
  738. #error -- bad DTC_CERTIFICATEENROLLMENTFLAGS index
  739. #endif
  740. { // ColumnType: DWORD
  741. wszPROPCERTIFICATEENROLLMENTFLAGS, // pwszPropName
  742. NULL, // pwszPropNameObjId
  743. DBTF_POLICYWRITEABLE | DBTF_SOFTFAIL, // dwFlags
  744. sizeof(LONG), // dwcbMax
  745. TABLE_CERTIFICATES, // dwTable
  746. szCERTIFICATEENROLLMENTFLAGS, // pszFieldName
  747. NULL, // pszIndexName
  748. 0, // dbcolumnMax
  749. JET_bitColumnFixed, // dbgrbit
  750. JET_coltypLong, // dbcoltyp
  751. 0 // dbcolumnid
  752. },
  753. #if (DTC_CERTIFICATEGENERALFLAGS != 5)
  754. #error -- bad DTC_CERTIFICATEGENERALFLAGS index
  755. #endif
  756. { // ColumnType: DWORD
  757. wszPROPCERTIFICATEGENERALFLAGS, // pwszPropName
  758. NULL, // pwszPropNameObjId
  759. DBTF_POLICYWRITEABLE | DBTF_SOFTFAIL, // dwFlags
  760. sizeof(LONG), // dwcbMax
  761. TABLE_CERTIFICATES, // dwTable
  762. szCERTIFICATEGENERALFLAGS, // pszFieldName
  763. NULL, // pszIndexName
  764. 0, // dbcolumnMax
  765. JET_bitColumnFixed, // dbgrbit
  766. JET_coltypLong, // dbcoltyp
  767. 0 // dbcolumnid
  768. },
  769. #if (DTC_CERTIFICATESERIALNUMBER != 6)
  770. #error -- bad DTC_CERTIFICATESERIALNUMBER index
  771. #endif
  772. { // ColumnType: STRING
  773. wszPROPCERTIFICATESERIALNUMBER, // pwszPropName
  774. NULL, // pwszPropNameObjId
  775. DBTF_INDEXIGNORENULL | DBTF_INDEXRENAMED, // dwFlags
  776. cchSERIALNUMBERMAX * sizeof(WCHAR), // dwcbMax
  777. TABLE_CERTIFICATES, // dwTable
  778. szSERIALNUMBER, // pszFieldName
  779. szCERTIFICATE_SERIALNUMBERINDEX "\0" szCERTIFICATE_SERIALNUMBERINDEX_OLD, // pszIndexName
  780. cchSERIALNUMBERMAX * sizeof(WCHAR), // dbcolumnMax
  781. 0, // dbgrbit
  782. JET_coltypText, // dbcoltyp
  783. 0 // dbcolumnid
  784. },
  785. #if (DTC_CERTIFICATEISSUERNAMEID != 7)
  786. #error -- bad DTC_CERTIFICATEISSUERNAMEID index
  787. #endif
  788. { // ColumnType: DWORD
  789. wszPROPCERTIFICATEISSUERNAMEID, // pwszPropName
  790. NULL, // pwszPropNameObjId
  791. 0, // dwFlags
  792. sizeof(LONG), // dwcbMax
  793. TABLE_CERTIFICATES, // dwTable
  794. szISSUERNAMEID, // pszFieldName
  795. NULL, // pszIndexName
  796. 0, // dbcolumnMax
  797. JET_bitColumnFixed, // dbgrbit
  798. JET_coltypLong, // dbcoltyp
  799. 0 // dbcolumnid
  800. },
  801. #if (DTC_CERTIFICATENOTBEFOREDATE != 8)
  802. #error -- bad DTC_CERTIFICATENOTBEFOREDATE index
  803. #endif
  804. { // ColumnType: FILETIME
  805. wszPROPCERTIFICATENOTBEFOREDATE, // pwszPropName
  806. NULL, // pwszPropNameObjId
  807. DBTF_POLICYWRITEABLE, // dwFlags
  808. sizeof(DATE), // dwcbMax
  809. TABLE_CERTIFICATES, // dwTable
  810. szNOTBEFORE, // pszFieldName
  811. NULL, // pszIndexName
  812. 0, // dbcolumnMax
  813. JET_bitColumnFixed, // dbgrbit
  814. JET_coltypDateTime, // dbcoltyp
  815. 0 // dbcolumnid
  816. },
  817. #if (DTC_CERTIFICATENOTAFTERDATE != 9)
  818. #error -- bad DTC_CERTIFICATENOTAFTERDATE index
  819. #endif
  820. { // ColumnType: FILETIME
  821. wszPROPCERTIFICATENOTAFTERDATE, // pwszPropName
  822. NULL, // pwszPropNameObjId
  823. DBTF_POLICYWRITEABLE | DBTF_INDEXIGNORENULL | DBTF_INDEXRENAMED, // dwFlags
  824. sizeof(DATE), // dwcbMax
  825. TABLE_CERTIFICATES, // dwTable
  826. szNOTAFTER, // pszFieldName
  827. szCERTIFICATE_NOTAFTERINDEX "\0" szCERTIFICATE_NOTAFTERINDEX_OLD, // pszIndexName
  828. 0, // dbcolumnMax
  829. JET_bitColumnFixed, // dbgrbit
  830. JET_coltypDateTime, // dbcoltyp
  831. 0 // dbcolumnid
  832. },
  833. #if (DTC_CERTIFICATESUBJECTKEYIDENTIFIER != 10)
  834. #error -- bad DTC_CERTIFICATESUBJECTKEYIDENTIFIER index
  835. #endif
  836. { // ColumnType: STRING
  837. wszPROPCERTIFICATESUBJECTKEYIDENTIFIER, // pwszPropName
  838. NULL, // pwszPropNameObjId
  839. DBTF_COLUMNRENAMED, // dwFlags
  840. cchHASHMAX * sizeof(WCHAR), // dwcbMax
  841. TABLE_CERTIFICATES, // dwTable
  842. szSUBJECTKEYIDENTIFIER "\0" szSUBJECTKEYIDENTIFIER_OLD, // pszFieldName
  843. NULL, // pszIndexName
  844. cchHASHMAX * sizeof(WCHAR), // dbcolumnMax
  845. 0, // dbgrbit
  846. JET_coltypText, // dbcoltyp
  847. 0 // dbcolumnid
  848. },
  849. #if (DTC_CERTIFICATERAWPUBLICKEY != 11)
  850. #error -- bad DTC_CERTIFICATERAWPUBLICKEY index
  851. #endif
  852. { // ColumnType: BLOB
  853. wszPROPCERTIFICATERAWPUBLICKEY, // pwszPropName
  854. NULL, // pwszPropNameObjId
  855. 0, // dwFlags
  856. CB_DBMAXBINARY, // dwcbMax
  857. TABLE_CERTIFICATES, // dwTable
  858. szPUBLICKEY, // pszFieldName
  859. NULL, // pszIndexName
  860. CB_DBMAXBINARY, // dbcolumnMax
  861. 0, // dbgrbit
  862. JET_coltypLongBinary, // dbcoltyp
  863. 0 // dbcolumnid
  864. },
  865. #if (DTC_CERTIFICATEPUBLICKEYLENGTH != 12)
  866. #error -- bad DTC_CERTIFICATEPUBLICKEYLENGTH index
  867. #endif
  868. { // ColumnType: DWORD
  869. wszPROPCERTIFICATEPUBLICKEYLENGTH, // pwszPropName
  870. NULL, // pwszPropNameObjId
  871. 0, // dwFlags
  872. sizeof(LONG), // dwcbMax
  873. TABLE_CERTIFICATES, // dwTable
  874. szPUBLICKEYLENGTH, // pszFieldName
  875. NULL, // pszIndexName
  876. 0, // dbcolumnMax
  877. JET_bitColumnFixed, // dbgrbit
  878. JET_coltypLong, // dbcoltyp
  879. 0 // dbcolumnid
  880. },
  881. #if (DTC_CERTIFICATEPUBLICKEYALGORITHM != 13)
  882. #error -- bad DTC_CERTIFICATEPUBLICKEYALGORITHM index
  883. #endif
  884. { // ColumnType: STRING
  885. wszPROPCERTIFICATEPUBLICKEYALGORITHM, // pwszPropName
  886. NULL, // pwszPropNameObjId
  887. 0, // dwFlags
  888. CB_DBMAXTEXT_OID, // dwcbMax
  889. TABLE_CERTIFICATES, // dwTable
  890. szPUBLICKEYALGORITHM, // pszFieldName
  891. NULL, // pszIndexName
  892. CB_DBMAXTEXT_OID, // dbcolumnMax
  893. 0, // dbgrbit
  894. JET_coltypText, // dbcoltyp
  895. 0 // dbcolumnid
  896. },
  897. #if (DTC_CERTIFICATERAWPUBLICKEYALGORITHMPARAMETERS != 14)
  898. #error -- bad DTC_CERTIFICATERAWPUBLICKEYALGORITHMPARAMETERS index
  899. #endif
  900. { // ColumnType: BLOB
  901. wszPROPCERTIFICATERAWPUBLICKEYALGORITHMPARAMETERS, // pwszPropName
  902. NULL, // pwszPropNameObjId
  903. 0, // dwFlags
  904. CB_DBMAXBINARY, // dwcbMax
  905. TABLE_CERTIFICATES, // dwTable
  906. szPUBLICKEYPARAMS, // pszFieldName
  907. NULL, // pszIndexName
  908. CB_DBMAXBINARY, // dbcolumnMax
  909. 0, // dbgrbit
  910. JET_coltypLongBinary, // dbcoltyp
  911. 0 // dbcolumnid
  912. },
  913. #if (DTC_CERTIFICATEUPN != 15)
  914. #error -- bad DTC_CERTIFICATEUPN index
  915. #endif
  916. { // ColumnType: STRING
  917. wszPROPCERTIFICATEUPN, // pwszPropName
  918. NULL, // pwszPropNameObjId
  919. DBTF_POLICYWRITEABLE | DBTF_INDEXIGNORENULL,// dwFlags
  920. CB_DBMAXTEXT_REQUESTNAME, // dwcbMax
  921. TABLE_CERTIFICATES, // dwTable
  922. szUPN, // pszFieldName
  923. szCERTIFICATE_UPNINDEX, // pszIndexName
  924. CB_DBMAXTEXT_REQUESTNAME, // dbcolumnMax
  925. 0, // dbgrbit
  926. JET_coltypLongText, // dbcoltyp
  927. 0 // dbcolumnid
  928. },
  929. #if (DTC_DISTINGUISHEDNAME != 16)
  930. #error -- bad DTC_DISTINGUISHEDNAME index
  931. #endif
  932. { // ColumnType: STRING
  933. wszPROPDISTINGUISHEDNAME, // pwszPropName
  934. NULL, // pwszPropNameObjId
  935. DBTF_SUBJECT, // dwFlags
  936. CB_DBMAXTEXT_RDN, // dwcbMax
  937. TABLE_CERTIFICATES, // dwTable
  938. szDISTINGUISHEDNAME, // pszFieldName
  939. NULL, // pszIndexName
  940. CB_DBMAXTEXT_DN, // dbcolumnMax
  941. 0, // dbgrbit
  942. JET_coltypLongText, // dbcoltyp
  943. 0 // dbcolumnid
  944. },
  945. #if (DTC_RAWNAME != 17)
  946. #error -- bad DTC_RAWNAME index
  947. #endif
  948. { // ColumnType: BLOB
  949. wszPROPRAWNAME, // pwszPropName
  950. NULL, // pwszPropNameObjId
  951. DBTF_SUBJECT, // dwFlags
  952. CB_DBMAXBINARY, // dwcbMax
  953. TABLE_CERTIFICATES, // dwTable
  954. szRAWNAME, // pszFieldName
  955. NULL, // pszIndexName
  956. CB_DBMAXBINARY, // dbcolumnMax
  957. 0, // dbgrbit
  958. JET_coltypLongBinary, // dbcoltyp
  959. 0 // dbcolumnid
  960. },
  961. #if (DTC_COUNTRY != 18)
  962. #error -- bad DTC_COUNTRY index
  963. #endif
  964. { // ColumnType: STRING
  965. wszPROPCOUNTRY, // pwszPropName
  966. TEXT(szOID_COUNTRY_NAME), // pwszPropNameObjId
  967. DBTF_POLICYWRITEABLE | DBTF_SUBJECT, // dwFlags
  968. CB_DBMAXTEXT_RDN, // dwcbMax
  969. TABLE_CERTIFICATES, // dwTable
  970. szCOUNTRY, // pszFieldName
  971. NULL, // pszIndexName
  972. CB_DBMAXTEXT_RDN, // dbcolumnMax
  973. 0, // dbgrbit
  974. JET_coltypLongText, // dbcoltyp
  975. 0 // dbcolumnid
  976. },
  977. #if (DTC_ORGANIZATION != 19)
  978. #error -- bad DTC_ORGANIZATION index
  979. #endif
  980. { // ColumnType: STRING
  981. wszPROPORGANIZATION, // pwszPropName
  982. TEXT(szOID_ORGANIZATION_NAME), // pwszPropNameObjId
  983. DBTF_POLICYWRITEABLE | DBTF_SUBJECT, // dwFlags
  984. CB_DBMAXTEXT_RDN, // dwcbMax
  985. TABLE_CERTIFICATES, // dwTable
  986. szORGANIZATION, // pszFieldName
  987. NULL, // pszIndexName
  988. CB_DBMAXTEXT_RDN, // dbcolumnMax
  989. 0, // dbgrbit
  990. JET_coltypLongText, // dbcoltyp
  991. 0 // dbcolumnid
  992. },
  993. #if (DTC_ORGUNIT != 20)
  994. #error -- bad DTC_ORGUNIT index
  995. #endif
  996. { // ColumnType: STRING
  997. wszPROPORGUNIT, // pwszPropName
  998. TEXT(szOID_ORGANIZATIONAL_UNIT_NAME), // pwszPropNameObjId
  999. DBTF_POLICYWRITEABLE | DBTF_SUBJECT, // dwFlags
  1000. CB_DBMAXTEXT_RDN, // dwcbMax
  1001. TABLE_CERTIFICATES, // dwTable
  1002. szORGANIZATIONALUNIT, // pszFieldName
  1003. NULL, // pszIndexName
  1004. CB_DBMAXTEXT_RDN, // dbcolumnMax
  1005. 0, // dbgrbit
  1006. JET_coltypLongText, // dbcoltyp
  1007. 0 // dbcolumnid
  1008. },
  1009. #if (DTC_COMMONNAME != 21)
  1010. #error -- bad DTC_COMMONNAME index
  1011. #endif
  1012. { // ColumnType: STRING
  1013. wszPROPCOMMONNAME, // pwszPropName
  1014. TEXT(szOID_COMMON_NAME), // pwszPropNameObjId
  1015. DBTF_POLICYWRITEABLE | DBTF_SUBJECT, // dwFlags
  1016. CB_DBMAXTEXT_RDN, // dwcbMax
  1017. TABLE_CERTIFICATES, // dwTable
  1018. szCOMMONNAME, // pszFieldName
  1019. szCERTIFICATE_COMMONNAMEINDEX, // pszIndexName
  1020. CB_DBMAXTEXT_RDN, // dbcolumnMax
  1021. 0, // dbgrbit
  1022. JET_coltypLongText, // dbcoltyp
  1023. 0 // dbcolumnid
  1024. },
  1025. #if (DTC_LOCALITY != 22)
  1026. #error -- bad DTC_LOCALITY index
  1027. #endif
  1028. { // ColumnType: STRING
  1029. wszPROPLOCALITY, // pwszPropName
  1030. TEXT(szOID_LOCALITY_NAME), // pwszPropNameObjId
  1031. DBTF_POLICYWRITEABLE | DBTF_SUBJECT, // dwFlags
  1032. CB_DBMAXTEXT_RDN, // dwcbMax
  1033. TABLE_CERTIFICATES, // dwTable
  1034. szLOCALITY, // pszFieldName
  1035. NULL, // pszIndexName
  1036. CB_DBMAXTEXT_RDN, // dbcolumnMax
  1037. 0, // dbgrbit
  1038. JET_coltypLongText, // dbcoltyp
  1039. 0 // dbcolumnid
  1040. },
  1041. #if (DTC_STATE != 23)
  1042. #error -- bad DTC_STATE index
  1043. #endif
  1044. { // ColumnType: STRING
  1045. wszPROPSTATE, // pwszPropName
  1046. TEXT(szOID_STATE_OR_PROVINCE_NAME), // pwszPropNameObjId
  1047. DBTF_POLICYWRITEABLE | DBTF_SUBJECT, // dwFlags
  1048. CB_DBMAXTEXT_RDN, // dwcbMax
  1049. TABLE_CERTIFICATES, // dwTable
  1050. szSTATEORPROVINCE, // pszFieldName
  1051. NULL, // pszIndexName
  1052. CB_DBMAXTEXT_RDN, // dbcolumnMax
  1053. 0, // dbgrbit
  1054. JET_coltypLongText, // dbcoltyp
  1055. 0 // dbcolumnid
  1056. },
  1057. #if (DTC_TITLE != 24)
  1058. #error -- bad DTC_TITLE index
  1059. #endif
  1060. { // ColumnType: STRING
  1061. wszPROPTITLE, // pwszPropName
  1062. TEXT(szOID_TITLE), // pwszPropNameObjId
  1063. DBTF_POLICYWRITEABLE | DBTF_SUBJECT, // dwFlags
  1064. CB_DBMAXTEXT_RDN, // dwcbMax
  1065. TABLE_CERTIFICATES, // dwTable
  1066. szTITLE, // pszFieldName
  1067. NULL, // pszIndexName
  1068. CB_DBMAXTEXT_RDN, // dbcolumnMax
  1069. 0, // dbgrbit
  1070. JET_coltypLongText, // dbcoltyp
  1071. 0 // dbcolumnid
  1072. },
  1073. #if (DTC_GIVENNAME != 25)
  1074. #error -- bad DTC_GIVENNAME index
  1075. #endif
  1076. { // ColumnType: STRING
  1077. wszPROPGIVENNAME, // pwszPropName
  1078. TEXT(szOID_GIVEN_NAME), // pwszPropNameObjId
  1079. DBTF_POLICYWRITEABLE | DBTF_SUBJECT, // dwFlags
  1080. CB_DBMAXTEXT_RDN, // dwcbMax
  1081. TABLE_CERTIFICATES, // dwTable
  1082. szGIVENNAME, // pszFieldName
  1083. NULL, // pszIndexName
  1084. CB_DBMAXTEXT_RDN, // dbcolumnMax
  1085. 0, // dbgrbit
  1086. JET_coltypLongText, // dbcoltyp
  1087. 0 // dbcolumnid
  1088. },
  1089. #if (DTC_INITIALS != 26)
  1090. #error -- bad DTC_INITIALS index
  1091. #endif
  1092. { // ColumnType: STRING
  1093. wszPROPINITIALS, // pwszPropName
  1094. TEXT(szOID_INITIALS), // pwszPropNameObjId
  1095. DBTF_POLICYWRITEABLE | DBTF_SUBJECT, // dwFlags
  1096. CB_DBMAXTEXT_RDN, // dwcbMax
  1097. TABLE_CERTIFICATES, // dwTable
  1098. szINITIALS, // pszFieldName
  1099. NULL, // pszIndexName
  1100. CB_DBMAXTEXT_RDN, // dbcolumnMax
  1101. 0, // dbgrbit
  1102. JET_coltypLongText, // dbcoltyp
  1103. 0 // dbcolumnid
  1104. },
  1105. #if (DTC_SURNAME != 27)
  1106. #error -- bad DTC_SURNAME index
  1107. #endif
  1108. { // ColumnType: STRING
  1109. wszPROPSURNAME, // pwszPropName
  1110. TEXT(szOID_SUR_NAME), // pwszPropNameObjId
  1111. DBTF_POLICYWRITEABLE | DBTF_SUBJECT, // dwFlags
  1112. CB_DBMAXTEXT_RDN, // dwcbMax
  1113. TABLE_CERTIFICATES, // dwTable
  1114. szSURNAME, // pszFieldName
  1115. NULL, // pszIndexName
  1116. CB_DBMAXTEXT_RDN, // dbcolumnMax
  1117. 0, // dbgrbit
  1118. JET_coltypLongText, // dbcoltyp
  1119. 0 // dbcolumnid
  1120. },
  1121. #if (DTC_DOMAINCOMPONENT != 28)
  1122. #error -- bad DTC_DOMAINCOMPONENT index
  1123. #endif
  1124. { // ColumnType: STRING
  1125. wszPROPDOMAINCOMPONENT, // pwszPropName
  1126. TEXT(szOID_DOMAIN_COMPONENT), // pwszPropNameObjId
  1127. DBTF_POLICYWRITEABLE | DBTF_SUBJECT, // dwFlags
  1128. CB_DBMAXTEXT_RDN, // dwcbMax
  1129. TABLE_CERTIFICATES, // dwTable
  1130. szDOMAINCOMPONENT, // pszFieldName
  1131. NULL, // pszIndexName
  1132. CB_DBMAXTEXT_RDN, // dbcolumnMax
  1133. 0, // dbgrbit
  1134. JET_coltypLongText, // dbcoltyp
  1135. 0 // dbcolumnid
  1136. },
  1137. #if (DTC_EMAIL != 29)
  1138. #error -- bad DTC_EMAIL index
  1139. #endif
  1140. { // ColumnType: STRING
  1141. wszPROPEMAIL, // pwszPropName
  1142. TEXT(szOID_RSA_emailAddr), // pwszPropNameObjId
  1143. DBTF_POLICYWRITEABLE | DBTF_SUBJECT, // dwFlags
  1144. CB_DBMAXTEXT_RDN, // dwcbMax
  1145. TABLE_CERTIFICATES, // dwTable
  1146. szEMAIL, // pszFieldName
  1147. NULL, // pszIndexName
  1148. CB_DBMAXTEXT_RDN, // dbcolumnMax
  1149. 0, // dbgrbit
  1150. JET_coltypLongText, // dbcoltyp
  1151. 0 // dbcolumnid
  1152. },
  1153. #if (DTC_STREETADDRESS != 30)
  1154. #error -- bad DTC_STREETADDRESS index
  1155. #endif
  1156. { // ColumnType: STRING
  1157. wszPROPSTREETADDRESS, // pwszPropName
  1158. TEXT(szOID_STREET_ADDRESS), // pwszPropNameObjId
  1159. DBTF_POLICYWRITEABLE | DBTF_SUBJECT, // dwFlags
  1160. CB_DBMAXTEXT_RDN, // dwcbMax
  1161. TABLE_CERTIFICATES, // dwTable
  1162. szSTREETADDRESS, // pszFieldName
  1163. NULL, // pszIndexName
  1164. CB_DBMAXTEXT_RDN, // dbcolumnMax
  1165. 0, // dbgrbit
  1166. JET_coltypLongText, // dbcoltyp
  1167. 0 // dbcolumnid
  1168. },
  1169. #if (DTC_UNSTRUCTUREDNAME != 31)
  1170. #error -- bad DTC_UNSTRUCTUREDNAME index
  1171. #endif
  1172. { // ColumnType: STRING
  1173. wszPROPUNSTRUCTUREDNAME, // pwszPropName
  1174. TEXT(szOID_RSA_unstructName), // pwszPropNameObjId
  1175. DBTF_POLICYWRITEABLE | DBTF_SUBJECT | DBTF_SOFTFAIL, // dwFlags
  1176. CB_DBMAXTEXT_RDN, // dwcbMax
  1177. TABLE_CERTIFICATES, // dwTable
  1178. szUNSTRUCTUREDNAME, // pszFieldName
  1179. NULL, // pszIndexName
  1180. CB_DBMAXTEXT_RDN, // dbcolumnMax
  1181. 0, // dbgrbit
  1182. JET_coltypLongText, // dbcoltyp
  1183. 0 // dbcolumnid
  1184. },
  1185. #if (DTC_UNSTRUCTUREDADDRESS != 32)
  1186. #error -- bad DTC_UNSTRUCTUREDADDRESS index
  1187. #endif
  1188. { // ColumnType: STRING
  1189. wszPROPUNSTRUCTUREDADDRESS, // pwszPropName
  1190. TEXT(szOID_RSA_unstructAddr), // pwszPropNameObjId
  1191. DBTF_POLICYWRITEABLE | DBTF_SUBJECT | DBTF_SOFTFAIL, // dwFlags
  1192. CB_DBMAXTEXT_RDN, // dwcbMax
  1193. TABLE_CERTIFICATES, // dwTable
  1194. szUNSTRUCTUREDADDRESS, // pszFieldName
  1195. NULL, // pszIndexName
  1196. CB_DBMAXTEXT_RDN, // dbcolumnMax
  1197. 0, // dbgrbit
  1198. JET_coltypLongText, // dbcoltyp
  1199. 0 // dbcolumnid
  1200. },
  1201. #if (DTC_DEVICESERIALNUMBER != 33)
  1202. #error -- bad DTC_DEVICESERIALNUMBER index
  1203. #endif
  1204. { // ColumnType: STRING
  1205. wszPROPDEVICESERIALNUMBER, // pwszPropName
  1206. TEXT(szOID_DEVICE_SERIAL_NUMBER), // pwszPropNameObjId
  1207. DBTF_POLICYWRITEABLE | DBTF_SUBJECT | DBTF_SOFTFAIL, // dwFlags
  1208. CB_DBMAXTEXT_RDN, // dwcbMax
  1209. TABLE_CERTIFICATES, // dwTable
  1210. szDEVICESERIALNUMBER, // pszFieldName
  1211. NULL, // pszIndexName
  1212. CB_DBMAXTEXT_RDN, // dbcolumnMax
  1213. 0, // dbgrbit
  1214. JET_coltypLongText, // dbcoltyp
  1215. 0 // dbcolumnid
  1216. },
  1217. #if (DTC_MAX != 34)
  1218. #error -- bad DTC_MAX index
  1219. #endif
  1220. DBTABLE_NULL // Termination marker
  1221. };
  1222. //---------------------------------------------------------------------------
  1223. //
  1224. // Request Attributes Table:
  1225. //
  1226. //---------------------------------------------------------------------------
  1227. DBTABLE g_adtRequestAttributes[] =
  1228. {
  1229. #if (DTA_REQUESTID != 0)
  1230. #error -- bad DTA_REQUESTID index
  1231. #endif
  1232. { // ColumnType: DWORD
  1233. wszPROPATTRIBREQUESTID, // pwszPropName
  1234. NULL, // pwszPropNameObjId
  1235. 0, // dwFlags
  1236. sizeof(LONG), // dwcbMax
  1237. TABLE_ATTRIBUTES, // dwTable
  1238. szREQUESTID, // pszFieldName
  1239. szATTRIBUTE_REQUESTIDINDEX, // pszIndexName
  1240. 0, // dbcolumnMax
  1241. JET_bitColumnFixed, // dbgrbit
  1242. JET_coltypLong, // dbcoltyp
  1243. 0, // dbcolumnid
  1244. },
  1245. #if (DTA_ATTRIBUTENAME != 1)
  1246. #error -- bad DTA_ATTRIBUTENAME index
  1247. #endif
  1248. { // ColumnType: STRING
  1249. wszPROPATTRIBNAME, // pwszPropName
  1250. NULL, // pwszPropNameObjId
  1251. DBTF_INDEXREQUESTID, // dwFlags
  1252. CB_DBMAXTEXT_ATTRNAME, // dwcbMax
  1253. TABLE_ATTRIBUTES, // dwTable
  1254. szATTRIBUTENAME, // pszFieldName
  1255. szATTRIBUTE_REQUESTIDNAMEINDEX, // pszIndexName
  1256. CB_DBMAXTEXT_ATTRNAME, // dbcolumnMax
  1257. 0, // dbgrbit
  1258. JET_coltypText, // dbcoltyp
  1259. 0, // dbcolumnid
  1260. },
  1261. #if (DTA_ATTRIBUTEVALUE != 2)
  1262. #error -- bad DTA_ATTRIBUTEVALUE index
  1263. #endif
  1264. { // ColumnType: STRING
  1265. wszPROPATTRIBVALUE, // pwszPropName
  1266. NULL, // pwszPropNameObjId
  1267. 0, // dwFlags
  1268. CB_DBMAXTEXT_ATTRVALUE, // dwcbMax
  1269. TABLE_ATTRIBUTES, // dwTable
  1270. szATTRIBUTEVALUE, // pszFieldName
  1271. NULL, // pszIndexName
  1272. CB_DBMAXTEXT_ATTRVALUE, // dbcolumnMax
  1273. 0, // dbgrbit
  1274. JET_coltypLongText, // dbcoltyp
  1275. 0, // dbcolumnid
  1276. },
  1277. #if (DTA_MAX != 3)
  1278. #error -- bad DTA_MAX index
  1279. #endif
  1280. DBTABLE_NULL // Termination marker
  1281. };
  1282. //---------------------------------------------------------------------------
  1283. //
  1284. // Name Extensions Table:
  1285. //
  1286. //---------------------------------------------------------------------------
  1287. #if 0
  1288. WCHAR const wszDummy[] = L"Dummy Prop Name";
  1289. DBTABLE g_adtNameExtensions[] =
  1290. {
  1291. { // ColumnType: DWORD
  1292. wszDummy, // pwszPropName
  1293. NULL, // pwszPropNameObjId
  1294. 0, // dwFlags
  1295. sizeof(LONG), // dwcbMax
  1296. TABLE_NAMES, // dwTable
  1297. szNAMEID, // pszFieldName
  1298. NULL, // pszIndexName
  1299. 0, // dbcolumnMax
  1300. JET_bitColumnFixed, // dbgrbit
  1301. JET_coltypLong, // dbcoltyp
  1302. 0, // dbcolumnid
  1303. },
  1304. { // ColumnType: STRING
  1305. wszDummy, // pwszPropName
  1306. NULL, // pwszPropNameObjId
  1307. 0, // dwFlags
  1308. CB_DBMAXTEXT_OID, // dwcbMax
  1309. TABLE_NAMES, // dwTable
  1310. szEXTENSIONNAME, // pszFieldName
  1311. NULL, // pszIndexName
  1312. CB_DBMAXTEXT_OID, // dbcolumnMax
  1313. 0, // dbgrbit
  1314. JET_coltypText, // dbcoltyp
  1315. 0, // dbcolumnid
  1316. },
  1317. { // ColumnType: STRING
  1318. wszDummy, // pwszPropName
  1319. NULL, // pwszPropNameObjId
  1320. 0, // dwFlags
  1321. CB_DBMAXTEXT_RDN, // dwcbMax
  1322. TABLE_NAMES, // dwTable
  1323. szEXTENSIONVALUE, // pszFieldName
  1324. NULL, // pszIndexName
  1325. CB_DBMAXTEXT_RDN, // dbcolumnMax
  1326. 0, // dbgrbit
  1327. JET_coltypLongText, // dbcoltyp
  1328. 0, // dbcolumnid
  1329. },
  1330. DBTABLE_NULL // Termination marker
  1331. };
  1332. #endif
  1333. //---------------------------------------------------------------------------
  1334. //
  1335. // Certificate Extensions Table:
  1336. //
  1337. //---------------------------------------------------------------------------
  1338. DBTABLE g_adtCertExtensions[] =
  1339. {
  1340. #if (DTE_REQUESTID != 0)
  1341. #error -- bad DTE_REQUESTID index
  1342. #endif
  1343. { // ColumnType: DWORD
  1344. wszPROPEXTREQUESTID, // pwszPropName
  1345. NULL, // pwszPropNameObjId
  1346. 0, // dwFlags
  1347. sizeof(LONG), // dwcbMax
  1348. TABLE_EXTENSIONS, // dwTable
  1349. szREQUESTID, // pszFieldName
  1350. szEXTENSION_REQUESTIDINDEX, // pszIndexName
  1351. 0, // dbcolumnMax
  1352. JET_bitColumnFixed, // dbgrbit
  1353. JET_coltypLong, // dbcoltyp
  1354. 0, // dbcolumnid
  1355. },
  1356. #if (DTE_EXTENSIONNAME != 1)
  1357. #error -- bad DTE_EXTENSIONNAME index
  1358. #endif
  1359. { // ColumnType: STRING
  1360. wszPROPEXTNAME, // pwszPropName
  1361. NULL, // pwszPropNameObjId
  1362. DBTF_INDEXREQUESTID, // dwFlags
  1363. CB_DBMAXTEXT_OID, // dwcbMax
  1364. TABLE_EXTENSIONS, // dwTable
  1365. szEXTENSIONNAME, // pszFieldName
  1366. szEXTENSION_REQUESTIDNAMEINDEX, // pszIndexName
  1367. CB_DBMAXTEXT_OID, // dbcolumnMax
  1368. 0, // dbgrbit
  1369. JET_coltypText, // dbcoltyp
  1370. 0, // dbcolumnid
  1371. },
  1372. #if (DTE_EXTENSIONFLAGS != 2)
  1373. #error -- bad DTE_EXTENSIONFLAGS index
  1374. #endif
  1375. { // ColumnType: DWORD
  1376. wszPROPEXTFLAGS, // pwszPropName
  1377. NULL, // pwszPropNameObjId
  1378. 0, // dwFlags
  1379. sizeof(LONG), // dwcbMax
  1380. TABLE_EXTENSIONS, // dwTable
  1381. szEXTENSIONFLAGS, // pszFieldName
  1382. NULL, // pszIndexName
  1383. 0, // dbcolumnMax
  1384. JET_bitColumnFixed, // dbgrbit
  1385. JET_coltypLong, // dbcoltyp
  1386. 0, // dbcolumnid
  1387. },
  1388. #if (DTE_EXTENSIONRAWVALUE != 3)
  1389. #error -- bad DTE_EXTENSIONRAWVALUE index
  1390. #endif
  1391. { // ColumnType: BLOB
  1392. wszPROPEXTRAWVALUE, // pwszPropName
  1393. NULL, // pwszPropNameObjId
  1394. 0, // dwFlags
  1395. CB_DBMAXBINARY, // dwcbMax
  1396. TABLE_EXTENSIONS, // dwTable
  1397. szEXTENSIONRAWVALUE, // pszFieldName
  1398. NULL, // pszIndexName
  1399. CB_DBMAXBINARY, // dbcolumnMax
  1400. 0, // dbgrbit
  1401. JET_coltypLongBinary, // dbcoltyp
  1402. 0, // dbcolumnid
  1403. },
  1404. #if (DTE_MAX != 4)
  1405. #error -- bad DTE_MAX index
  1406. #endif
  1407. DBTABLE_NULL // Termination marker
  1408. };
  1409. //---------------------------------------------------------------------------
  1410. //
  1411. // CRL Table:
  1412. //
  1413. //---------------------------------------------------------------------------
  1414. DBTABLE g_adtCRLs[] =
  1415. {
  1416. #if (DTL_ROWID != 0)
  1417. #error -- bad DTL_ROWID index
  1418. #endif
  1419. { // ColumnType: DWORD
  1420. wszPROPCRLROWID, // pwszPropName
  1421. NULL, // pwszPropNameObjId
  1422. DBTF_INDEXPRIMARY, // dwFlags
  1423. sizeof(LONG), // dwcbMax
  1424. TABLE_CRLS, // dwTable
  1425. szCRLROWID, // pszFieldName
  1426. szCRL_ROWIDINDEX, // pszIndexName
  1427. 0, // dbcolumnMax
  1428. JET_bitColumnFixed | JET_bitColumnAutoincrement, // dbgrbit
  1429. JET_coltypLong, // dbcoltyp
  1430. 0 // dbcolumnid
  1431. },
  1432. #if (DTL_NUMBER != 1)
  1433. #error -- bad DTL_NUMBER index
  1434. #endif
  1435. { // ColumnType: DWORD
  1436. wszPROPCRLNUMBER, // pwszPropName
  1437. NULL, // pwszPropNameObjId
  1438. 0, // dwFlags
  1439. sizeof(LONG), // dwcbMax
  1440. TABLE_CRLS, // dwTable
  1441. szCRLNUMBER, // pszFieldName
  1442. szCRL_CRLNUMBERINDEX, // pszIndexName
  1443. 0, // dbcolumnMax
  1444. JET_bitColumnFixed, // dbgrbit
  1445. JET_coltypLong, // dbcoltyp
  1446. 0 // dbcolumnid
  1447. },
  1448. #if (DTL_MINBASE != 2)
  1449. #error -- bad DTL_MINBASE index
  1450. #endif
  1451. { // ColumnType: DWORD
  1452. wszPROPCRLMINBASE, // pwszPropName
  1453. NULL, // pwszPropNameObjId
  1454. 0, // dwFlags
  1455. sizeof(LONG), // dwcbMax
  1456. TABLE_CRLS, // dwTable
  1457. szCRLMINBASE, // pszFieldName
  1458. NULL, // pszIndexName
  1459. 0, // dbcolumnMax
  1460. JET_bitColumnFixed, // dbgrbit
  1461. JET_coltypLong, // dbcoltyp
  1462. 0 // dbcolumnid
  1463. },
  1464. #if (DTL_NAMEID != 3)
  1465. #error -- bad DTL_NAMEID index
  1466. #endif
  1467. { // ColumnType: DWORD
  1468. wszPROPCRLNAMEID, // pwszPropName
  1469. NULL, // pwszPropNameObjId
  1470. 0, // dwFlags
  1471. sizeof(LONG), // dwcbMax
  1472. TABLE_CRLS, // dwTable
  1473. szCRLNAMEID, // pszFieldName
  1474. NULL, // pszIndexName
  1475. 0, // dbcolumnMax
  1476. JET_bitColumnFixed, // dbgrbit
  1477. JET_coltypLong, // dbcoltyp
  1478. 0 // dbcolumnid
  1479. },
  1480. #if (DTL_COUNT != 4)
  1481. #error -- bad DTL_COUNT index
  1482. #endif
  1483. { // ColumnType: DWORD
  1484. wszPROPCRLCOUNT, // pwszPropName
  1485. NULL, // pwszPropNameObjId
  1486. 0, // dwFlags
  1487. sizeof(LONG), // dwcbMax
  1488. TABLE_CRLS, // dwTable
  1489. szCRLCOUNT, // pszFieldName
  1490. NULL, // pszIndexName
  1491. 0, // dbcolumnMax
  1492. JET_bitColumnFixed, // dbgrbit
  1493. JET_coltypLong, // dbcoltyp
  1494. 0 // dbcolumnid
  1495. },
  1496. #if (DTL_THISUPDATEDATE != 5)
  1497. #error -- bad DTL_THISUPDATEDATE index
  1498. #endif
  1499. { // ColumnType: FILETIME
  1500. wszPROPCRLTHISUPDATE, // pwszPropName
  1501. NULL, // pwszPropNameObjId
  1502. 0, // dwFlags
  1503. sizeof(DATE), // dwcbMax
  1504. TABLE_CRLS, // dwTable
  1505. szCRLTHISUPDATE, // pszFieldName
  1506. NULL, // pszIndexName
  1507. 0, // dbcolumnMax
  1508. JET_bitColumnFixed, // dbgrbit
  1509. JET_coltypDateTime, // dbcoltyp
  1510. 0 // dbcolumnid
  1511. },
  1512. #if (DTL_NEXTUPDATEDATE != 6)
  1513. #error -- bad DTL_NEXTUPDATEDATE index
  1514. #endif
  1515. { // ColumnType: FILETIME
  1516. wszPROPCRLNEXTUPDATE, // pwszPropName
  1517. NULL, // pwszPropNameObjId
  1518. 0, // dwFlags
  1519. sizeof(DATE), // dwcbMax
  1520. TABLE_CRLS, // dwTable
  1521. szCRLNEXTUPDATE, // pszFieldName
  1522. szCRL_CRLNEXTUPDATEINDEX, // pszIndexName
  1523. 0, // dbcolumnMax
  1524. JET_bitColumnFixed, // dbgrbit
  1525. JET_coltypDateTime, // dbcoltyp
  1526. 0 // dbcolumnid
  1527. },
  1528. #if (DTL_THISPUBLISHDATE != 7)
  1529. #error -- bad DTL_THISPUBLISHDATE index
  1530. #endif
  1531. { // ColumnType: FILETIME
  1532. wszPROPCRLTHISPUBLISH, // pwszPropName
  1533. NULL, // pwszPropNameObjId
  1534. 0, // dwFlags
  1535. sizeof(DATE), // dwcbMax
  1536. TABLE_CRLS, // dwTable
  1537. szCRLTHISPUBLISH, // pszFieldName
  1538. NULL, // pszIndexName
  1539. 0, // dbcolumnMax
  1540. JET_bitColumnFixed, // dbgrbit
  1541. JET_coltypDateTime, // dbcoltyp
  1542. 0 // dbcolumnid
  1543. },
  1544. #if (DTL_NEXTPUBLISHDATE != 8)
  1545. #error -- bad DTL_NEXTPUBLISHDATE index
  1546. #endif
  1547. { // ColumnType: FILETIME
  1548. wszPROPCRLNEXTPUBLISH, // pwszPropName
  1549. NULL, // pwszPropNameObjId
  1550. 0, // dwFlags
  1551. sizeof(DATE), // dwcbMax
  1552. TABLE_CRLS, // dwTable
  1553. szCRLNEXTPUBLISH, // pszFieldName
  1554. szCRL_CRLNEXTPUBLISHINDEX, // pszIndexName
  1555. 0, // dbcolumnMax
  1556. JET_bitColumnFixed, // dbgrbit
  1557. JET_coltypDateTime, // dbcoltyp
  1558. 0 // dbcolumnid
  1559. },
  1560. #if (DTL_EFFECTIVEDATE != 9)
  1561. #error -- bad DTL_EFFECTIVEDATE index
  1562. #endif
  1563. { // ColumnType: FILETIME
  1564. wszPROPCRLEFFECTIVE, // pwszPropName
  1565. NULL, // pwszPropNameObjId
  1566. 0, // dwFlags
  1567. sizeof(DATE), // dwcbMax
  1568. TABLE_CRLS, // dwTable
  1569. szCRLEFFECTIVE, // pszFieldName
  1570. NULL, // pszIndexName
  1571. 0, // dbcolumnMax
  1572. JET_bitColumnFixed, // dbgrbit
  1573. JET_coltypDateTime, // dbcoltyp
  1574. 0 // dbcolumnid
  1575. },
  1576. #if (DTL_PROPAGATIONCOMPLETEDATE != 10)
  1577. #error -- bad DTL_PROPAGATIONCOMPLETEDATE index
  1578. #endif
  1579. { // ColumnType: FILETIME
  1580. wszPROPCRLPROPAGATIONCOMPLETE, // pwszPropName
  1581. NULL, // pwszPropNameObjId
  1582. 0, // dwFlags
  1583. sizeof(DATE), // dwcbMax
  1584. TABLE_CRLS, // dwTable
  1585. szCRLPROPAGATIONCOMPLETE, // pszFieldName
  1586. szCRL_CRLPROPAGATIONCOMPLETEINDEX, // pszIndexName
  1587. 0, // dbcolumnMax
  1588. JET_bitColumnFixed, // dbgrbit
  1589. JET_coltypDateTime, // dbcoltyp
  1590. 0 // dbcolumnid
  1591. },
  1592. #if (DTL_LASTPUBLISHEDDATE != 11)
  1593. #error -- bad DTL_LASTPUBLISHEDDATE index
  1594. #endif
  1595. { // ColumnType: FILETIME
  1596. wszPROPCRLLASTPUBLISHED, // pwszPropName
  1597. NULL, // pwszPropNameObjId
  1598. 0, // dwFlags
  1599. sizeof(DATE), // dwcbMax
  1600. TABLE_CRLS, // dwTable
  1601. szCRLLASTPUBLISHED, // pszFieldName
  1602. szCRL_CRLLASTPUBLISHEDINDEX, // pszIndexName
  1603. 0, // dbcolumnMax
  1604. JET_bitColumnFixed, // dbgrbit
  1605. JET_coltypDateTime, // dbcoltyp
  1606. 0 // dbcolumnid
  1607. },
  1608. #if (DTL_PUBLISHATTEMPTS != 12)
  1609. #error -- bad DTL_PUBLISHATTEMPTS index
  1610. #endif
  1611. { // ColumnType: DWORD
  1612. wszPROPCRLPUBLISHATTEMPTS, // pwszPropName
  1613. NULL, // pwszPropNameObjId
  1614. 0, // dwFlags
  1615. sizeof(LONG), // dwcbMax
  1616. TABLE_CRLS, // dwTable
  1617. szCRLPUBLISHATTEMPTS, // pszFieldName
  1618. szCRL_CRLPUBLISHATTEMPTSINDEX, // pszIndexName
  1619. 0, // dbcolumnMax
  1620. JET_bitColumnFixed, // dbgrbit
  1621. JET_coltypLong, // dbcoltyp
  1622. 0 // dbcolumnid
  1623. },
  1624. #if (DTL_PUBLISHFLAGS != 13)
  1625. #error -- bad DTL_PUBLISHFLAGS index
  1626. #endif
  1627. { // ColumnType: DWORD
  1628. wszPROPCRLPUBLISHFLAGS, // pwszPropName
  1629. NULL, // pwszPropNameObjId
  1630. 0, // dwFlags
  1631. sizeof(LONG), // dwcbMax
  1632. TABLE_CRLS, // dwTable
  1633. szCRLPUBLISHFLAGS, // pszFieldName
  1634. NULL, // pszIndexName
  1635. 0, // dbcolumnMax
  1636. JET_bitColumnFixed, // dbgrbit
  1637. JET_coltypLong, // dbcoltyp
  1638. 0 // dbcolumnid
  1639. },
  1640. #if (DTL_PUBLISHSTATUSCODE != 14)
  1641. #error -- bad DTL_PUBLISHSTATUSCODE index
  1642. #endif
  1643. { // ColumnType: DWORD
  1644. wszPROPCRLPUBLISHSTATUSCODE, // pwszPropName
  1645. NULL, // pwszPropNameObjId
  1646. 0, // dwFlags
  1647. sizeof(LONG), // dwcbMax
  1648. TABLE_CRLS, // dwTable
  1649. szCRLPUBLISHSTATUSCODE, // pszFieldName
  1650. szCRL_CRLPUBLSTATUSCODEISHINDEX, // pszIndexName
  1651. 0, // dbcolumnMax
  1652. JET_bitColumnFixed, // dbgrbit
  1653. JET_coltypLong, // dbcoltyp
  1654. 0 // dbcolumnid
  1655. },
  1656. #if (DTL_PUBLISHERROR != 15)
  1657. #error -- bad DTL_PUBLISHERROR index
  1658. #endif
  1659. { // ColumnType: STRING
  1660. wszPROPCRLPUBLISHERROR, // pwszPropName
  1661. NULL, // pwszPropNameObjId
  1662. DBTF_COLUMNRENAMED, // dwFlags
  1663. CB_DBMAXTEXT_DISPSTRING, // dwcbMax
  1664. TABLE_CRLS, // dwTable
  1665. szCRLPUBLISHERROR "\0" szCRLPUBLISHERROR_OLD, // pszFieldName
  1666. NULL, // pszIndexName
  1667. CB_DBMAXTEXT_DISPSTRING, // dwcbMax
  1668. 0, // dbgrbit
  1669. JET_coltypLongText, // dbcoltyp
  1670. 0, // dbcolumnid
  1671. },
  1672. #if (DTL_RAWCRL != 16)
  1673. #error -- bad DTL_RAWCRL index
  1674. #endif
  1675. { // ColumnType: BLOB
  1676. wszPROPCRLRAWCRL, // pwszPropName
  1677. NULL, // pwszPropNameObjId
  1678. 0, // dwFlags
  1679. CB_DBMAXRAWCRL, // dwcbMax
  1680. TABLE_CRLS, // dwTable
  1681. szRAWCRL, // pszFieldName
  1682. NULL, // pszIndexName
  1683. CB_DBMAXRAWCRL, // dbcolumnMax
  1684. 0, // dbgrbit
  1685. JET_coltypLongBinary, // dbcoltyp
  1686. 0, // dbcolumnid
  1687. },
  1688. #if (DTL_MAX != 17)
  1689. #error -- bad DTL_MAX index
  1690. #endif
  1691. DBTABLE_NULL // Termination marker
  1692. };
  1693. DBAUXDATA g_dbauxRequests = {
  1694. szREQUESTTABLE, // pszTable
  1695. szREQUEST_REQUESTIDINDEX, // pszRowIdIndex
  1696. NULL, // pszRowIdNameIndex
  1697. NULL, // pszNameIndex
  1698. &g_adtRequests[DTR_REQUESTID], // pdtRowId
  1699. NULL, // pdtName
  1700. NULL, // pdtFlags
  1701. NULL, // pdtValue
  1702. NULL, // pdtIssuerNameId
  1703. };
  1704. DBAUXDATA g_dbauxCertificates = {
  1705. szCERTIFICATETABLE, // pszTable
  1706. szCERTIFICATE_REQUESTIDINDEX, // pszRowIdIndex
  1707. NULL, // pszRowIdNameIndex
  1708. szCERTIFICATE_SERIALNUMBERINDEX, // pszNameIndex
  1709. &g_adtCertificates[DTC_REQUESTID], // pdtRowId
  1710. &g_adtCertificates[DTC_CERTIFICATESERIALNUMBER],// pdtName
  1711. NULL, // pdtFlags
  1712. NULL, // pdtValue
  1713. &g_adtCertificates[DTC_CERTIFICATEISSUERNAMEID],// pdtIssuerNameId
  1714. };
  1715. DBAUXDATA g_dbauxAttributes = {
  1716. szREQUESTATTRIBUTETABLE, // pszTable
  1717. szATTRIBUTE_REQUESTIDINDEX, // pszRowIdIndex
  1718. szATTRIBUTE_REQUESTIDNAMEINDEX, // pszRowIdNameIndex
  1719. NULL, // pszNameIndex
  1720. &g_adtRequestAttributes[DTA_REQUESTID], // pdtRowId
  1721. &g_adtRequestAttributes[DTA_ATTRIBUTENAME], // pdtName
  1722. NULL, // pdtFlags
  1723. &g_adtRequestAttributes[DTA_ATTRIBUTEVALUE],// pdtValue
  1724. NULL, // pdtIssuerNameId
  1725. };
  1726. DBAUXDATA g_dbauxExtensions = {
  1727. szCERTIFICATEEXTENSIONTABLE, // pszTable
  1728. szEXTENSION_REQUESTIDINDEX, // pszRowIdIndex
  1729. szEXTENSION_REQUESTIDNAMEINDEX, // pszRowIdNameIndex
  1730. NULL, // pszNameIndex
  1731. &g_adtCertExtensions[DTE_REQUESTID], // pdtRowId
  1732. &g_adtCertExtensions[DTE_EXTENSIONNAME], // pdtName
  1733. &g_adtCertExtensions[DTE_EXTENSIONFLAGS], // pdtFlags
  1734. &g_adtCertExtensions[DTE_EXTENSIONRAWVALUE],// pdtValue
  1735. NULL, // pdtIssuerNameId
  1736. };
  1737. DBAUXDATA g_dbauxCRLs = {
  1738. szCRLTABLE, // pszTable
  1739. szCRL_ROWIDINDEX, // pszRowIdIndex
  1740. NULL, // pszRowIdNameIndex
  1741. NULL, // pszNameIndex
  1742. &g_adtCRLs[DTL_ROWID], // pdtRowId
  1743. NULL, // pdtName
  1744. NULL, // pdtFlags
  1745. NULL, // pdtValue
  1746. &g_adtCRLs[DTL_NAMEID], // pdtIssuerNameId
  1747. };
  1748. DBCREATETABLE const g_actDataBase[] = {
  1749. { szCERTIFICATETABLE, &g_dbauxCertificates, g_adtCertificates },
  1750. { szREQUESTTABLE, &g_dbauxRequests, g_adtRequests },
  1751. { szREQUESTATTRIBUTETABLE, &g_dbauxAttributes, g_adtRequestAttributes },
  1752. //{ szNAMEEXTENSIONTABLE, &g_dbauxNameExtensions, g_adtNameExtensions },
  1753. { szCERTIFICATEEXTENSIONTABLE, &g_dbauxExtensions, g_adtCertExtensions },
  1754. { szCRLTABLE, &g_dbauxCRLs, g_adtCRLs },
  1755. { NULL, NULL, NULL },
  1756. };
  1757. // Note: Ordered DUPTABLE must include all Names Table columns.
  1758. DUPTABLE const g_dntr[] =
  1759. {
  1760. { "Country", wszPROPSUBJECTCOUNTRY, },
  1761. { "Organization", wszPROPSUBJECTORGANIZATION, },
  1762. { "OrganizationalUnit", wszPROPSUBJECTORGUNIT, },
  1763. { "CommonName", wszPROPSUBJECTCOMMONNAME, },
  1764. { "Locality", wszPROPSUBJECTLOCALITY, },
  1765. { "StateOrProvince", wszPROPSUBJECTSTATE, },
  1766. { "Title", wszPROPSUBJECTTITLE, },
  1767. { "GivenName", wszPROPSUBJECTGIVENNAME, },
  1768. { "Initials", wszPROPSUBJECTINITIALS, },
  1769. { "SurName", wszPROPSUBJECTSURNAME, },
  1770. { "DomainComponent", wszPROPSUBJECTDOMAINCOMPONENT, },
  1771. { "EMailAddress", wszPROPSUBJECTEMAIL, },
  1772. { "StreetAddress", wszPROPSUBJECTSTREETADDRESS, },
  1773. { "UnstructuredName", wszPROPSUBJECTUNSTRUCTUREDNAME, },
  1774. { "UnstructuredAddress", wszPROPSUBJECTUNSTRUCTUREDADDRESS, },
  1775. { "DeviceSerialNumber", wszPROPSUBJECTDEVICESERIALNUMBER, },
  1776. { NULL, NULL },
  1777. };
  1778. DWORD g_aColumnViewQueue[] =
  1779. {
  1780. DTI_REQUESTTABLE | DTR_REQUESTID,
  1781. DTI_REQUESTTABLE | DTR_REQUESTERNAME,
  1782. DTI_REQUESTTABLE | DTR_REQUESTSUBMITTEDWHEN,
  1783. DTI_REQUESTTABLE | DTR_REQUESTDISPOSITIONMESSAGE,
  1784. DTI_REQUESTTABLE | DTR_COMMONNAME,
  1785. DTI_REQUESTTABLE | DTR_EMAIL,
  1786. DTI_REQUESTTABLE | DTR_ORGUNIT,
  1787. DTI_REQUESTTABLE | DTR_ORGANIZATION,
  1788. DTI_REQUESTTABLE | DTR_LOCALITY,
  1789. DTI_REQUESTTABLE | DTR_STATE,
  1790. DTI_REQUESTTABLE | DTR_COUNTRY,
  1791. DTI_REQUESTTABLE | DTR_REQUESTRAWREQUEST,
  1792. //DTI_REQUESTTABLE | DTR_REQUESTRAWARCHIVEDKEY,
  1793. //DTI_REQUESTTABLE | DTR_REQUESTKEYRECOVERYHASHES,
  1794. //DTI_REQUESTTABLE | DTR_STREETADDRESS,
  1795. //DTI_REQUESTTABLE | DTR_TITLE,
  1796. //DTI_REQUESTTABLE | DTR_GIVENNAME,
  1797. //DTI_REQUESTTABLE | DTR_INITIALS,
  1798. //DTI_REQUESTTABLE | DTR_SURNAME,
  1799. //DTI_REQUESTTABLE | DTR_DOMAINCOMPONENT,
  1800. //DTI_REQUESTTABLE | DTR_UNSTRUCTUREDNAME,
  1801. //DTI_REQUESTTABLE | DTR_UNSTRUCTUREDADDRESS,
  1802. //DTI_REQUESTTABLE | DTR_DEVICESERIALNUMBER,
  1803. //DTI_REQUESTTABLE | DTR_RAWNAME,
  1804. //DTI_REQUESTTABLE | DTR_REQUESTDISPOSITION,
  1805. //DTI_REQUESTTABLE | DTR_REQUESTATTRIBUTES,
  1806. //DTI_REQUESTTABLE | DTR_REQUESTTYPE,
  1807. //DTI_REQUESTTABLE | DTR_REQUESTFLAGS,
  1808. //DTI_REQUESTTABLE | DTR_REQUESTSTATUS,
  1809. //DTI_REQUESTTABLE | DTR_REQUESTSTATUSCODE,
  1810. //DTI_REQUESTTABLE | DTR_REQUESTRESOLVEDWHEN,
  1811. //DTI_REQUESTTABLE | DTR_REQUESTREVOKEDWHEN,
  1812. //DTI_REQUESTTABLE | DTR_REQUESTREVOKEDEFFECTIVEWHEN,
  1813. //DTI_REQUESTTABLE | DTR_REQUESTREVOKEDREASON,
  1814. //DTI_REQUESTTABLE | DTR_REQUESTERADDRESS,
  1815. //DTI_REQUESTTABLE | DTR_SIGNERPOLICIES,
  1816. //DTI_REQUESTTABLE | DTR_SIGNERAPPLICATIONPOLICIES,
  1817. //DTI_REQUESTTABLE | DTR_DISTINGUISHEDNAME,
  1818. //DTI_CERTIFICATETABLE | DTC_REQUESTID,
  1819. //DTI_CERTIFICATETABLE | DTC_RAWCERTIFICATE,
  1820. //DTI_CERTIFICATETABLE | DTC_CERTIFICATEHASH,
  1821. //DTI_CERTIFICATETABLE | DTC_CERTIFICATETYPE,
  1822. //DTI_CERTIFICATETABLE | DTC_CERTIFICATESERIALNUMBER,
  1823. //DTI_CERTIFICATETABLE | DTC_CERTIFICATEISSUERNAMEID,
  1824. //DTI_CERTIFICATETABLE | DTC_CERTIFICATENOTBEFOREDATE,
  1825. //DTI_CERTIFICATETABLE | DTC_CERTIFICATENOTAFTERDATE,
  1826. //DTI_CERTIFICATETABLE | DTC_CERTIFICATERAWPUBLICKEY,
  1827. //DTI_CERTIFICATETABLE | DTC_CERTIFICATEPUBLICKEYALGORITHM,
  1828. //DTI_CERTIFICATETABLE | DTC_CERTIFICATERAWPUBLICKEYALGORITHMPARAMETERS,
  1829. //DTI_CERTIFICATETABLE | DTC_DISTINGUISHEDNAME,
  1830. //DTI_CERTIFICATETABLE | DTC_RAWNAME,
  1831. //DTI_CERTIFICATETABLE | DTC_COUNTRY,
  1832. //DTI_CERTIFICATETABLE | DTC_ORGANIZATION,
  1833. //DTI_CERTIFICATETABLE | DTC_ORGUNIT,
  1834. //DTI_CERTIFICATETABLE | DTC_COMMONNAME,
  1835. //DTI_CERTIFICATETABLE | DTC_LOCALITY,
  1836. //DTI_CERTIFICATETABLE | DTC_STATE,
  1837. //DTI_CERTIFICATETABLE | DTC_TITLE,
  1838. //DTI_CERTIFICATETABLE | DTC_GIVENNAME,
  1839. //DTI_CERTIFICATETABLE | DTC_INITIALS,
  1840. //DTI_CERTIFICATETABLE | DTC_SURNAME,
  1841. //DTI_CERTIFICATETABLE | DTC_DOMAINCOMPONENT,
  1842. //DTI_CERTIFICATETABLE | DTC_EMAIL,
  1843. //DTI_CERTIFICATETABLE | DTC_STREETADDRESS,
  1844. //DTI_CERTIFICATETABLE | DTC_UNSTRUCTUREDNAME,
  1845. //DTI_CERTIFICATETABLE | DTC_UNSTRUCTUREDADDRESS,
  1846. //DTI_CERTIFICATETABLE | DTC_DEVICESERIALNUMBER,
  1847. //DTI_CERTIFICATETABLE | DTC_CERTIFICATERAWSMIMECAPABILITIES,
  1848. };
  1849. DWORD g_cColumnViewQueue = ARRAYSIZE(g_aColumnViewQueue);
  1850. DWORD g_aColumnViewLog[] =
  1851. {
  1852. DTI_REQUESTTABLE | DTR_REQUESTID,
  1853. DTI_REQUESTTABLE | DTR_REQUESTERNAME,
  1854. DTI_CERTIFICATETABLE | DTC_CERTIFICATESERIALNUMBER,
  1855. DTI_CERTIFICATETABLE | DTC_CERTIFICATENOTBEFOREDATE,
  1856. DTI_CERTIFICATETABLE | DTC_CERTIFICATENOTAFTERDATE,
  1857. DTI_CERTIFICATETABLE | DTC_COMMONNAME,
  1858. DTI_CERTIFICATETABLE | DTC_EMAIL,
  1859. DTI_CERTIFICATETABLE | DTC_ORGUNIT,
  1860. DTI_CERTIFICATETABLE | DTC_ORGANIZATION,
  1861. DTI_CERTIFICATETABLE | DTC_LOCALITY,
  1862. DTI_CERTIFICATETABLE | DTC_STATE,
  1863. DTI_CERTIFICATETABLE | DTC_COUNTRY,
  1864. DTI_CERTIFICATETABLE | DTC_RAWCERTIFICATE,
  1865. //DTI_CERTIFICATETABLE | DTC_TITLE,
  1866. //DTI_CERTIFICATETABLE | DTC_GIVENNAME,
  1867. //DTI_CERTIFICATETABLE | DTC_INITIALS,
  1868. //DTI_CERTIFICATETABLE | DTC_SURNAME,
  1869. //DTI_CERTIFICATETABLE | DTC_DOMAINCOMPONENT,
  1870. //DTI_CERTIFICATETABLE | DTC_UNSTRUCTUREDNAME,
  1871. //DTI_CERTIFICATETABLE | DTC_UNSTRUCTUREDADDRESS,
  1872. //DTI_CERTIFICATETABLE | DTC_DEVICESERIALNUMBER,
  1873. //DTI_CERTIFICATETABLE | DTC_DISTINGUISHEDNAME,
  1874. //DTI_CERTIFICATETABLE | DTC_STREETADDRESS,
  1875. //DTI_REQUESTTABLE | DTR_REQUESTRAWREQUEST,
  1876. //DTI_REQUESTTABLE | DTR_REQUESTRAWARCHIVEDKEY,
  1877. //DTI_REQUESTTABLE | DTR_REQUESTKEYRECOVERYHASHES,
  1878. //DTI_REQUESTTABLE | DTR_REQUESTATTRIBUTES,
  1879. //DTI_REQUESTTABLE | DTR_REQUESTTYPE,
  1880. //DTI_REQUESTTABLE | DTR_REQUESTFLAGS,
  1881. //DTI_REQUESTTABLE | DTR_REQUESTSTATUS,
  1882. //DTI_REQUESTTABLE | DTR_REQUESTSTATUSCODE,
  1883. //DTI_REQUESTTABLE | DTR_REQUESTDISPOSITION,
  1884. //DTI_REQUESTTABLE | DTR_REQUESTDISPOSITIONMESSAGE,
  1885. //DTI_REQUESTTABLE | DTR_REQUESTSUBMITTEDWHEN,
  1886. //DTI_REQUESTTABLE | DTR_REQUESTRESOLVEDWHEN,
  1887. //DTI_REQUESTTABLE | DTR_REQUESTREVOKEDWHEN,
  1888. //DTI_REQUESTTABLE | DTR_REQUESTREVOKEDEFFECTIVEWHEN,
  1889. //DTI_REQUESTTABLE | DTR_REQUESTREVOKEDREASON,
  1890. //DTI_REQUESTTABLE | DTR_REQUESTERADDRESS,
  1891. //DTI_REQUESTTABLE | DTR_SIGNERPOLICIES,
  1892. //DTI_REQUESTTABLE | DTR_SIGNERAPPLICATIONPOLICIES,
  1893. //DTI_REQUESTTABLE | DTR_DISTINGUISHEDNAME,
  1894. //DTI_REQUESTTABLE | DTR_RAWNAME,
  1895. //DTI_REQUESTTABLE | DTR_COUNTRY,
  1896. //DTI_REQUESTTABLE | DTR_ORGANIZATION,
  1897. //DTI_REQUESTTABLE | DTR_ORGUNIT,
  1898. //DTI_REQUESTTABLE | DTR_COMMONNAME,
  1899. //DTI_REQUESTTABLE | DTR_LOCALITY,
  1900. //DTI_REQUESTTABLE | DTR_STATE,
  1901. //DTI_REQUESTTABLE | DTR_TITLE,
  1902. //DTI_REQUESTTABLE | DTR_GIVENNAME,
  1903. //DTI_REQUESTTABLE | DTR_INITIALS,
  1904. //DTI_REQUESTTABLE | DTR_SURNAME,
  1905. //DTI_REQUESTTABLE | DTR_DOMAINCOMPONENT,
  1906. //DTI_REQUESTTABLE | DTR_EMAIL,
  1907. //DTI_REQUESTTABLE | DTR_STREETADDRESS,
  1908. //DTI_REQUESTTABLE | DTR_UNSTRUCTUREDNAME,
  1909. //DTI_REQUESTTABLE | DTR_UNSTRUCTUREDADDRESS,
  1910. //DTI_REQUESTTABLE | DTR_DEVICESERIALNUMBER,
  1911. //DTI_CERTIFICATETABLE | DTC_REQUESTID,
  1912. //DTI_CERTIFICATETABLE | DTC_CERTIFICATEHASH,
  1913. //DTI_CERTIFICATETABLE | DTC_CERTIFICATETYPE,
  1914. //DTI_CERTIFICATETABLE | DTC_CERTIFICATEISSUERNAMEID,
  1915. //DTI_CERTIFICATETABLE | DTC_CERTIFICATERAWPUBLICKEY,
  1916. //DTI_CERTIFICATETABLE | DTC_CERTIFICATEPUBLICKEYALGORITHM,
  1917. //DTI_CERTIFICATETABLE | DTC_CERTIFICATERAWPUBLICKEYALGORITHMPARAMETERS,
  1918. //DTI_CERTIFICATETABLE | DTC_RAWNAME,
  1919. //DTI_CERTIFICATETABLE | DTC_CERTIFICATERAWSMIMECAPABILITIES,
  1920. };
  1921. DWORD g_cColumnViewLog = ARRAYSIZE(g_aColumnViewLog);
  1922. DWORD g_aColumnViewRevoked[] =
  1923. {
  1924. DTI_REQUESTTABLE | DTR_REQUESTID,
  1925. DTI_REQUESTTABLE | DTR_REQUESTERNAME,
  1926. DTI_CERTIFICATETABLE | DTC_CERTIFICATESERIALNUMBER,
  1927. DTI_CERTIFICATETABLE | DTC_CERTIFICATENOTBEFOREDATE,
  1928. DTI_CERTIFICATETABLE | DTC_CERTIFICATENOTAFTERDATE,
  1929. DTI_CERTIFICATETABLE | DTC_COMMONNAME,
  1930. DTI_CERTIFICATETABLE | DTC_EMAIL,
  1931. DTI_CERTIFICATETABLE | DTC_ORGUNIT,
  1932. DTI_CERTIFICATETABLE | DTC_ORGANIZATION,
  1933. DTI_CERTIFICATETABLE | DTC_LOCALITY,
  1934. DTI_CERTIFICATETABLE | DTC_STATE,
  1935. DTI_CERTIFICATETABLE | DTC_COUNTRY,
  1936. DTI_CERTIFICATETABLE | DTC_RAWCERTIFICATE,
  1937. //DTI_CERTIFICATETABLE | DTC_TITLE,
  1938. //DTI_CERTIFICATETABLE | DTC_GIVENNAME,
  1939. //DTI_CERTIFICATETABLE | DTC_INITIALS,
  1940. //DTI_CERTIFICATETABLE | DTC_SURNAME,
  1941. //DTI_CERTIFICATETABLE | DTC_DOMAINCOMPONENT,
  1942. //DTI_CERTIFICATETABLE | DTC_UNSTRUCTUREDNAME,
  1943. //DTI_CERTIFICATETABLE | DTC_UNSTRUCTUREDADDRESS,
  1944. //DTI_CERTIFICATETABLE | DTC_DEVICESERIALNUMBER,
  1945. //DTI_CERTIFICATETABLE | DTC_DISTINGUISHEDNAME,
  1946. //DTI_CERTIFICATETABLE | DTC_STREETADDRESS,
  1947. //DTI_REQUESTTABLE | DTR_REQUESTRAWREQUEST,
  1948. //DTI_REQUESTTABLE | DTR_REQUESTRAWARCHIVEDKEY,
  1949. //DTI_REQUESTTABLE | DTR_REQUESTKEYRECOVERYHASHES,
  1950. //DTI_REQUESTTABLE | DTR_REQUESTATTRIBUTES,
  1951. //DTI_REQUESTTABLE | DTR_REQUESTTYPE,
  1952. //DTI_REQUESTTABLE | DTR_REQUESTFLAGS,
  1953. //DTI_REQUESTTABLE | DTR_REQUESTSTATUS,
  1954. //DTI_REQUESTTABLE | DTR_REQUESTSTATUSCODE,
  1955. //DTI_REQUESTTABLE | DTR_REQUESTDISPOSITION,
  1956. //DTI_REQUESTTABLE | DTR_REQUESTDISPOSITIONMESSAGE,
  1957. //DTI_REQUESTTABLE | DTR_REQUESTSUBMITTEDWHEN,
  1958. //DTI_REQUESTTABLE | DTR_REQUESTRESOLVEDWHEN,
  1959. DTI_REQUESTTABLE | DTR_REQUESTREVOKEDWHEN,
  1960. DTI_REQUESTTABLE | DTR_REQUESTREVOKEDEFFECTIVEWHEN,
  1961. DTI_REQUESTTABLE | DTR_REQUESTREVOKEDREASON,
  1962. //DTI_REQUESTTABLE | DTR_REQUESTERADDRESS,
  1963. //DTI_REQUESTTABLE | DTR_SIGNERPOLICIES,
  1964. //DTI_REQUESTTABLE | DTR_SIGNERAPPLICATIONPOLICIES,
  1965. //DTI_REQUESTTABLE | DTR_DISTINGUISHEDNAME,
  1966. //DTI_REQUESTTABLE | DTR_RAWNAME,
  1967. //DTI_REQUESTTABLE | DTR_COUNTRY,
  1968. //DTI_REQUESTTABLE | DTR_ORGANIZATION,
  1969. //DTI_REQUESTTABLE | DTR_ORGUNIT,
  1970. //DTI_REQUESTTABLE | DTR_COMMONNAME,
  1971. //DTI_REQUESTTABLE | DTR_LOCALITY,
  1972. //DTI_REQUESTTABLE | DTR_STATE,
  1973. //DTI_REQUESTTABLE | DTR_TITLE,
  1974. //DTI_REQUESTTABLE | DTR_GIVENNAME,
  1975. //DTI_REQUESTTABLE | DTR_INITIALS,
  1976. //DTI_REQUESTTABLE | DTR_SURNAME,
  1977. //DTI_REQUESTTABLE | DTR_DOMAINCOMPONENT,
  1978. //DTI_REQUESTTABLE | DTR_EMAIL,
  1979. //DTI_REQUESTTABLE | DTR_STREETADDRESS,
  1980. //DTI_REQUESTTABLE | DTR_UNSTRUCTUREDNAME,
  1981. //DTI_REQUESTTABLE | DTR_UNSTRUCTUREDADDRESS,
  1982. //DTI_REQUESTTABLE | DTR_DEVICESERIALNUMBER,
  1983. //DTI_CERTIFICATETABLE | DTC_REQUESTID,
  1984. //DTI_CERTIFICATETABLE | DTC_CERTIFICATEHASH,
  1985. //DTI_CERTIFICATETABLE | DTC_CERTIFICATETYPE,
  1986. //DTI_CERTIFICATETABLE | DTC_CERTIFICATEISSUERNAMEID,
  1987. //DTI_CERTIFICATETABLE | DTC_CERTIFICATERAWPUBLICKEY,
  1988. //DTI_CERTIFICATETABLE | DTC_CERTIFICATEPUBLICKEYALGORITHM,
  1989. //DTI_CERTIFICATETABLE | DTC_CERTIFICATERAWPUBLICKEYALGORITHMPARAMETERS,
  1990. //DTI_CERTIFICATETABLE | DTC_RAWNAME,
  1991. //DTI_CERTIFICATETABLE | DTC_CERTIFICATERAWSMIMECAPABILITIES,
  1992. };
  1993. DWORD g_cColumnViewRevoked = ARRAYSIZE(g_aColumnViewRevoked);
  1994. DWORD g_aColumnViewExtension[] =
  1995. {
  1996. DTI_EXTENSIONTABLE | DTE_REQUESTID,
  1997. DTI_EXTENSIONTABLE | DTE_EXTENSIONNAME,
  1998. DTI_EXTENSIONTABLE | DTE_EXTENSIONFLAGS,
  1999. DTI_EXTENSIONTABLE | DTE_EXTENSIONRAWVALUE,
  2000. };
  2001. DWORD g_cColumnViewExtension = ARRAYSIZE(g_aColumnViewExtension);
  2002. DWORD g_aColumnViewAttribute[] =
  2003. {
  2004. DTI_ATTRIBUTETABLE | DTA_REQUESTID,
  2005. DTI_ATTRIBUTETABLE | DTA_ATTRIBUTENAME,
  2006. DTI_ATTRIBUTETABLE | DTA_ATTRIBUTEVALUE,
  2007. };
  2008. DWORD g_cColumnViewAttribute = ARRAYSIZE(g_aColumnViewAttribute);
  2009. DWORD g_aColumnViewCRL[] =
  2010. {
  2011. DTI_CRLTABLE | DTL_ROWID,
  2012. DTI_CRLTABLE | DTL_NUMBER,
  2013. DTI_CRLTABLE | DTL_MINBASE,
  2014. DTI_CRLTABLE | DTL_NAMEID,
  2015. DTI_CRLTABLE | DTL_COUNT,
  2016. DTI_CRLTABLE | DTL_THISUPDATEDATE,
  2017. DTI_CRLTABLE | DTL_NEXTUPDATEDATE,
  2018. DTI_CRLTABLE | DTL_THISPUBLISHDATE,
  2019. DTI_CRLTABLE | DTL_NEXTPUBLISHDATE,
  2020. DTI_CRLTABLE | DTL_EFFECTIVEDATE,
  2021. DTI_CRLTABLE | DTL_PROPAGATIONCOMPLETEDATE,
  2022. DTI_CRLTABLE | DTL_RAWCRL,
  2023. };
  2024. DWORD g_cColumnViewCRL = ARRAYSIZE(g_aColumnViewCRL);