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.

3718 lines
218 KiB

  1. @echo off
  2. REM @SETLOCAL ENABLEEXTENSIONS
  3. set _old_v=%v%
  4. set _old_l=%l%
  5. set _old_p=%p%
  6. set _old_pe=%pe%
  7. set _old_s=%s%
  8. set _old_n=%n%
  9. set _old_t=%t%
  10. set _old_CDB_=%_CDB_%
  11. set _old_DEBUG_MASK=%DEBUG_MASK%
  12. set _old_DEBUG_PRINT_MASK=%DEBUG_PRINT_MASK%
  13. set _old_LCN=%LCN%
  14. set _old_RCN=%RCN%
  15. set _old_SID=%SID%
  16. set _old_SLEEP0=%SLEEP0%
  17. set v=
  18. set l=
  19. set p=
  20. set pe=
  21. set s=
  22. set n=
  23. set t="all"
  24. set _CDB_=
  25. set DEBUG_MASK=
  26. set DEBUG_PRINT_MASK=
  27. set ENABLE_STREAM_SCA=
  28. set _old_UNC_PREFIX=%UNC_PREFIX%
  29. set UNC_PREFIX=\\scratch\scratch\philh
  30. :loop
  31. if "%1" == "-d" goto do_d
  32. if "%1" == "-v" goto do_v
  33. if "%1" == "-l" goto do_l
  34. if "%1" == "-p" goto do_p
  35. if "%1" == "-pe" goto do_pe
  36. if "%1" == "-s" goto do_s
  37. if "%1" == "-n" goto do_n
  38. if "%1" == "-t" goto do_t
  39. if "%1" == "" goto doit
  40. echo Usage: regress [switches] [-t test]
  41. echo -d enable all debug_print_masks
  42. echo -v verbose (don't suppress echo)
  43. echo -l check for memory leaks (default=no)
  44. echo -p use enhanced RSA and DSS crypto providers (default=no)
  45. echo -pe -p plus Explicitly use RSA Enhanced (set on NT4 and Win9x)
  46. echo -s create new cert store (default=no)
  47. echo -n enable network related tests (default=no)
  48. echo -t select specific set of tests
  49. echo all (default)
  50. echo sca
  51. echo streamsca
  52. echo crmsg
  53. echo cms
  54. echo cms2
  55. echo cert
  56. echo store
  57. echo keystore
  58. echo newstore
  59. echo relstore
  60. echo remotestore
  61. echo avstore
  62. echo ctl
  63. echo spc
  64. echo findclt
  65. echo pvkhlpr
  66. echo oidfunc
  67. echo revfunc
  68. echo encode
  69. echo decode
  70. echo timestamp
  71. echo xenroll
  72. echo signcode
  73. echo pkcs8
  74. echo trust
  75. echo keyid
  76. echo url
  77. goto exeunt
  78. :do_v
  79. set v=%1
  80. shift
  81. goto loop
  82. :do_d
  83. set DEBUG_PRINT_MASK=0xFFFFFFFF
  84. shift
  85. goto loop
  86. :do_l
  87. set _CDB_=cdb -g -G
  88. set DEBUG_MASK=0x20
  89. shift
  90. goto loop
  91. :do_p
  92. set p=%1
  93. shift
  94. goto loop
  95. :do_pe
  96. set p=-p
  97. set pe=-PEnhanced
  98. shift
  99. goto loop
  100. :do_s
  101. set s=%1
  102. shift
  103. goto loop
  104. :do_n
  105. set n=%1
  106. shift
  107. goto loop
  108. :do_t
  109. set t="%2"
  110. shift
  111. shift
  112. goto loop
  113. :doit
  114. if "%os%"=="" goto os_syntax
  115. if "%os%"=="Windows_NT" goto os_nt
  116. if "%os%"=="win95" goto os_win95
  117. :os_syntax
  118. echo OS must be set to "Windows_NT" or "win95"
  119. goto exeunt
  120. :os_nt
  121. set store=nt.store
  122. set SLEEP0=sleep 0
  123. goto os_after
  124. :os_win95
  125. set store=win95.store
  126. set SLEEP0=
  127. :os_after
  128. @if not "%v%"=="" echo on
  129. if exist regress.out del regress.out
  130. ttrust -DisableUntrustedRootLogging -DisablePartialChainLogging -EnableAuthRoot -RegistryOnlyExit >> regress.out
  131. @rem following removes these registry key values
  132. ttrust -DisableAIAUrlRetrieval 0xFFFFFFFF -MaxAIAUrlCountInCert 0xFFFFFFFF -MaxAIAUrlRetrievalCountPerChain 0xFFFFFFFF -MaxAIAUrlRetrievalByteCount 0xFFFFFFFF -MaxAIAUrlRetrievalCertCount 0xFFFFFFFF -RegistryOnlyExit >> regress.out
  133. @if "%s%"=="" goto StoreOK
  134. if exist %store% del %store% >> regress.out
  135. regsvr32 -s setx509.dll
  136. @rem regsvr32 -s signcde.dll
  137. @if not "%p%"=="" goto store_providers
  138. tstore2 %store% >> regress.out
  139. goto store_after
  140. :store_providers
  141. tstore2 %store% -P >> regress.out
  142. :store_after
  143. tfindcer -S -o2.5.4.3 -aroot -ptemp.cert %store% >> regress.out
  144. tfindcer -S -o2.5.4.3 -aroot -s testroot -d >> regress.out
  145. tstore -atemp.cert -s testroot >> regress.out
  146. del temp.cert >> regress.out
  147. :StoreOK
  148. @rem ----------------------------------------------------------------
  149. @rem SCA
  150. @rem ----------------------------------------------------------------
  151. @if not %t%=="sca" if not %t%=="all" goto ScaDone
  152. %_CDB_% tsca -l %store% >> regress.out
  153. %_CDB_% tsca -l %store% -SilentKey >> regress.out
  154. %_CDB_% tsca -l %store% -X >> regress.out
  155. %_CDB_% tsca -l %store% -D >> regress.out
  156. %_CDB_% tsca -l %store% -I SignAndEnvelope >> regress.out
  157. %_CDB_% tsca -l %store% -A Sign >> regress.out
  158. %_CDB_% tsca -l %store% -0 Sign >> regress.out
  159. %_CDB_% tsca -l %store% -0 -A Sign >> regress.out
  160. %_CDB_% tsca -l %store% -0 -A -Hsha Sign >> regress.out
  161. @rem md2 is broken in rsa
  162. @rem %_CDB_% tsca -l %store% -Hmd2 >> regress.out
  163. %_CDB_% tsca -l %store% -Hmd4 >> regress.out
  164. %_CDB_% tsca -l %store% -Hmd5 >> regress.out
  165. %_CDB_% tsca -l %store% -Hmd5 -X >> regress.out
  166. %_CDB_% tsca -l %store% -Hmd5 -D >> regress.out
  167. %_CDB_% tsca -l %store% -Erc2 >> regress.out
  168. %_CDB_% tsca -l %store% -Erc2 -e40 >> regress.out
  169. %_CDB_% tsca -l %store% -Erc2 -i >> regress.out
  170. %_CDB_% tsca -l %store% -Erc4 >> regress.out
  171. %_CDB_% tsca -l %store% -Erc4 -i >> regress.out
  172. %_CDB_% tsca -l %store% -Erc4 -e40 >> regress.out
  173. %_CDB_% tsca -l %store% -Erc4 -e40 -NoSalt >> regress.out
  174. @rem create a signed message containing only certs and CRLs
  175. tfindcer %store% -S -ame -axchg -pme.cer >> regress.out
  176. tfindcer %store% -S -aCA -pca.cer >> regress.out
  177. %_CDB_% tfindcer %store% -S -Aroot -proot.cer >> regress.out
  178. tstore %store% -R -i0 -proot.crl >> regress.out
  179. tstore %store% -R -i1 -pca.crl >> regress.out
  180. %_CDB_% cert2spc me.cer ca.cer root.cer ca.crl root.crl tmp.spc >> regress.out
  181. %_CDB_% tstore tmp.spc >> regress.out
  182. %_CDB_% tstore -R tmp.spc >> regress.out
  183. %_CDB_% tsca %store% sign -l -rtmp.spc -ctmp.store >> regress.out
  184. %_CDB_% tfindcer tmp.store -S -ame -c >> regress.out
  185. %_CDB_% tfindcer tmp.spc -S -ame -c >> regress.out
  186. del tmp.store >> regress.out
  187. %_CDB_% tsca %store% sign -l -ctmp.store >> regress.out
  188. %_CDB_% tstore -b tmp.store >> regress.out
  189. del tmp.spc >> regress.out
  190. %_CDB_% tstore -b tmp.store -7tmp.spc >> regress.out
  191. %_CDB_% tstore -b tmp.spc >> regress.out
  192. del tmp.store >> regress.out
  193. %_CDB_% tsca %store% sign -l -rtmp.spc -ctmp.store >> regress.out
  194. %_CDB_% tstore -b tmp.store >> regress.out
  195. @if "%ENABLE_STREAM_SCA%"=="" goto stream_sca_after
  196. @rem the following using the streaming ifdef'ed version of sca
  197. %_CDB_% tsca -l %store% sign -mtmp.msg >> regress.out
  198. %_CDB_% tsca -l %store% sign -rtmp.msg -s -v >> regress.out
  199. %_CDB_% tsca -l %store% sign -mtmp.msg -D >> regress.out
  200. %_CDB_% tsca -l %store% sign -rtmp.msg -D -s -v >> regress.out
  201. %_CDB_% tsca -l %store% sign -mtmp.msg -0 >> regress.out
  202. %_CDB_% tsca -l %store% sign -rtmp.msg -s -v >> regress.out
  203. %_CDB_% tsca -l %store% sign -s -mtmp.msg >> regress.out
  204. %_CDB_% tsca -l %store% sign -rtmp.msg -v >> regress.out
  205. %_CDB_% tsca -l %store% sign -S -mtmp.msg >> regress.out
  206. %_CDB_% tsca -l %store% sign -rtmp.msg -v >> regress.out
  207. %_CDB_% tsca -l %store% sign -s -D -mtmp.msg >> regress.out
  208. %_CDB_% tsca -l %store% sign -D -rtmp.msg -v >> regress.out
  209. %_CDB_% tsca -l %store% sign -S -D -mtmp.msg >> regress.out
  210. %_CDB_% tsca -l %store% sign -D -rtmp.msg -v >> regress.out
  211. %_CDB_% tsca -l %store% sign -s -0 -mtmp.msg >> regress.out
  212. %_CDB_% tsca -l %store% sign -rtmp.msg -v >> regress.out
  213. %_CDB_% tsca -l %store% sign -S -0 -mtmp.msg >> regress.out
  214. %_CDB_% tsca -l %store% sign -rtmp.msg -v >> regress.out
  215. %_CDB_% tsca -l %store% sign -Hmd4 -s >> regress.out
  216. %_CDB_% tsca -l %store% sign -Hmd5 -S >> regress.out
  217. %_CDB_% tsca -l %store% sign -Hmd5 -X -s >> regress.out
  218. %_CDB_% tsca -l %store% sign -Hmd5 -D -S >> regress.out
  219. :stream_sca_after
  220. %_CDB_% tsca -l %store% -p13 -Hsha >> regress.out
  221. %_CDB_% tsca -l %store% -p13 -Hsha -D >> regress.out
  222. %_CDB_% tsca -l %store% -p13 -Hsha -I SignAndEnvelope >> regress.out
  223. %_CDB_% tsca -l %store% -Erc2 -e40 >> regress.out
  224. %_CDB_% tsca -l %store% -Erc2 -i >> regress.out
  225. %_CDB_% tsca -l %store% -Erc2 -e56 >> regress.out
  226. %_CDB_% tsca -l %store% -Edes >> regress.out
  227. %_CDB_% tsca -l %store% -Edes -i >> regress.out
  228. %_CDB_% tsca -l %store% -Erc4 -e56 -NoSalt >> regress.out
  229. @if "%p%"=="" goto ScaDone
  230. %_CDB_% tsca -l %store% -P512 >> regress.out
  231. %_CDB_% tsca -l %store% -P1024 >> regress.out
  232. %_CDB_% tsca -l %store% -P2048 >> regress.out
  233. %_CDB_% tsca -l %store% -Erc2 -e64 >> regress.out
  234. %_CDB_% tsca -l %store% -Erc2 -e128 >> regress.out
  235. %_CDB_% tsca -l %store% -Erc2 -e128 -i >> regress.out
  236. %_CDB_% tsca -l %store% -Edes -P2048 >> regress.out
  237. %_CDB_% tsca -l %store% -E3des >> regress.out
  238. %_CDB_% tsca -l %store% -E3des -i >> regress.out
  239. %_CDB_% tsca -l %store% -E3des -i -P1024 >> regress.out
  240. %_CDB_% tsca -l %store% -p13 -Hsha -P512 >> regress.out
  241. %_CDB_% tsca -l %store% -p13 -Hsha -E3des -i >> regress.out
  242. %_CDB_% tsca -l %store% -Erc4 -e56 >> regress.out
  243. %_CDB_% tsca -l %store% -Erc4 -e64 >> regress.out
  244. %_CDB_% tsca -l %store% -Erc4 -e64 -NoSalt >> regress.out
  245. %_CDB_% tsca -l %store% -Erc4 -e128 >> regress.out
  246. %_CDB_% tsca -l %store% -Erc4 -e128 -NoSalt >> regress.out
  247. :ScaDone
  248. @rem ----------------------------------------------------------------
  249. @rem CRMSG
  250. @rem ----------------------------------------------------------------
  251. @if not %t%=="crmsg" if not %t%=="all" goto CrmsgDone
  252. @cd tcrmsg
  253. %_CDB_% tcrmsg -l sign >> ..\regress.out
  254. %_CDB_% tcrmsg -l envelope >> ..\regress.out
  255. %_CDB_% tcrmsg -l -R envelope >> ..\regress.out
  256. %_CDB_% tcrmsg -l -Erc2 -I envelope >> ..\regress.out
  257. %_CDB_% tcrmsg -l -Erc2 -I -PDefault envelope >> ..\regress.out
  258. %_CDB_% tcrmsg -l -Erc4 envelope >> ..\regress.out
  259. %_CDB_% tcrmsg -l -Erc4 -PDefault envelope >> ..\regress.out
  260. %_CDB_% tcrmsg -l -Erc4 -I envelope >> ..\regress.out
  261. %_CDB_% tcrmsg -l -Erc4 -I -PDefault envelope >> ..\regress.out
  262. @rem NoSignature
  263. %_CDB_% tcrmsg -l sign -NoSignature -c >> ..\regress.out
  264. %_CDB_% tcrmsg -l sign -NoSignature -c -M >> ..\regress.out
  265. %_CDB_% tcrmsg -l sign -NoSignature -c -A >> ..\regress.out
  266. %_CDB_% tcrmsg -l sign -NoSignature -c -M -NMultiple >> ..\regress.out
  267. %_CDB_% tcrmsg -l sign -NoSignature -c -A -M -CertInfoKeyId -NMultiple >> ..\regress.out
  268. %_CDB_% tcrmsg -l digest >> ..\regress.out
  269. %_CDB_% tcrmsg -l -A sign >> ..\regress.out
  270. %_CDB_% tcrmsg -l -B sign >> ..\regress.out
  271. %_CDB_% tcrmsg -l -B envelope >> ..\regress.out
  272. %_CDB_% tcrmsg -l -B -R envelope >> ..\regress.out
  273. %_CDB_% tcrmsg -l -B digest >> ..\regress.out
  274. %_CDB_% tcrmsg -l -C sign >> ..\regress.out
  275. %_CDB_% tcrmsg -l -C envelope >> ..\regress.out
  276. %_CDB_% tcrmsg -l -C -R envelope >> ..\regress.out
  277. %_CDB_% tcrmsg -l -C digest >> ..\regress.out
  278. %_CDB_% tcrmsg -l -D sign >> ..\regress.out
  279. %_CDB_% tcrmsg -l -D digest >> ..\regress.out
  280. %_CDB_% tcrmsg -l -M sign >> ..\regress.out
  281. %_CDB_% tcrmsg -l -M digest >> ..\regress.out
  282. %_CDB_% tcrmsg -l -N sign >> ..\regress.out
  283. %_CDB_% tcrmsg -l -N -D sign >> ..\regress.out
  284. %_CDB_% tcrmsg -l -S sign >> ..\regress.out
  285. %_CDB_% tcrmsg -l -S -A sign >> ..\regress.out
  286. %_CDB_% tcrmsg -l envelope >> ..\regress.out
  287. %_CDB_% tcrmsg -l -R envelope >> ..\regress.out
  288. %_CDB_% tcrmsg -l countersign >> ..\regress.out
  289. %_CDB_% tcrmsg -l -A countersign >> ..\regress.out
  290. %_CDB_% tcrmsg -l -C countersign >> ..\regress.out
  291. %_CDB_% tcrmsg -l -D countersign >> ..\regress.out
  292. %_CDB_% tcrmsg -l -sSdE -i stream >> ..\regress.out
  293. %_CDB_% tcrmsg -l -sSdE -i -R stream >> ..\regress.out
  294. %_CDB_% tcrmsg -l -sSdE stream >> ..\regress.out
  295. %_CDB_% tcrmsg -l -sSdE -R stream >> ..\regress.out
  296. %_CDB_% tcrmsg -l -sEdS -i stream >> ..\regress.out
  297. %_CDB_% tcrmsg -l -sEdS -i -R stream >> ..\regress.out
  298. %_CDB_% tcrmsg -l -sEdS stream >> ..\regress.out
  299. %_CDB_% tcrmsg -l -sEdS -R stream >> ..\regress.out
  300. %_CDB_% tcrmsg -l -Erc2 -e40 -PDefault envelope >> ..\regress.out
  301. %_CDB_% tcrmsg -l -Erc2 -e40 -I envelope >> ..\regress.out
  302. %_CDB_% tcrmsg -l -Erc4 -e40 -PDefault envelope >> ..\regress.out
  303. %_CDB_% tcrmsg -l -Erc4 -e40 -NoSalt envelope >> ..\regress.out
  304. %_CDB_% tcrmsg -l -A -p13 sign >> ..\regress.out
  305. %_CDB_% tcrmsg -l -B -p13 sign >> ..\regress.out
  306. %_CDB_% tcrmsg -l -C -p13 sign >> ..\regress.out
  307. %_CDB_% tcrmsg -l -D -p13 sign >> ..\regress.out
  308. %_CDB_% tcrmsg -l -S -p13 sign >> ..\regress.out
  309. %_CDB_% tcrmsg -l -S -A -p13 sign >> ..\regress.out
  310. %_CDB_% tcrmsg -l -p13 countersign >> ..\regress.out
  311. %_CDB_% tcrmsg -l -A -p13 countersign >> ..\regress.out
  312. %_CDB_% tcrmsg -l -C -p13 countersign >> ..\regress.out
  313. %_CDB_% tcrmsg -l -D -p13 countersign >> ..\regress.out
  314. %_CDB_% tcrmsg -l -sSdS -i -p13 stream >> ..\regress.out
  315. %_CDB_% tcrmsg -l -sSdS -p13 stream >> ..\regress.out
  316. %_CDB_% tcrmsg -l -sSdS -i -p13 -PDefault stream >> ..\regress.out
  317. %_CDB_% tcrmsg -l -sSdS -p13 -PDefault stream >> ..\regress.out
  318. %_CDB_% tcrmsg -l -Erc2 -e56 envelope >> ..\regress.out
  319. %_CDB_% tcrmsg -l -Erc4 -e56 envelope >> ..\regress.out
  320. %_CDB_% tcrmsg -l -Erc4 -e56 -NoSalt envelope >> ..\regress.out
  321. @if "%p%"=="" goto CrmsgBack
  322. %_CDB_% tcrmsg -l -Erc2 -e56 -PEnhanced -PDefault envelope >> ..\regress.out
  323. %_CDB_% tcrmsg -l -Erc2 -e128 -PEnhanced -PDefault envelope >> ..\regress.out
  324. %_CDB_% tcrmsg -l -Erc2 -e128 -I -PEnhanced -PDefault envelope >> ..\regress.out
  325. %_CDB_% tcrmsg -l -Erc4 -e64 envelope %pe% >> ..\regress.out
  326. %_CDB_% tcrmsg -l -Erc4 -e128 envelope %pe% >> ..\regress.out
  327. %_CDB_% tcrmsg -l -Erc4 -e56 -PDefault envelope %pe% >> ..\regress.out
  328. %_CDB_% tcrmsg -l -Erc4 -e128 -PDefault envelope %pe% >> ..\regress.out
  329. %_CDB_% tcrmsg -l -Edes -I -PEnhanced envelope >> ..\regress.out
  330. %_CDB_% tcrmsg -l -Edes -PEnhanced -PDefault envelope >> ..\regress.out
  331. %_CDB_% tcrmsg -l -Edes -I -PEnhanced -PDefault -K"Regression 1024" envelope >> ..\regress.out
  332. %_CDB_% tcrmsg -l -E3des -I -PEnhanced envelope >> ..\regress.out
  333. %_CDB_% tcrmsg -l -E3des -PEnhanced -PDefault envelope >> ..\regress.out
  334. %_CDB_% tcrmsg -l -E3des -I -PEnhanced -PDefault -K"Regression 2048" envelope >> ..\regress.out
  335. %_CDB_% tcrmsg -l -sSdE -i -Erc2 -e40 -I -PDefault stream >> ..\regress.out
  336. %_CDB_% tcrmsg -l -sSdE -i -E3des -I -PEnhanced -PDefault -K"Regression 1024" stream >> ..\regress.out
  337. %_CDB_% tcrmsg -l -sSdE -Edes -I -PEnhanced -PDefault -K"Regression 2048" stream >> ..\regress.out
  338. :CrmsgBack
  339. @cd ..
  340. :CrmsgDone
  341. @rem ----------------------------------------------------------------
  342. @rem CMS
  343. @rem ----------------------------------------------------------------
  344. @if not %t%=="cms" if not %t%=="all" goto CmsDone
  345. @cd tcrmsg
  346. %_CDB_% tcrmsg -l -AttrCert sign >> ..\regress.out
  347. %_CDB_% tcrmsg -l -EncapsulatedContent sign >> ..\regress.out
  348. %_CDB_% tcrmsg -l -EncapsulatedContent digest >> ..\regress.out
  349. %_CDB_% tcrmsg -l -A -AttrCert -Crl sign >> ..\regress.out
  350. %_CDB_% tcrmsg -l -B -AttrCert -Crl sign >> ..\regress.out
  351. %_CDB_% tcrmsg -l -B -EncapsulatedContent digest >> ..\regress.out
  352. %_CDB_% tcrmsg -l -C -EncapsulatedContent sign >> ..\regress.out
  353. %_CDB_% tcrmsg -l -C -EncapsulatedContent digest >> ..\regress.out
  354. %_CDB_% tcrmsg -l -D -AttrCert sign >> ..\regress.out
  355. %_CDB_% tcrmsg -l -D -C -AttrCert sign >> ..\regress.out
  356. %_CDB_% tcrmsg -l -D -EncapsulatedContent sign >> ..\regress.out
  357. %_CDB_% tcrmsg -l -D -C -EncapsulatedContent sign >> ..\regress.out
  358. %_CDB_% tcrmsg -l -D -EncapsulatedContent digest >> ..\regress.out
  359. %_CDB_% tcrmsg -l -D -C -EncapsulatedContent digest >> ..\regress.out
  360. %_CDB_% tcrmsg -l -N -AttrCert sign >> ..\regress.out
  361. %_CDB_% tcrmsg -l -N -D -AttrCert sign >> ..\regress.out
  362. %_CDB_% tcrmsg -l -S -AttrCert sign >> ..\regress.out
  363. %_CDB_% tcrmsg -l -S -A -AttrCert sign >> ..\regress.out
  364. %_CDB_% tcrmsg -l -EncapsulatedContent countersign >> ..\regress.out
  365. %_CDB_% tcrmsg -l -A -EncapsulatedContent countersign >> ..\regress.out
  366. %_CDB_% tcrmsg -l -C -EncapsulatedContent countersign >> ..\regress.out
  367. %_CDB_% tcrmsg -l -D -EncapsulatedContent countersign >> ..\regress.out
  368. %_CDB_% tcrmsg -l -sS -i -EncapsulatedContent stream >> ..\regress.out
  369. %_CDB_% tcrmsg -l -sS -EncapsulatedContent stream >> ..\regress.out
  370. %_CDB_% tcrmsg -l -sS -i -C -EncapsulatedContent stream >> ..\regress.out
  371. %_CDB_% tcrmsg -l -sS -C -EncapsulatedContent stream >> ..\regress.out
  372. %_CDB_% tcrmsg -l -sS -i -AttrCert -Crl -f..\tmp.msg stream >> ..\regress.out
  373. %_CDB_% tstore ..\tmp.msg >> ..\regress.out
  374. %_CDB_% tstore ..\tmp.msg -R >> ..\regress.out
  375. %_CDB_% tcrmsg -l -sS -AttrCert -Crl stream >> ..\regress.out
  376. %_CDB_% tcrmsg -l -sS -i -C -AttrCert -Crl stream >> ..\regress.out
  377. %_CDB_% tcrmsg -l -sS -C -AttrCert -Crl stream >> ..\regress.out
  378. %_CDB_% tcrmsg -l -NMultiple sign >> ..\regress.out
  379. %_CDB_% tcrmsg -l -CertInfoKeyId sign >> ..\regress.out
  380. %_CDB_% tcrmsg -l -CertInfoKeyId -C sign >> ..\regress.out
  381. %_CDB_% tcrmsg -l -NMultiple -CertInfoKeyId sign >> ..\regress.out
  382. %_CDB_% tcrmsg -l -NMultiple -M sign >> ..\regress.out
  383. %_CDB_% tcrmsg -l -NMultiple -PDSS_DH -PDefault sign >> ..\regress.out
  384. %_CDB_% tcrmsg -l -NMultiple -CertInfoKeyId -PDSS_DH -PDefault sign >> ..\regress.out
  385. %_CDB_% tcrmsg -l -NMultiple -M -PDSS_DH -PDefault sign >> ..\regress.out
  386. %_CDB_% tcrmsg -l -SignerId sign >> ..\regress.out
  387. %_CDB_% tcrmsg -l -SignerId -NMultiple sign >> ..\regress.out
  388. %_CDB_% tcrmsg -l -SignerId -NMultiple -HashEncryptionAlgorithm sign >> ..\regress.out
  389. %_CDB_% tcrmsg -l -SignerId -CertInfoKeyId sign >> ..\regress.out
  390. %_CDB_% tcrmsg -l -SignerId -CertInfoKeyId -C sign >> ..\regress.out
  391. %_CDB_% tcrmsg -l -SignerId -CertInfoKeyId -NMultiple sign >> ..\regress.out
  392. %_CDB_% tcrmsg -l -SignerId -CertInfoKeyId -NMultiple -HashEncryptionAlgorithm sign >> ..\regress.out
  393. %_CDB_% tcrmsg -l -SignerId -A sign >> ..\regress.out
  394. %_CDB_% tcrmsg -l -SignerId -A -NMultiple sign >> ..\regress.out
  395. %_CDB_% tcrmsg -l -SignerId -A -NMultiple -HashEncryptionAlgorithm sign >> ..\regress.out
  396. %_CDB_% tcrmsg -l -SignerId -A -CertInfoKeyId sign >> ..\regress.out
  397. %_CDB_% tcrmsg -l -SignerId -A -CertInfoKeyId -NMultiple sign >> ..\regress.out
  398. %_CDB_% tcrmsg -l -SignerId -A -CertInfoKeyId -NMultiple -HashEncryptionAlgorithm sign >> ..\regress.out
  399. %_CDB_% tcrmsg -l -CertInfoKeyId countersign >> ..\regress.out
  400. %_CDB_% tcrmsg -l -CertInfoKeyId -SignerId countersign >> ..\regress.out
  401. %_CDB_% tcrmsg -l -CertInfoKeyId -A countersign >> ..\regress.out
  402. %_CDB_% tcrmsg -l -CertInfoKeyId -C countersign >> ..\regress.out
  403. %_CDB_% tcrmsg -l -CertInfoKeyId -D countersign >> ..\regress.out
  404. %_CDB_% tcrmsg -l -sS -NMultiple stream >> ..\regress.out
  405. %_CDB_% tcrmsg -l -sS -CertInfoKeyId stream >> ..\regress.out
  406. %_CDB_% tcrmsg -l -sS -CertInfoKeyId -C stream >> ..\regress.out
  407. %_CDB_% tcrmsg -l -sS -CertInfoKeyId -C -i stream >> ..\regress.out
  408. %_CDB_% tcrmsg -l -sS -CertInfoKeyId -SignerId stream >> ..\regress.out
  409. %_CDB_% tcrmsg -l -sS -CertInfoKeyId -SignerId -A stream >> ..\regress.out
  410. %_CDB_% tcrmsg -l -sS -NMultiple -CertInfoKeyId stream >> ..\regress.out
  411. %_CDB_% tcrmsg -l -sS -NMultiple -CertInfoKeyId -SignerId stream >> ..\regress.out
  412. %_CDB_% tcrmsg -l -sS -NMultiple -CertInfoKeyId -SignerId -A stream >> ..\regress.out
  413. %_CDB_% tcrmsg -l -sS -NMultiple -M stream >> ..\regress.out
  414. %_CDB_% tcrmsg -l -sS -NMultiple -PDSS_DH -PDefault stream >> ..\regress.out
  415. %_CDB_% tcrmsg -l -sS -NMultiple -M -PDSS_DH -PDefault stream >> ..\regress.out
  416. %_CDB_% tcrmsg -l -sS -i -NMultiple stream >> ..\regress.out
  417. %_CDB_% tcrmsg -l -sS -i -NMultiple -M stream >> ..\regress.out
  418. %_CDB_% tcrmsg -l -sS -i -NMultiple -PDSS_DH -PDefault stream >> ..\regress.out
  419. %_CDB_% tcrmsg -l -sS -i -NMultiple -M -PDSS_DH -PDefault stream >> ..\regress.out
  420. %_CDB_% tcrmsg -l -OriginatorInfo -Crl -f..\tmp.msg envelope >> ..\regress.out
  421. %_CDB_% tstore ..\tmp.msg >> ..\regress.out
  422. %_CDB_% tstore ..\tmp.msg -R >> ..\regress.out
  423. %_CDB_% tcrmsg -l -OriginatorInfo -AttrCert envelope >> ..\regress.out
  424. %_CDB_% tcrmsg -l -B -OriginatorInfo envelope >> ..\regress.out
  425. %_CDB_% tcrmsg -l -B -OriginatorInfo -AttrCert -Crl envelope >> ..\regress.out
  426. %_CDB_% tcrmsg -l -KeyTrans envelope >> ..\regress.out
  427. %_CDB_% tcrmsg -l -A -KeyTrans envelope >> ..\regress.out
  428. %_CDB_% tcrmsg -l -KeyTrans -RecipientKeyId envelope >> ..\regress.out
  429. %_CDB_% tcrmsg -l -A -KeyTrans -RecipientKeyId envelope >> ..\regress.out
  430. %_CDB_% tcrmsg -l -CertInfoKeyId envelope >> ..\regress.out
  431. %_CDB_% tcrmsg -l -sE -i -KeyTrans stream >> ..\regress.out
  432. %_CDB_% tcrmsg -l -sE -i -KeyTrans -RecipientKeyId stream >> ..\regress.out
  433. %_CDB_% tcrmsg -l -sE -i -CertInfoKeyId stream >> ..\regress.out
  434. %_CDB_% tcrmsg -l -sE -KeyTrans stream >> ..\regress.out
  435. %_CDB_% tcrmsg -l -sE -KeyTrans -RecipientKeyId stream >> ..\regress.out
  436. %_CDB_% tcrmsg -l -sE -CertInfoKeyId stream >> ..\regress.out
  437. %_CDB_% tcrmsg -l -sE -i -OriginatorInfo stream >> ..\regress.out
  438. %_CDB_% tcrmsg -l -sE -OriginatorInfo stream >> ..\regress.out
  439. %_CDB_% tcrmsg -l -sE -i -OriginatorInfo -AttrCert stream >> ..\regress.out
  440. %_CDB_% tcrmsg -l -sE -OriginatorInfo -AttrCert -Crl -f..\tmp.msg stream >> ..\regress.out
  441. %_CDB_% tstore ..\tmp.msg >> ..\regress.out
  442. %_CDB_% tstore ..\tmp.msg -R >> ..\regress.out
  443. %_CDB_% regsvr32 /s sp3crmsg.dll >> ..\regress.out
  444. %SLEEP0%
  445. %_CDB_% tcrmsg -l envelope >> ..\regress.out
  446. %_CDB_% regsvr32 /s /i /n sp3crmsg.dll >> ..\regress.out
  447. %SLEEP0%
  448. %_CDB_% tcrmsg -l envelope >> ..\regress.out
  449. %_CDB_% regsvr32 /u /s sp3crmsg.dll >> ..\regress.out
  450. %SLEEP0%
  451. @cd ..
  452. %_CDB_% tsca -l %store% -RecipientKeyId >> regress.out
  453. %_CDB_% tsca -l %store% -SignerKeyId >> regress.out
  454. %_CDB_% tsca -l %store% -RecipientKeyId -SignerKeyId >> regress.out
  455. %_CDB_% tsca -l %store% -I SignAndEnvelope -RecipientKeyId -SignerKeyId >> regress.out
  456. %_CDB_% tsca -l %store% -I SignAndEnvelope -EncapsulatedContent -RecipientKeyId -SignerKeyId >> regress.out
  457. %_CDB_% tsca -l %store% -EncapsulatedContent >> regress.out
  458. %_CDB_% tsca -l %store% -D -EncapsulatedContent >> regress.out
  459. %_CDB_% tsca -l %store% -I SignAndEnvelope -EncapsulatedContent >> regress.out
  460. %_CDB_% regsvr32 /s sp3crmsg.dll >> regress.out
  461. %SLEEP0%
  462. %_CDB_% tsca -l %store% Envelope >> regress.out
  463. %_CDB_% tsca -l %store% Envelope -SP3Encrypt >> regress.out
  464. %_CDB_% regsvr32 /u /s sp3crmsg.dll >> regress.out
  465. %SLEEP0%
  466. if exist inherit.store del inherit.store
  467. %_CDB_% tstore2 -I inherit.store >> regress.out
  468. %_CDB_% tfindcer inherit.store Rollover -d >> regress.out
  469. %_CDB_% tstore -b -cSign inherit.store >> regress.out
  470. %_CDB_% tsca -l -p13 -HSha1 inherit.store sign DssEnd >> regress.out
  471. %_CDB_% tsca -l -p13 -HSha1 -HashEncryptionAlgorithm inherit.store sign DssEnd >> regress.out
  472. %_CDB_% tsca -l -p13 -HSha1 -DefaultGetSigner inherit.store sign DssEnd >> regress.out
  473. %_CDB_% tsca -l -p13 -HSha1 -D -DefaultGetSigner inherit.store sign DssEnd >> regress.out
  474. @rem GeneralTime is DSS without parameter inheritance
  475. %_CDB_% tsca -l -p13 -HSha1 inherit.store sign GeneralTime >> regress.out
  476. %_CDB_% tsca -l -p13 -HSha1 -DefaultGetSigner inherit.store sign GeneralTime >> regress.out
  477. @rem the following test calling CryptVerifyCertificateSignatureEx
  478. @rem and CryptMsgControl(CMSG_CTRL_VERIFY_SIGNATURE_EX) with
  479. @rem a signer of type CHAIN.
  480. @cd tcrmsg
  481. %_CDB_% tcrmsg -l -HashEncryptionAlgorithm sign >> ..\regress.out
  482. %_CDB_% tcrmsg -l -AlgorithmParameters sign >> ..\regress.out
  483. %_CDB_% tcrmsg -l sign ..\inherit.store TestSigner >> ..\regress.out
  484. %_CDB_% tcrmsg -l sign ..\inherit.store DssEnd >> ..\regress.out
  485. %_CDB_% tcrmsg -l sign ..\inherit.store GeneralRoot >> ..\regress.out
  486. %_CDB_% tcrmsg -l -HashEncryptionAlgorithm sign ..\inherit.store DssEnd >> ..\regress.out
  487. %_CDB_% tcrmsg -l -HashEncryptionAlgorithm -AlgorithmParameters sign ..\inherit.store DssEnd >> ..\regress.out
  488. @cd ..
  489. @rem check DSS certificates and signatures with and without parameter
  490. @rem inheritance
  491. @cd ttrust\testfile
  492. @rem Enable Trust Test Root, disable revocation
  493. setreg -q 1 TRUE 3 FALSE >> ..\..\regress.out
  494. @rem on 4-April-2002 changed to never allow setreg's Trust Test Root
  495. @rem CERT_E_UNTRUSTEDTESTROOT 0x800b010d
  496. %_CDB_% ttrust -q dssend.cer -Sdss.spc -q0x800b010d >> ..\..\regress.out
  497. @rem explicitly trust the "Root Agency" testroot
  498. %_CDB_% tstore -s lm:root -a..\..\rooto.cer >> ..\..\regress.out
  499. %_CDB_% ttrust -q dssend.cer -Sdss.spc >> ..\..\regress.out
  500. @rem -f1 enable cache of end cert
  501. %_CDB_% ttrust -q -f1 dssend.cer -Sdss.spc >> ..\..\regress.out
  502. %_CDB_% ttrust -q dssinend.cer -Sdssin.spc >> ..\..\regress.out
  503. %_CDB_% ttrust -q -f1 dssinend.cer -Sdssin.spc >> ..\..\regress.out
  504. %_CDB_% ttrust -q -file dss.cab >> ..\..\regress.out
  505. %_CDB_% ttrust -q -file dssin.cab >> ..\..\regress.out
  506. %_CDB_% tctlfunc -U1.2.3.4 dssroot.cer -cdss.stl >> ..\..\regress.out
  507. %_CDB_% tctlfunc -U1.2.3.4 dssroot.cer -cdssin.stl >> ..\..\regress.out
  508. @rem the following has a DSS signer of a CTL containing dssroot.cer.
  509. @rem the DSS signer certificate inherits its public key algorithm
  510. @rem parameters
  511. if exist tmp.store del tmp.store
  512. %_CDB_% tstore tmp.store -T -adss.stl >> ..\..\regress.out
  513. %_CDB_% ttrust -q dssroot.cer -Stmp.store -u1.2.3.4 >> ..\..\regress.out
  514. @rem explicitly trust the "Root Agency" testroot
  515. %_CDB_% tstore -s lm:root -a..\..\rooto.cer >> ..\..\regress.out
  516. @rem now the signer chain has a trusted root. This is higher quality
  517. %_CDB_% ttrust -q dssroot.cer -Stmp.store -u1.2.3.4 >> ..\..\regress.out
  518. @rem ensure the test root is removed
  519. %_CDB_% tfindcer -S -s lm:root -a"Root Agency" -d >> ..\..\regress.out
  520. @cd ..\..
  521. @cd tcrmsg
  522. %_CDB_% tcrmsg -l -EncapsulatedContent envelope >> ..\regress.out
  523. %_CDB_% tcrmsg -l -EncapsulatedContent -OriginatorInfo envelope >> ..\regress.out
  524. %_CDB_% tcrmsg -l -C -EncapsulatedContent envelope >> ..\regress.out
  525. %_CDB_% tcrmsg -l -sE -EncapsulatedContent stream >> ..\regress.out
  526. %_CDB_% tcrmsg -l -sE -EncapsulatedContent -OriginatorInfo stream >> ..\regress.out
  527. %_CDB_% tcrmsg -l -sE -i -EncapsulatedContent stream >> ..\regress.out
  528. %_CDB_% tcrmsg -l -sE -i -EncapsulatedContent -OriginatorInfo stream >> ..\regress.out
  529. %_CDB_% tcrmsg -l -sE -C -EncapsulatedContent stream >> ..\regress.out
  530. %_CDB_% tcrmsg -l -sE -i -C -EncapsulatedContent stream >> ..\regress.out
  531. %_CDB_% tcrmsg -l -n0 envelope >> ..\regress.out
  532. %_CDB_% tcrmsg -l -NoRecipients envelope >> ..\regress.out
  533. %_CDB_% tcrmsg -l -NoRecipients -n0 envelope >> ..\regress.out
  534. %_CDB_% tcrmsg -l -sE -n0 stream >> ..\regress.out
  535. %_CDB_% tcrmsg -l -sE -i -n0 stream >> ..\regress.out
  536. %_CDB_% tcrmsg -l -sE -NoRecipients stream >> ..\regress.out
  537. %_CDB_% tcrmsg -l -sE -i -NoRecipients stream >> ..\regress.out
  538. %_CDB_% tcrmsg -l -sE -NoRecipients -n0 stream >> ..\regress.out
  539. %_CDB_% tcrmsg -l -sE -i -NoRecipients -n0 stream >> ..\regress.out
  540. %_CDB_% tcrmsg -l -A envelope >> ..\regress.out
  541. %_CDB_% tcrmsg -l -A -n0 envelope >> ..\regress.out
  542. %_CDB_% tcrmsg -l -A -NoRecipients envelope >> ..\regress.out
  543. %_CDB_% tcrmsg -l -A -NoRecipients -n0 envelope >> ..\regress.out
  544. %_CDB_% tcrmsg -l -sE -A stream >> ..\regress.out
  545. %_CDB_% tcrmsg -l -sE -A -i stream >> ..\regress.out
  546. %_CDB_% tcrmsg -l -sE -A -n0 stream >> ..\regress.out
  547. %_CDB_% tcrmsg -l -sE -A -i -n0 stream >> ..\regress.out
  548. %_CDB_% tcrmsg -l -sE -A -NoRecipients stream >> ..\regress.out
  549. %_CDB_% tcrmsg -l -sE -A -i -NoRecipients stream >> ..\regress.out
  550. %_CDB_% tcrmsg -l -sE -A -NoRecipients -n0 stream >> ..\regress.out
  551. %_CDB_% tcrmsg -l -sE -A -i -NoRecipients -n0 stream >> ..\regress.out
  552. %_CDB_% tcrmsg -l -NoRecipients -n0 -OriginatorInfo envelope >> ..\regress.out
  553. %_CDB_% tcrmsg -l -sE -NoRecipients -n0 -OriginatorInfo stream >> ..\regress.out
  554. %_CDB_% tcrmsg -l -sE -i -NoRecipients -n0 -OriginatorInfo stream >> ..\regress.out
  555. @cd ..
  556. %_CDB_% tsca -l %store% Envelope -NoRecipients >> regress.out
  557. %_CDB_% tsca -l %store% Envelope -0 >> regress.out
  558. %_CDB_% tsca -l %store% Envelope -NoRecipients -0 >> regress.out
  559. %_CDB_% tsca -l %store% Envelope -rnoenv.msg >> regress.out
  560. %_CDB_% tsca -l %store% Envelope -rnoenv3.msg >> regress.out
  561. %_CDB_% makecert -sy 1 -sky exchange -sk testrsa1 testrsa1.cer >> regress.out
  562. %_CDB_% tpvkdel -p1 -ctestrsa1 -d >> regress.out
  563. %_CDB_% makecert -sy 1 -sky exchange -sk testrsa1 -len 512 -n "CN=Test RSA 1" testrsa1.cer >> regress.out
  564. if exist testrsa.store del testrsa.store
  565. %_CDB_% tstore testrsa.store -b -atestrsa1.cer >> regress.out
  566. %_CDB_% tstore testrsa.store -PKey >> regress.out
  567. %_CDB_% tstore testrsa.store >> regress.out
  568. %_CDB_% tsca -l testrsa.store -AllRecipients Envelope >> regress.out
  569. %_CDB_% tsca -l testrsa.store -RecipientKeyId -AllRecipients Envelope >> regress.out
  570. @if "%p%"=="" goto CmsDone
  571. %_CDB_% tsca -l testrsa.store -E3deS -AllRecipients Envelope >> regress.out
  572. %_CDB_% tsca -l testrsa.store -Erc2 -e56 -AllRecipients Envelope >> regress.out
  573. %_CDB_% tsca -l testrsa.store -Erc2 -e64 -AllRecipients Envelope >> regress.out
  574. %_CDB_% tsca -l testrsa.store -Erc2 -e64 -AllRecipients -RecipientKeyId Envelope >> regress.out
  575. %_CDB_% tsca -l testrsa.store -Erc2 -e128 -AllRecipients Envelope >> regress.out
  576. :CmsDone
  577. @rem ----------------------------------------------------------------
  578. @rem CMS2
  579. @rem ----------------------------------------------------------------
  580. @if not %t%=="cms2" if not %t%=="all" goto Cms2Done
  581. %_CDB_% makecert -sy 13 -sky exchange -sk testdh1 testdh1.cer >> regress.out
  582. %_CDB_% makecert -sy 13 -sky exchange -sk testdh2 testdh2.cer >> regress.out
  583. %_CDB_% makecert -sy 1 -sky exchange -sk testrsa2 testrsa2.cer >> regress.out
  584. %_CDB_% tpvkdel -p13 -ctestdh1 -d >> regress.out
  585. %_CDB_% tpvkdel -p13 -ctestdh2 -d >> regress.out
  586. %_CDB_% tpvkdel -p1 -ctestrsa2 -d >> regress.out
  587. %_CDB_% makecert -sy 13 -sky exchange -sk testdh1 -len 512 -n "CN=Test Hellman 1" testdh1.cer >> regress.out
  588. %_CDB_% makecert -sy 13 -sky exchange -sk testdh2 -dhp testdh1.cer -n "CN=Test Hellman 2" testdh2.cer >> regress.out
  589. %_CDB_% makecert -sy 1 -sky exchange -sk testrsa2 -len 512 -n "CN=Test RSA 2" testrsa2.cer >> regress.out
  590. %_CDB_% tstore -v testdh1.cer >> regress.out
  591. %_CDB_% tstore -v testdh2.cer >> regress.out
  592. if exist testdh.store del testdh.store
  593. %_CDB_% tstore testdh.store -b -atestdh1.cer >> regress.out
  594. %_CDB_% tstore testdh.store -b -atestdh2.cer >> regress.out
  595. %_CDB_% tstore testdh.store -PKey >> regress.out
  596. %_CDB_% tstore testdh.store >> regress.out
  597. if exist testdh1.store del testdh1.store
  598. %_CDB_% tstore testdh1.store -b -atestdh1.cer >> regress.out
  599. %_CDB_% tstore testdh1.store -PSilentKey >> regress.out
  600. %_CDB_% tsca -l testdh1.store -AllRecipients Envelope >> regress.out
  601. %_CDB_% tsca -l testdh1.store -AllRecipients -RecipientKeyId Envelope >> regress.out
  602. if exist testdh2.store del testdh2.store
  603. %_CDB_% tstore testdh2.store -b -atestdh2.cer >> regress.out
  604. %_CDB_% tstore testdh2.store -PKey >> regress.out
  605. %_CDB_% tsca -l testdh2.store -AllRecipients Envelope >> regress.out
  606. %_CDB_% tsca -l testdh2.store -AllRecipients -RecipientKeyId Envelope >> regress.out
  607. %_CDB_% tsca -l testdh.store -AllRecipients Envelope >> regress.out
  608. %_CDB_% tsca -l testdh.store -RecipientKeyId -AllRecipients Envelope >> regress.out
  609. %_CDB_% tsca -l testdh.store -p13 -AllRecipients -RecipientKeyId Envelope >> regress.out
  610. %_CDB_% tsca -l testdh.store -Erc2 -e56 -AllRecipients -RecipientKeyId Envelope >> regress.out
  611. %_CDB_% tsca -l testdh.store -p13 -Erc2 -e56 -AllRecipients Envelope >> regress.out
  612. if exist testdhrsa.store del testdhrsa.store
  613. %_CDB_% tcopycer testdh.store testdhrsa.store >> regress.out
  614. %_CDB_% tstore testdhrsa.store -b -atestrsa2.cer >> regress.out
  615. %_CDB_% tsca -l testdhrsa.store -v -AllRecipients Envelope >> regress.out
  616. %_CDB_% tsca -l testdhrsa.store -v -RecipientKeyId -AllRecipients Envelope >> regress.out
  617. %_CDB_% tstore testdhrsa.store -PKey >> regress.out
  618. %_CDB_% tsca -l testdhrsa.store -v -AllRecipients Envelope >> regress.out
  619. %_CDB_% tsca -l testdhrsa.store -v -RecipientKeyId -AllRecipients Envelope >> regress.out
  620. @cd tcrmsg
  621. @rem tests export/import of symmetric key from CSP to another
  622. %_CDB_% tcrmsg -l -KeyTrans -PRecipient envelope >> ..\regress.out
  623. %_CDB_% tcrmsg -l -KeyTrans -PRecipient -RecipientKeyId envelope >> ..\regress.out
  624. %_CDB_% tcrmsg -l -sE -KeyTrans -PRecipient stream >> ..\regress.out
  625. %_CDB_% tcrmsg -l -sE -KeyTrans -RecipientKeyId -PRecipient stream >> ..\regress.out
  626. %_CDB_% tcrmsg -l -KeyTrans -PRecipient envelope -Erc4 >> ..\regress.out
  627. %_CDB_% tcrmsg -l -KeyTrans -PRecipient envelope -Erc4 -e40 >> ..\regress.out
  628. %_CDB_% tcrmsg -l -KeyTrans -PRecipient envelope -Erc4 -e40 -I >> ..\regress.out
  629. %_CDB_% tcrmsg -l -KeyTrans -PRecipient envelope -Erc4 -e56 >> ..\regress.out
  630. %_CDB_% tcrmsg -l -KeyTrans -PRecipient envelope -Erc4 -e56 -NoSalt >> ..\regress.out
  631. @rem tests for MailList recipients
  632. %_CDB_% tcrmsg -l -MailList envelope >> ..\regress.out
  633. %_CDB_% tcrmsg -l -MailList -e40 envelope >> ..\regress.out
  634. %_CDB_% tcrmsg -l -MailList -e56 envelope >> ..\regress.out
  635. %_CDB_% tcrmsg -l -MailList -p13 envelope >> ..\regress.out
  636. %_CDB_% tcrmsg -l -MailList -e40 -p13 envelope >> ..\regress.out
  637. %_CDB_% tcrmsg -l -MailList -e56 -p13 envelope >> ..\regress.out
  638. %_CDB_% tcrmsg -l -MailList -PDefault envelope >> ..\regress.out
  639. %_CDB_% tcrmsg -l -MailList -PRecipient envelope >> ..\regress.out
  640. %_CDB_% tcrmsg -l -MailList -KeyTrans envelope >> ..\regress.out
  641. %_CDB_% tcrmsg -l -MailList -KeyTrans -PRecipient -RecipientKeyId envelope >> ..\regress.out
  642. @rem tests for KeyAgree recipients
  643. %_CDB_% tcrmsg -l -KeyAgree -p13 envelope >> ..\regress.out
  644. %_CDB_% tcrmsg -l -KeyAgree -p13 -RecipientKeyId envelope >> ..\regress.out
  645. %_CDB_% tcrmsg -l -KeyAgree -p13 -e40 envelope >> ..\regress.out
  646. %_CDB_% tcrmsg -l -KeyAgree -p13 -e56 -I envelope >> ..\regress.out
  647. %_CDB_% tcrmsg -l -KeyAgree -p13 -PDefault envelope >> ..\regress.out
  648. %_CDB_% tcrmsg -l -KeyAgree -p13 -PRecipient envelope >> ..\regress.out
  649. %_CDB_% tcrmsg -l -KeyAgree -PDefault envelope >> ..\regress.out
  650. %_CDB_% tcrmsg -l -KeyAgree -PRecipient envelope >> ..\regress.out
  651. %_CDB_% tcrmsg -l -KeyAgree -KeyTrans -PDefault envelope >> ..\regress.out
  652. %_CDB_% tcrmsg -l -KeyAgree -KeyTrans -PRecipient envelope >> ..\regress.out
  653. %_CDB_% tcrmsg -l -KeyAgree -KeyTrans -PRecipient -PDefault envelope >> ..\regress.out
  654. %_CDB_% tcrmsg -l -KeyAgree -KeyTrans -MailList -PRecipient -PDefault envelope >> ..\regress.out
  655. %_CDB_% tcrmsg -l -KeyAgree -KeyTrans -MailList -PDefault envelope >> ..\regress.out
  656. %_CDB_% tcrmsg -l -KeyAgree -KeyTrans -MailList -PDefault -RecipientKeyId envelope >> ..\regress.out
  657. %_CDB_% tcrmsg -l -KeyAgree -MailList -p13 envelope >> ..\regress.out
  658. @cd ..
  659. @if "%p%"=="" goto Cms2Done
  660. %_CDB_% tsca -l testdh.store -E3deS -AllRecipients Envelope >> regress.out
  661. %_CDB_% tsca -l testdh.store -Erc2 -e64 -AllRecipients Envelope >> regress.out
  662. %_CDB_% tsca -l testdh.store -Erc2 -e128 -AllRecipients Envelope >> regress.out
  663. %_CDB_% tsca -l testdh.store -p13 -E3des -AllRecipients Envelope >> regress.out
  664. %_CDB_% tsca -l testdh.store -p13 -Erc2 -e64 -AllRecipients Envelope >> regress.out
  665. %_CDB_% tsca -l testdh.store -p13 -Erc2 -e128 -AllRecipients Envelope >> regress.out
  666. @cd tcrmsg
  667. %_CDB_% tcrmsg -l -KeyTrans -PRecipient envelope -Erc4 -e64 %pe% >> ..\regress.out
  668. %_CDB_% tcrmsg -l -KeyTrans -PRecipient envelope -Erc4 -e128 %pe% >> ..\regress.out
  669. %_CDB_% tcrmsg -l -MailList -e64 envelope %pe% >> ..\regress.out
  670. %_CDB_% tcrmsg -l -MailList -e128 envelope %pe% >> ..\regress.out
  671. %_CDB_% tcrmsg -l -MailList -Edes -PEnhanced envelope >> ..\regress.out
  672. %_CDB_% tcrmsg -l -MailList -E3des -PEnhanced envelope >> ..\regress.out
  673. %_CDB_% tcrmsg -l -MailList -Edes envelope %pe% >> ..\regress.out
  674. %_CDB_% tcrmsg -l -MailList -E3des envelope %pe% >> ..\regress.out
  675. %_CDB_% tcrmsg -l -MailList -Edes -p13 envelope >> ..\regress.out
  676. %_CDB_% tcrmsg -l -MailList -E3des -p13 envelope >> ..\regress.out
  677. %_CDB_% tcrmsg -l -MailList -e64 -p13 envelope >> ..\regress.out
  678. %_CDB_% tcrmsg -l -MailList -e128 -p13 envelope >> ..\regress.out
  679. %_CDB_% tcrmsg -l -KeyAgree -p13 -Edes envelope >> ..\regress.out
  680. %_CDB_% tcrmsg -l -KeyAgree -p13 -E3des envelope >> ..\regress.out
  681. %_CDB_% tcrmsg -l -KeyAgree -p13 -e64 -I envelope >> ..\regress.out
  682. %_CDB_% tcrmsg -l -KeyAgree -p13 -e128 -I envelope >> ..\regress.out
  683. %_CDB_% tcrmsg -l -KeyAgree -MailList -Edes -p13 envelope >> ..\regress.out
  684. %_CDB_% tcrmsg -l -KeyAgree -MailList -E3des -p13 envelope >> ..\regress.out
  685. %_CDB_% tcrmsg -l -KeyAgree -KeyTrans -Edes envelope >> ..\regress.out
  686. %_CDB_% tcrmsg -l -KeyAgree -KeyTrans -E3des -PDefault envelope %pe% >> ..\regress.out
  687. %_CDB_% tcrmsg -l -KeyAgree -KeyTrans -MailList -Edes envelope %pe% >> ..\regress.out
  688. %_CDB_% tcrmsg -l -KeyAgree -KeyTrans -MailList -E3des -PDefault envelope %pe% >> ..\regress.out
  689. %_CDB_% tcrmsg -l -KeyAgree -KeyTrans -MailList -E3des -PDefault -PRecipient envelope %pe% >> ..\regress.out
  690. %_CDB_% tcrmsg -l -KeyAgree -KeyTrans -MailList -E3des -PEnhanced -PDefault -PRecipient envelope >> ..\regress.out
  691. @cd ..
  692. :Cms2Done
  693. @rem ----------------------------------------------------------------
  694. @rem STREAMSCA
  695. @rem ----------------------------------------------------------------
  696. @if not %t%=="streamsca" goto StreamScaDone
  697. %_CDB_% tsca -l %store% Sign -s >> regress.out
  698. %_CDB_% tsca -l %store% Sign -S >> regress.out
  699. %_CDB_% tsca -l %store% Envelope -s >> regress.out
  700. %_CDB_% tsca -l %store% Envelope -S >> regress.out
  701. %_CDB_% tsca -l %store% SignAndEnvelope -s >> regress.out
  702. %_CDB_% tsca -l %store% SignAndEnvelope -S >> regress.out
  703. %_CDB_% tsca -l %store% SignAndEnvelope -s -EncapsulatedContent -I >> regress.out
  704. %_CDB_% tsca -l %store% SignAndEnvelope -S -EncapsulatedContent -I >> regress.out
  705. %_CDB_% tsca -l %store% Envelope -s -NoRecipients >> regress.out
  706. %_CDB_% tsca -l %store% Envelope -S -NoRecipients >> regress.out
  707. %_CDB_% tsca -l %store% Envelope -s -0 >> regress.out
  708. %_CDB_% tsca -l %store% Envelope -S -0 >> regress.out
  709. %_CDB_% tsca -l %store% Envelope -s -NoRecipients -0 >> regress.out
  710. %_CDB_% tsca -l %store% Envelope -S -NoRecipients -0 >> regress.out
  711. %_CDB_% tsca -l %store% Envelope -rnoenv.msg -s >> regress.out
  712. %_CDB_% tsca -l %store% Envelope -rnoenv3.msg -s >> regress.out
  713. %_CDB_% tsca -l %store% Sign -s -SignerKeyId >> regress.out
  714. %_CDB_% tsca -l %store% Sign -S -SignerKeyId >> regress.out
  715. %_CDB_% tsca -l %store% Envelope -s -RecipientKeyId >> regress.out
  716. %_CDB_% tsca -l %store% Envelope -S -RecipientKeyId >> regress.out
  717. %_CDB_% tsca -l %store% SignAndEnvelope -s -SignerKeyId -RecipientKeyId >> regress.out
  718. %_CDB_% tsca -l %store% SignAndEnvelope -S -SignerKeyId -RecipientKeyId >> regress.out
  719. %_CDB_% tsca -l %store% SignAndEnvelope -s -EncapsulatedContent -I -SignerKeyId -RecipientKeyId >> regress.out
  720. %_CDB_% tsca -l %store% SignAndEnvelope -S -EncapsulatedContent -I -SignerKeyId -RecipientKeyId >> regress.out
  721. :StreamScaDone
  722. @rem ----------------------------------------------------------------
  723. @rem CERT
  724. @rem ----------------------------------------------------------------
  725. @if not %t%=="cert" if not %t%=="all" goto CertDone
  726. %_CDB_% tcert -fAll -wtmp.cer >> regress.out
  727. %_CDB_% tstore tmp.cer >> regress.out
  728. %_CDB_% tcert -f crl >> regress.out
  729. %_CDB_% tcert -f certReq >> regress.out
  730. %_CDB_% tcert -N >> regress.out
  731. %_CDB_% tcert -N -fAll >> regress.out
  732. %_CDB_% tcert crl -N >> regress.out
  733. %_CDB_% tcert certReq -N >> regress.out
  734. %_CDB_% tcert certReq -o1.2.840.113549.2.5 >> regress.out
  735. %_CDB_% tcert keygenReq -N >> regress.out
  736. %_CDB_% tcert ContentInfo -N >> regress.out
  737. %_CDB_% tcert -rvsgood.cer -fAll -N>> regress.out
  738. %_CDB_% tcert CertPair -wtmp.pair -N >> regress.out
  739. %_CDB_% tstore tmp.pair >> regress.out
  740. %_CDB_% tcrobu file://tmp.pair cert -m >> regress.out
  741. %_CDB_% tcert CertPair -wtmp.pair -N -Rvsrevoke.cer >> regress.out
  742. %_CDB_% tstore tmp.pair >> regress.out
  743. %_CDB_% tcrobu file://tmp.pair cert -m >> regress.out
  744. %_CDB_% tcert CertPair -wtmp.pair -N -Fvsgood.cer >> regress.out
  745. %_CDB_% tstore tmp.pair >> regress.out
  746. %_CDB_% tcrobu file://tmp.pair cert -m >> regress.out
  747. %_CDB_% tcert CertPair -wtmp.pair -Fvsgood.cer -Rvsrevoke.cer >> regress.out
  748. %_CDB_% tcert CertPair -wtmp.pair -N -Fvsgood.cer -Rvsrevoke.cer >> regress.out
  749. %_CDB_% tstore tmp.pair >> regress.out
  750. %_CDB_% tcrobu file://tmp.pair cert -m >> regress.out
  751. @rem modified self-signed der.cer
  752. @rem ber1.cer - changed time to have 0 seconds
  753. @rem ber2.cer - serial number has leading 0's
  754. @rem ber3.cer - serial number has leading FF's
  755. @rem badder.cer - removed last 40 bytes from file
  756. %_CDB_% tcert -rder.cer >> regress.out
  757. %_CDB_% tcert -rber1.cer >> regress.out
  758. %_CDB_% tcert -rber2.cer >> regress.out
  759. %_CDB_% tcert -rber3.cer >> regress.out
  760. @rem OSS bug:: the following shortened file should return OSS error
  761. @rem following doesn't fail, use Asn1UtilExtractValues instead of OSS
  762. @rem %_CDB_% tcert -rbadder.cer >> regress.out
  763. %_CDB_% tx500str -v >> regress.out
  764. %_CDB_% tx500str -nCN=Joe -f0x1 -e0x80070057 >> regress.out
  765. %_CDB_% tx500str -cvsgood.cer -fAll >> regress.out
  766. %_CDB_% tx500str -cvsgood.cer -fAll -I >> regress.out
  767. %_CDB_% tfindcer %store% -I -q -pnoname1.cer NoNameIssuer1 >> regress.out
  768. %_CDB_% tfindcer %store% -I -q -pnoname2.cer NoNameIssuer2 >> regress.out
  769. @rem -g0x10000 - CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG
  770. @rem -g0x10000 - CERT_NAME_DISABLE_IE4_UTF8_FLAG
  771. %_CDB_% tx500str -cnoname1.cer -S -g9 -e0x80070057 >> regress.out
  772. %_CDB_% tx500str -cnoname1.cer -S -g1 >> regress.out
  773. %_CDB_% tx500str -cnoname1.cer -S -g2 -e0x80092004 >> regress.out
  774. %_CDB_% tx500str -cnoname1.cer -S -g3 -e0x80092004 >> regress.out
  775. %_CDB_% tx500str -cnoname1.cer -S -g4 >> regress.out
  776. %_CDB_% tx500str -cnoname1.cer -I -g1 -e0x80092004 >> regress.out
  777. %_CDB_% tx500str -cnoname1.cer -I -g2 >> regress.out
  778. %_CDB_% tx500str -cnoname1.cer -I -g2 -f2 >> regress.out
  779. %_CDB_% tx500str -cnoname1.cer -I -g2 -f3 >> regress.out
  780. %_CDB_% tx500str -cnoname1.cer -I -g3 >> regress.out
  781. %_CDB_% tx500str -cnoname1.cer -I -g3 -a1.2.2 >> regress.out
  782. %_CDB_% tx500str -cnoname1.cer -I -g4 >> regress.out
  783. %_CDB_% tx500str -cnoname2.cer -S -g1 >> regress.out
  784. %_CDB_% tx500str -cnoname2.cer -S -g2 >> regress.out
  785. %_CDB_% tx500str -cnoname2.cer -S -g0x10002 -f2 >> regress.out
  786. %_CDB_% tx500str -cnoname2.cer -S -g0x10002 -f3 >> regress.out
  787. %_CDB_% tx500str -cnoname2.cer -S -g3 >> regress.out
  788. %_CDB_% tx500str -cnoname2.cer -S -g3 -a2.5.4.11 >> regress.out
  789. %_CDB_% tx500str -cnoname2.cer -S -g3 -a2.5.4.3 -e0x80092004 >> regress.out
  790. %_CDB_% tx500str -cnoname2.cer -S -g4 >> regress.out
  791. %_CDB_% tx500str -cnoname2.cer -I -g1 >> regress.out
  792. %_CDB_% tx500str -cnoname2.cer -I -g2 >> regress.out
  793. %_CDB_% tx500str -cnoname2.cer -I -g2 -f2 >> regress.out
  794. %_CDB_% tx500str -cnoname2.cer -I -g2 -f3 >> regress.out
  795. %_CDB_% tx500str -cnoname2.cer -I -g3 >> regress.out
  796. %_CDB_% tx500str -cnoname2.cer -I -g3 -a2.5.4.11 >> regress.out
  797. %_CDB_% tx500str -cnoname2.cer -I -g3 -a2.5.4.3 >> regress.out
  798. %_CDB_% tx500str -cnoname2.cer -I -g4 >> regress.out
  799. %_CDB_% tx500str -cvsgood.cer -S -g0x10001 -v >> regress.out
  800. %_CDB_% tx500str -cvsgood.cer -S -g0x10002 -v >> regress.out
  801. %_CDB_% tx500str -cvsgood.cer -S -g2 -f0x10000 -v >> regress.out
  802. %_CDB_% tx500str -cvsgood.cer -S -g0x10003 -v >> regress.out
  803. %_CDB_% tx500str -cvsgood.cer -S -g0x10004 -v >> regress.out
  804. %_CDB_% tx500str -cvsgood.cer -I -g1 -e0x80092004 >> regress.out
  805. %_CDB_% tx500str -cvsgood.cer -I -g2 >> regress.out
  806. %_CDB_% tx500str -cvsgood.cer -I -g3 >> regress.out
  807. %_CDB_% tx500str -cvsgood.cer -I -g3 >> regress.out
  808. %_CDB_% tx500str -cvsgood.cer -I -g4 >> regress.out
  809. @rem the following files contain Unicode base64 encoded certs with a
  810. @rem leading L'\xfeff inserted by notepad.exe.
  811. %_CDB_% tstore unicode64.cer >> regress.out
  812. %_CDB_% tstore unicode64a.cer >> regress.out
  813. %_CDB_% tstore unicode64b.cer >> regress.out
  814. :CertDone
  815. @rem ----------------------------------------------------------------
  816. @rem STORE
  817. @rem ----------------------------------------------------------------
  818. @if not %t%=="store" if not %t%=="all" goto StoreDone
  819. @del tmp.store >nul
  820. regsvr32 -s setx509.dll
  821. @rem regsvr32 -s signcde.dll
  822. %_CDB_% tstore2 tmp.store >> regress.out
  823. del tmp.spc >> regress.out
  824. %_CDB_% tcopycer tmp.store tmp.spc -7 >> regress.out
  825. %_CDB_% tstore tmp.store >> regress.out
  826. %_CDB_% tstore tmp.spc >> regress.out
  827. %_CDB_% tstore -R tmp.store >> regress.out
  828. %_CDB_% tstore -R tmp.spc >> regress.out
  829. %_CDB_% tstore -v tmp.store >> regress.out
  830. %_CDB_% tstore -F tmp.store >> regress.out
  831. %_CDB_% tcrobu file://tmp.spc cert -m >> regress.out
  832. %_CDB_% tcrobu file://tmp.spc crl -m >> regress.out
  833. %_CDB_% tcrobu file://tmp.spc pkcs7 >> regress.out
  834. %_CDB_% tcrobu file://tmp.store any >> regress.out
  835. @rem -f0x4 Defer close
  836. %_CDB_% tstore -b -f0x4 tmp.store >> regress.out
  837. %_CDB_% tfindcer tmp.store Rollover -d >> regress.out
  838. %_CDB_% tstore -cSign tmp.store >> regress.out
  839. %_CDB_% tfindcer tmp.store -S -aPhilPub -c >> regress.out
  840. %_CDB_% tfindcer tmp.store -S -APhilPub -c >> regress.out
  841. %_CDB_% tfindcer tmp.store -S -aphilpub -C >> regress.out
  842. %_CDB_% tfindcer tmp.store -S -ApHILpUB -C >> regress.out
  843. %_CDB_% tfindcer tmp.store -S recipient >> regress.out
  844. %_CDB_% tfindcer tmp.store -I testroot >> regress.out
  845. %_CDB_% tstore -dALL -s Test >> regress.out
  846. %_CDB_% tstore -dALL -R -s Test >> regress.out
  847. %_CDB_% tstore -dALL -T -s Test >> regress.out
  848. %_CDB_% tcopycer tmp.store -s Test >> regress.out
  849. %_CDB_% tstore -R -v -s Test -i2 >> regress.out
  850. tstore -dALL -s Test >> regress.out
  851. tstore -dALL -R -s Test >> regress.out
  852. %_CDB_% tcopycer -R tmp.store -s Test >> regress.out
  853. %_CDB_% tstore -R -v -s Test -i2 >> regress.out
  854. @rem CERT_STORE_MAXIMUM_ALLOWED_FLAG -f0x1000
  855. tstore -dALL -s lm:Test >> regress.out
  856. tstore -dALL -s Test >> regress.out
  857. %_CDB_% tcopycer tmp.store -s lm:Test -aduplicate1 >> regress.out
  858. %_CDB_% tstore -v -s Test >> regress.out
  859. %_CDB_% tstore -v -f0x1000 -s Test >> regress.out
  860. %_CDB_% tstore -v -s Test -dAll -E >> regress.out
  861. %_CDB_% tstore -v -s Test -f0x1000 -dAll >> regress.out
  862. %_CDB_% tcopycer tmp.store -s lm:Test -aduplicate1 >> regress.out
  863. %_CDB_% tstore -v -s phy:Test\.LocalMachine >> regress.out
  864. %_CDB_% tstore -v -f0x1000 -s phy:Test\.LocalMachine >> regress.out
  865. %_CDB_% tstore -s phy:Test\.LocalMachine -dAll -E >> regress.out
  866. %_CDB_% tstore -f0x1000 -s phy:Test\.LocalMachine -dAll >> regress.out
  867. %_CDB_% tcopycer tmp.store -s Test -aduplicate1 >> regress.out
  868. %_CDB_% tstore -v -s Test >> regress.out
  869. %_CDB_% tcopycer tmp.store -s Test -aduplicate2 >> regress.out
  870. %_CDB_% tstore -v -s Test >> regress.out
  871. %_CDB_% tcopycer -R tmp.store -s Test -aduplicate2 >> regress.out
  872. %_CDB_% tstore -v -s Test >> regress.out
  873. %_CDB_% tcopycer -A tmp.store -s Test -aduplicate1 >> regress.out
  874. %_CDB_% tstore -v -s Test >> regress.out
  875. %_CDB_% tstore -P -i0 -s Test >> regress.out
  876. %_CDB_% tstore -P -i0 -s Test -f0x18000 -E >> regress.out
  877. %_CDB_% tstore -d -P -i0 -s Test -f0x18000 -E >> regress.out
  878. %_CDB_% tstore -d -P -i0 -s Test >> regress.out
  879. %_CDB_% tstore -P -i0 -s Test -R >> regress.out
  880. %_CDB_% tstore -P -i0 -s Test -f0x18000 -E -R >> regress.out
  881. %_CDB_% tstore -i0 -ptest.cer -s Test >> regress.out
  882. %_CDB_% tstore test.cer >> regress.out
  883. %_CDB_% tcrobu file://test.cer cert >> regress.out
  884. %_CDB_% tcrobu file://test.cer cert -m >> regress.out
  885. %_CDB_% tstore -i0 -ptest.crl -s Test -R >> regress.out
  886. %_CDB_% tcrobu file://test.crl crl >> regress.out
  887. %_CDB_% tcrobu file://test.crl crl -m >> regress.out
  888. %_CDB_% tstore -d -i0 -s Test -f0x18000 -E >> regress.out
  889. %_CDB_% tstore -d -i0 -s Test >> regress.out
  890. %_CDB_% tstore -d -i0 -s Test -f0x18000 -E -R >> regress.out
  891. %_CDB_% tstore -d -i0 -s Test -R >> regress.out
  892. %_CDB_% tfindcer -d -s Test duplicate >> regress.out
  893. %_CDB_% tstore -atest.cer -s Test -f0x18000 -E >> regress.out
  894. %_CDB_% tstore -atest.cer -s Test >> regress.out
  895. %_CDB_% tstore -Atest.cer -s Test >> regress.out
  896. %_CDB_% tstore -atest.crl -s Test -R -f0x18000 -E >> regress.out
  897. %_CDB_% tstore -atest.crl -s Test -R >> regress.out
  898. %_CDB_% tstore -Atest.crl -s Test -R >> regress.out
  899. %_CDB_% tcopycer tmp.store -s Test -ame >> regress.out
  900. %_CDB_% tfindcer -s Test -S -q -ame -axchg -pme.cer >> regress.out
  901. %_CDB_% tfindcer -s Test -S -ame -axchg -v >> regress.out
  902. %_CDB_% tstore -b -P -s Test >> regress.out
  903. %_CDB_% tstore -b -Ime.cer -s Test >> regress.out
  904. %_CDB_% tfindcer -s Test -S -ame -axchg -v >> regress.out
  905. %_CDB_% tstore -b -Ame.cer -s Test >> regress.out
  906. %_CDB_% tfindcer -s Test -S -ame -axchg -v >> regress.out
  907. %_CDB_% tstore -b -P -s Test >> regress.out
  908. %_CDB_% tcopycer tmp.store -s Test -ame -I >> regress.out
  909. %_CDB_% tfindcer -s Test -S -ame -axchg -v >> regress.out
  910. %_CDB_% tstore3 >> regress.out
  911. %_CDB_% makecert -eku "2.3.2.3,2.2.2.2" teku.cer >> regress.out
  912. %_CDB_% teku -fteku.cer >> regress.out
  913. @rem check ADD_NEWER
  914. if exist tmp2.store del tmp2.store
  915. %_CDB_% tcopycer tmp.store tmp2.store -R >> regress.out
  916. del tmp2.store
  917. %_CDB_% tcopycer tmp.store tmp2.store -I >> regress.out
  918. @rem following commit reverses entries in store
  919. %_CDB_% tstore -b -C tmp.store >> regress.out
  920. del tmp2.store
  921. %_CDB_% tcopycer tmp.store tmp2.store -R >> regress.out
  922. del tmp2.store
  923. %_CDB_% tcopycer tmp.store tmp2.store -I >> regress.out
  924. @rem check file commits
  925. @rem -f0x4000 - Open existing
  926. @rem -f0x2000 - Create new
  927. if exist tmp.p7c del tmp.p7c
  928. if exist tmp.spc del tmp.spc
  929. if exist tmp.str del tmp.str
  930. %_CDB_% tstore -avsgood.cer -C -f0x2000 tmp.p7c >> regress.out
  931. %_CDB_% tstore -avsrevoke.cer -CClear -f0x4000 tmp.p7c >> regress.out
  932. %_CDB_% tstore -b tmp.p7c >> regress.out
  933. %_CDB_% tstore -avsrevoke.cer -C -f0x4000 tmp.p7c >> regress.out
  934. %_CDB_% tstore -b tmp.p7c >> regress.out
  935. %_CDB_% tstore -avsgood.cer -CForce tmp.spc >> regress.out
  936. %_CDB_% tstore -b tmp.spc >> regress.out
  937. %_CDB_% tstore -avsgood.cer -C -f0x2000 tmp.str >> regress.out
  938. %_CDB_% tstore -avsrevoke.cer -CClear -f0x4000 tmp.str >> regress.out
  939. %_CDB_% tstore -b tmp.str >> regress.out
  940. %_CDB_% tstore -avsrevoke.cer -C -f0x4000 tmp.str >> regress.out
  941. %_CDB_% tstore -b tmp.str >> regress.out
  942. %_CDB_% tstore -i0 -d -C tmp.str >> regress.out
  943. %_CDB_% tstore -b tmp.str >> regress.out
  944. %_CDB_% tstore -P -C tmp.p7c >> regress.out
  945. %_CDB_% tstore -i0 -d -C tmp.p7c >> regress.out
  946. %_CDB_% tstore -v tmp.p7c >> regress.out
  947. %_CDB_% tstore -P -C tmp.str >> regress.out
  948. %_CDB_% tstore -v tmp.str >> regress.out
  949. @rem -f0x800 - CERT_STORE_SHARE_FLAG
  950. if exist tmp.store del tmp.store
  951. %_CDB_% tcopycer -A vsgood.cer tmp.store >> regress.out
  952. %_CDB_% tcopycer -A vsgood.cer tmp.store >> regress.out
  953. %_CDB_% tcopycer -A vsgood.cer tmp.store >> regress.out
  954. %_CDB_% tstore tmp.store -S >> regress.out
  955. %_CDB_% tstore tmp.store -f0x800 >> regress.out
  956. %_CDB_% tstore vsgood.cer -PKeyProvParam >> regress.out
  957. @if "%p%"=="" goto StoreDone
  958. %_CDB_% tstore -cSign -v dss512.cer >> regress.out
  959. %_CDB_% tstore -cSign -v dss768.cer >> regress.out
  960. %_CDB_% tstore -cSign -v dss1024.cer >> regress.out
  961. :StoreDone
  962. @rem ----------------------------------------------------------------
  963. @rem KEYSTORE
  964. @rem ----------------------------------------------------------------
  965. @if not %t%=="keystore" if not %t%=="all" goto KSDone
  966. %_CDB_% tprov >> regress.out
  967. if exist tmp.store del tmp.store
  968. %_CDB_% tstore -avsgood.cer -b tmp.store >> regress.out
  969. %_CDB_% tstore -PKey -E tmp.store >> regress.out
  970. if exist tmp.store del tmp.store
  971. %_CDB_% tstore -adss1024.cer -b tmp.store >> regress.out
  972. %_CDB_% tstore -PKey -E tmp.store >> regress.out
  973. if exist tmp.store del tmp.store
  974. if exist mach.store del mach.store
  975. @if "%p%"=="" goto ksproviders
  976. %_CDB_% tstore2 -P tmp.store >> regress.out
  977. %_CDB_% tstore2 -P -M mach.store >> regress.out
  978. goto ksafter
  979. :ksproviders
  980. %_CDB_% tstore2 tmp.store >> regress.out
  981. %_CDB_% tstore2 -M mach.store >> regress.out
  982. :ksafter
  983. %_CDB_% tfindcer tmp.store -I default -d -q >> regress.out
  984. %_CDB_% tfindcer mach.store -I default -d -q >> regress.out
  985. %_CDB_% tstore -PSilentKey mach.store >> regress.out
  986. %_CDB_% tstore -PKey mach.store >> regress.out
  987. %_CDB_% tstore -PKey tmp.store >> regress.out
  988. %_CDB_% tstore -PSilentKey tmp.store >> regress.out
  989. :KSDone
  990. @rem ----------------------------------------------------------------
  991. @rem NEWSTORE
  992. @rem ----------------------------------------------------------------
  993. @if not %t%=="newstore" if not %t%=="all" goto NewStoreDone
  994. regsvr32 -s textstor.dll
  995. @rem CertStore dwFlags definitions
  996. @rem CERT_SYSTEM_STORE_CURRENT_USER 0x00010000
  997. @rem CERT_SYSTEM_STORE_LOCAL_MACHINE 0x00020000
  998. @rem CERT_SYSTEM_STORE_DOMAIN_POLICY 0x00030000
  999. @rem CERT_SYSTEM_STORE_CURRENT_SERVICE 0x00040000
  1000. @rem CERT_SYSTEM_STORE_SERVICES 0x00050000
  1001. @rem CERT_SYSTEM_STORE_USERS 0x00060000
  1002. @rem CERT_STORE_NO_CRYPT_RELEASE_FLAG 0x00000001
  1003. @rem CERT_STORE_DELETE_FLAG 0x00000010
  1004. @rem CERT_STORE_READONLY_FLAG 0x00008000
  1005. @rem CERT_STORE_OPEN_EXISTING_FLAG 0x00004000
  1006. @rem CERT_STORE_CREATE_NEW_FLAG 0x00002000
  1007. @rem CERT_STORE_MAXIMUM_ALLOWED_FLAG 0x00001000
  1008. @rem PhysicalStore dwFlags definitions
  1009. @rem CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG 0x1
  1010. @rem CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG 0x2
  1011. @rem CERT_PHYSICAL_STORE_REMOTE_OPEN_DISABLE_FLAG 0x4
  1012. @rem CERT_PHYSICAL_STORE_INSERT_COMPUTER_NAME_ENABLE_FLAG 0x8
  1013. @rem Error definitions
  1014. @rem E_INVALID_ARG 0x80070057
  1015. @rem ERROR_FILE_EXISTS 80
  1016. @rem ERROR_FILE_NOT_FOUND 2
  1017. %_CDB_% tsstore unregsys TestCollection >> regress.out
  1018. %_CDB_% tsstore unregsys TestCollection2 >> regress.out
  1019. %_CDB_% tsstore unregsys TestCollection3 >> regress.out
  1020. %_CDB_% tsstore unregsys TestSibling100 >> regress.out
  1021. %_CDB_% tsstore unregsys TestSibling200 >> regress.out
  1022. %_CDB_% tsstore -f0x14000 -e0x80070057 regsys TestCollection >> regress.out
  1023. %_CDB_% tsstore -f0x12000 regsys TestCollection >> regress.out
  1024. %_CDB_% tsstore -f0x12000 -e80 regsys TestCollection >> regress.out
  1025. %_CDB_% tsstore regsys TestCollection >> regress.out
  1026. %_CDB_% tsstore enumphy TestCollection >> regress.out
  1027. %_CDB_% tsstore regphy TestCollection TestSibling100 -pOpenStoreProvider System -pOpenParameters TestSibling100 -pOpenEncodingType 0x00010001 -pOpenFlags 0x10000 -pFlags 0x1 -pPriority 100 >> regress.out
  1028. %_CDB_% tsstore regphy TestCollection TestSibling200 -pOpenStoreProvider TestExt -pOpenParameters TestSibling200 -pOpenFlags 0x10000 -pFlags 0x1 -pPriority 200 >> regress.out
  1029. tsstore regphy -f0x14000 -e0x80070057 TestCollection TestSibling500 -pOpenStoreProvider System -pOpenParameters TestSibling500 -pPriority 500 >> regress.out
  1030. tsstore regphy -f0x12000 TestCollection TestSibling500 -pOpenStoreProvider System -pOpenParameters TestSibling500 -pPriority 500 >> regress.out
  1031. tsstore regphy -f0x12000 -e80 TestCollection TestSibling500 -pOpenStoreProvider System -pOpenParameters TestSibling500 -pPriority 500 >> regress.out
  1032. %_CDB_% tsstore regphy TestCollection TestSibling600 -pOpenStoreProvider System -pOpenParameters TestSibling600 -pPriority 600 >> regress.out
  1033. %_CDB_% tsstore -v enumphy TestCollection >> regress.out
  1034. %_CDB_% tsstore unregphy -f0x14000 TestCollection TestSibling500 >> regress.out
  1035. %_CDB_% tsstore unregphy -f0x14000 -e2 TestCollection TestSibling500 >> regress.out
  1036. %_CDB_% tsstore unregphy TestCollection TestSibling600 >> regress.out
  1037. %_CDB_% tsstore -v enumphy TestCollection >> regress.out
  1038. %_CDB_% tsstore -v -f0x1000 enumphy TestCollection >> regress.out
  1039. %_CDB_% tstore -s TestCollection -avsgood.cer >> regress.out
  1040. %_CDB_% tstore -s TestCollection -b >> regress.out
  1041. %_CDB_% tstore -s TestSibling200 -b >> regress.out
  1042. %_CDB_% tstore -s TestSibling100 -avsrevoke.cer >> regress.out
  1043. %_CDB_% tstore -s TestCollection -b >> regress.out
  1044. %_CDB_% tfindcer %store% -S -q -aMSPub -pmspub.cer >> regress.out
  1045. %_CDB_% tfindcer %store% -S -q -aPhilPub -pphilpub.cer >> regress.out
  1046. %_CDB_% tfindcer %store% -S -q -ame -axchg -pme.cer >> regress.out
  1047. %_CDB_% tstore -s TestCollection -amspub.cer >> regress.out
  1048. %_CDB_% tstore -s TestSibling100 -aphilpub.cer >> regress.out
  1049. %_CDB_% tstore -s TestCollection -b >> regress.out
  1050. %_CDB_% tsstore regphy TestCollection TestSibling300 -pOpenStoreProvider File -pOpenParameters me.cer -pOpenEncodingType 0x00010001 -pOpenFlags 0x8000 -pFlags 0x0 -pPriority 300 >> regress.out
  1051. %_CDB_% tsstore -v enumphy TestCollection >> regress.out
  1052. %_CDB_% tstore -s TestCollection -b >> regress.out
  1053. %_CDB_% tstore -s TestSibling200 -b >> regress.out
  1054. %_CDB_% tstore -s TestSibling100 -b >> regress.out
  1055. %_CDB_% tstore -s TestCollection -Aphilpub.cer >> regress.out
  1056. %_CDB_% tstore -s TestCollection -Avsrevoke.cer >> regress.out
  1057. %_CDB_% tstore -s TestCollection -b >> regress.out
  1058. %_CDB_% tstore -s TestSibling200 -b >> regress.out
  1059. %_CDB_% tstore -s TestSibling100 -b >> regress.out
  1060. @del test.store >nul
  1061. %_CDB_% tstore %store% -R -i0 -proot.crl >> regress.out
  1062. %_CDB_% tstore %store% -R -i1 -pca.crl >> regress.out
  1063. %_CDB_% tstore %store% -R -i4 -ptest.crl >> regress.out
  1064. %_CDB_% tfindcer %store% -q -ptest.cer TestRecipient >> regress.out
  1065. %_CDB_% tcopycer %store% test.store >> regress.out
  1066. %_CDB_% tfindcer test.store -I -d -q default >> regress.out
  1067. %_CDB_% tfindctl test.store -d -q -LHttp2 >> regress.out
  1068. %_CDB_% tfindctl test.store -d -q -LCtl2 >> regress.out
  1069. %_CDB_% tstore test.store -R -dAll >> regress.out
  1070. %_CDB_% tstore test.store -R -aroot.crl >> regress.out
  1071. %_CDB_% tstore test.store -R -aca.crl >> regress.out
  1072. %_CDB_% tstore test.store -R -atest.crl >> regress.out
  1073. %_CDB_% tsstore regphy TestCollection2 TestCollection -pOpenStoreProvider System -pOpenParameters TestCollection -pOpenFlags 0x10000 -pFlags 0x1 >> regress.out
  1074. %_CDB_% tsstore regphy TestCollection2 .Default -pOpenStoreProvider System -pOpenParameters TestCollection2 -pOpenFlags 0x10000 -pFlags 0x0 -pPriority 1000 >> regress.out
  1075. %_CDB_% tsstore regphy TestCollection3 TestCollection2 -pOpenStoreProvider System -pOpenParameters TestCollection2 -pOpenFlags 0x10000 -pFlags 0x1 >> regress.out
  1076. %_CDB_% tsstore regphy TestCollection3 .Default -pOpenStoreProvider System -pOpenParameters DontOpen -pOpenFlags 0x0 -pFlags 0x2 -pPriority 2000 >> regress.out
  1077. %_CDB_% tsstore regphy TestSibling200 TestSibling200 -pOpenStoreProvider System -pOpenParameters TestSibling200 -pOpenFlags 0x10000 -pFlags 0x1 >> regress.out
  1078. %_CDB_% tstore -s TestSibling100 -atest.cer >> regress.out
  1079. %_CDB_% tstore -s TestCollection3 -P -b >> regress.out
  1080. %_CDB_% tfindcer -s TestCollection3 -v TestRecipient >> regress.out
  1081. %_CDB_% tcopycer test.store -s TestCollection3 >> regress.out
  1082. %_CDB_% tfindcer -s TestCollection3 -v TestRecipient >> regress.out
  1083. %_CDB_% tfindcer -s TestCollection3 -I -d -q verisign >> regress.out
  1084. %_CDB_% tstore -s TestCollection3 -P -b >> regress.out
  1085. %_CDB_% tstore -s TestCollection3 -P -d -i1 >> regress.out
  1086. %_CDB_% tstore -s TestSibling200 -b >> regress.out
  1087. %_CDB_% tstore -s TestSibling100 -b >> regress.out
  1088. %_CDB_% tstore -s -f0x12000 TestCollection3 -b >> regress.out
  1089. %_CDB_% tstore -s -f0x1C000 TestCollection3 -b >> regress.out
  1090. %_CDB_% tstore -s -f0x18000 TestCollection2 -b >> regress.out
  1091. %_CDB_% tstore -s -f0x14000 TestCollection -b >> regress.out
  1092. %_CDB_% tstore -s TestCollection3 -T >> regress.out
  1093. %_CDB_% tstore -s TestCollection3 -R >> regress.out
  1094. %_CDB_% tstore -s TestCollection3 -F -b >> regress.out
  1095. @rem -f0x4 Defer close
  1096. %_CDB_% tstore -s -f0x10004 TestCollection3 -b >> regress.out
  1097. %_CDB_% tstore -s -f0x10010 TestCollection3 >> regress.out
  1098. %_CDB_% tstore -s -f0x14000 TestCollection3 -b >> regress.out
  1099. %_CDB_% tsstore unregphy TestCollection TestSibling300 >> regress.out
  1100. @rem #13 is the SYSTEM_REGISTRY_W provider
  1101. %_CDB_% tstore -s prov:#13:TestSibling100 -f0x10000 >> regress.out
  1102. %_CDB_% tstore5 -L -P -b TestSibling100 me.cer prov:testext:TestSibling200 TestSibling200 >> regress.out
  1103. %_CDB_% tstore5 -L -C -P -b TestSibling100 me.cer prov:testext:TestSibling200 TestSibling200 >> regress.out
  1104. %_CDB_% tstore -s TestCollection -R -N -dall >> regress.out
  1105. %_CDB_% tstore -s prov:testext:TestCollection -T -N -dall >> regress.out
  1106. %_CDB_% tfindcer -s TestSibling100 -S -d -q PhilPub >> regress.out
  1107. %_CDB_% tstore5 -L test.cer TestSibling100 -v >> regress.out
  1108. %_CDB_% tstore5 -L TestSibling100 test.cer -v >> regress.out
  1109. %_CDB_% tstore5 -L test.cer TestSibling100 -R -v >> regress.out
  1110. %_CDB_% tstore5 -L TestSibling100 test.cer -R -v >> regress.out
  1111. %_CDB_% tstore5 -L test.cer TestSibling100 -A -v >> regress.out
  1112. %_CDB_% tstore5 -C -b me.cer vsgood.cer TestSibling100 prov:testext:TestSibling200 >> regress.out
  1113. %_CDB_% tstore5 -C -b me.cer vsgood.cer prov:testext:TestSibling200 TestSibling100 >> regress.out
  1114. %_CDB_% tstore5 -C -b me.cer vsgood.cer vsrevoke.cer >> regress.out
  1115. %_CDB_% tstore -s prov:testext:TestCollection -N -dall >> regress.out
  1116. %_CDB_% tstore -s prov:testext:TestSibling100 -avsrevoke.cer >> regress.out
  1117. %_CDB_% tstore -s prov:testext:TestCollection -Avsrevoke.cer >> regress.out
  1118. %_CDB_% tstore -s prov:testext:TestSibling100 -atest.cer >> regress.out
  1119. %_CDB_% tstore -s prov:testext:TestCollection2 -P -b >> regress.out
  1120. %_CDB_% tfindcer -s prov:testext:TestCollection2 -v TestRecipient >> regress.out
  1121. %_CDB_% tcopycer test.store -s prov:testext:TestCollection2 >> regress.out
  1122. %_CDB_% tfindcer -s prov:testext:TestCollection2 -v TestRecipient >> regress.out
  1123. %_CDB_% tfindcer -s prov:testext:TestCollection2 -I -d -q verisign >> regress.out
  1124. %_CDB_% tstore -s prov:testext:TestCollection2 -P -b >> regress.out
  1125. %_CDB_% tstore -s prov:testext:TestCollection2 -P -d -i1 >> regress.out
  1126. %_CDB_% tfindcer -s prov:testext:TestCollection2 -v TestRecipient >> regress.out
  1127. %_CDB_% tstore -s prov:testext:TestSibling200 -b >> regress.out
  1128. %_CDB_% tstore -s prov:testext:TestSibling100 -b >> regress.out
  1129. %_CDB_% tstore -s prov:testext:TestCollection2 -F -b >> regress.out
  1130. @rem -f0x4 Defer close
  1131. %_CDB_% tstore -s -f0x10004 prov:testext:TestCollection2 -b >> regress.out
  1132. %_CDB_% tstore -s -f0x12000 prov:testext:TestCollection2 -b >> regress.out
  1133. %_CDB_% tstore -s -f0x1C000 prov:testext:TestCollection2 -b >> regress.out
  1134. %_CDB_% tstore -s -f0x18000 prov:testext:TestCollection2 -b >> regress.out
  1135. %_CDB_% tstore -s -f0x14000 prov:testext:TestCollection -b >> regress.out
  1136. %_CDB_% tstore -s prov:testext:TestCollection2 -T >> regress.out
  1137. %_CDB_% tstore -s prov:testext:TestCollection2 -R >> regress.out
  1138. %_CDB_% tstore -s -f0x10010 prov:testext:TestCollection2 >> regress.out
  1139. %_CDB_% tstore -s -f0x14000 prov:testext:TestCollection2 -b >> regress.out
  1140. @rem -f0x800 CERT_STORE_BACKUP_RESTORE_FLAG
  1141. %_CDB_% tsstore enumphy root -f0x800 -v >> regress.out
  1142. %_CDB_% tsstore enumphy root -f0x800 -v -lLocalMachine >> regress.out
  1143. %_CDB_% tsstore enumphy root -f0x800 -v -lLocalMachine >> regress.out
  1144. %_CDB_% tstore -sFile -f0x800 %store% -i0 >> regress.out
  1145. %_CDB_% tstore -s -f0x800 root -i0 >> regress.out
  1146. %_CDB_% tstore -s -f0x800 request -i0 >> regress.out
  1147. :NewStoreDone
  1148. @rem ----------------------------------------------------------------
  1149. @rem RELSTORE
  1150. @rem ----------------------------------------------------------------
  1151. @if not %t%=="relstore" if not %t%=="all" goto RelStoreDone
  1152. @rem create a "big" registry Serialized store
  1153. %_CDB_% tcopycer %store% -s lmgp:testgroup -A >> regress.out
  1154. %_CDB_% tcopycer %store% -s lmgp:testgroup -A >> regress.out
  1155. %_CDB_% tcopycer %store% -s lmgp:rel:hklm:testgroup -A >> regress.out
  1156. %_CDB_% tcopycer %store% -s lmgp:rel:hklm:testgroup -A >> regress.out
  1157. @rem should be 4 identical PhilPub certs
  1158. %_CDB_% tfindcer -s lmgp:testgroup -S -aMSPub -b >> regress.out
  1159. %_CDB_% tfindcer -s lmgp:rel:hklm:testgroup -S -aMSPub -b >> regress.out
  1160. %_CDB_% tstore -s cugp:rel:hkcu:testgroup -dAll >> regress.out
  1161. %_CDB_% tstore -s cugp:rel:hkcu:testgroup -dAll -T >> regress.out
  1162. %_CDB_% tstore -s cugp:rel:hkcu:testgroup -dAll -R >> regress.out
  1163. %_CDB_% tstore -s lmgp:rel:hklm:testgroup -dAll >> regress.out
  1164. %_CDB_% tstore -s lmgp:rel:hklm:testgroup -dAll -T >> regress.out
  1165. %_CDB_% tstore -s lmgp:rel:hklm:testgroup -dAll -R >> regress.out
  1166. %_CDB_% tstore -s cu:phy:testgroup\.default -dAll >> regress.out
  1167. %_CDB_% tstore -s cu:phy:testgroup\.default -dAll -T >> regress.out
  1168. %_CDB_% tstore -s cu:phy:testgroup\.default -dAll -R >> regress.out
  1169. %_CDB_% tstore -s lm:phy:testgroup\.default -dAll >> regress.out
  1170. %_CDB_% tstore -s lm:phy:testgroup\.default -dAll -T >> regress.out
  1171. %_CDB_% tstore -s lm:phy:testgroup\.default -dAll -R >> regress.out
  1172. %_CDB_% tstore -s testgroup -b >> regress.out
  1173. %_CDB_% tstore -s testgroup -b -T >> regress.out
  1174. %_CDB_% tstore -s testgroup -b -R >> regress.out
  1175. %_CDB_% tsstore -RNULL -lLMGP enumsys -e0x80070057 >> regress.out
  1176. %_CDB_% tsstore -RHKLM -lLMGP -v enumsys >> regress.out
  1177. %_CDB_% tsstore -RHKCU -lCUGP unregsys TestGroup2 >> regress.out
  1178. %_CDB_% tsstore -RHKCU -lCUGP regsys TestGroup2 >> regress.out
  1179. %_CDB_% tsstore -RHKCU -lCUGP -v enumsys >> regress.out
  1180. %_CDB_% tsstore -RHKCU -lCurrentUser enumphy TestCollection -v >> regress.out
  1181. %_CDB_% tsstore -RHKCU -lCurrentUser enumphy TestCollection2 >> regress.out
  1182. %_CDB_% tsstore -RHKCU -lCurrentUser enumphy TestSibling200 -v >> regress.out
  1183. %_CDB_% tcopycer test.store -s cugp:rel:hkcu:testgroup >> regress.out
  1184. %_CDB_% tstore -s cugp:rel:hkcu:testgroup -b >> regress.out
  1185. %_CDB_% tstore -s cugp:relsys:hkcu:testgroup -b -T >> regress.out
  1186. %_CDB_% tstore -s cugp:relphy:hkcu:testgroup\.Default -b -R >> regress.out
  1187. %_CDB_% tstore -s lmgp:rel:hklm:testgroup -aphilpub.cer >> regress.out
  1188. %_CDB_% tstore -s testgroup -b >> regress.out
  1189. %_CDB_% tstore -s testgroup -b -T >> regress.out
  1190. %_CDB_% tstore -s testgroup -b -R >> regress.out
  1191. %_CDB_% tstore -s cu:relphy:hkcu:testgroup\.GroupPolicy -b >> regress.out
  1192. %_CDB_% tstore -s cu:relphy:hkcu:testgroup\.Default -b >> regress.out
  1193. %_CDB_% tstore -s lm:rel:hklm:testgroup -b >> regress.out
  1194. %_CDB_% tstore -s cu:relphy:hkcu:testgroup\.GroupPolicy -b -T >> regress.out
  1195. %_CDB_% tstore -s lm:rel:hklm:testgroup -b -T >> regress.out
  1196. %_CDB_% tstore -s cu:relphy:hkcu:testgroup\.GroupPolicy -b -R >> regress.out
  1197. %_CDB_% tstore -s lm:rel:hklm:testgroup -b -R >> regress.out
  1198. %_CDB_% tstore -s lmgp:rel:hklm:testgroup -b >> regress.out
  1199. %_CDB_% tstore -s lmgp:rel:hklm:testgroup -ame.cer -CClear >> regress.out
  1200. %_CDB_% tstore -s lmgp:rel:hklm:testgroup -b >> regress.out
  1201. %_CDB_% tstore -s lmgp:rel:hklm:testgroup -Ame.cer -C -N >> regress.out
  1202. %_CDB_% tstore -s lmgp:rel:hklm:testgroup -v >> regress.out
  1203. %_CDB_% tstore -s lmgp:rel:hklm:testgroup -P >> regress.out
  1204. %_CDB_% tstore -s lmgp:rel:hklm:testgroup -v >> regress.out
  1205. :RelStoreDone
  1206. @rem ----------------------------------------------------------------
  1207. @rem REMOTESTORE
  1208. @rem ----------------------------------------------------------------
  1209. @if not %t%=="remotestore" if not %t%=="all" goto RemoteStoreDone
  1210. @if "%LocalComputerName%"=="" goto RemoteStoreDone
  1211. @if "%CurrentUserSID%"=="" goto RemoteStoreDone
  1212. set LCN=%LocalComputerName%
  1213. set SID=%CurrentUserSID%
  1214. %_CDB_% tsstore unregsys -lLocalMachine %LCN%\MacCol >> regress.out
  1215. %SLEEP0%
  1216. %_CDB_% tsstore unregsys -lLocalMachine MacSib0 >> regress.out
  1217. %SLEEP0%
  1218. %_CDB_% tsstore unregsys -lLocalMachine %LCN%\MacSib1 >> regress.out
  1219. %SLEEP0%
  1220. %_CDB_% tsstore unregsys -lLocalMachine MacSib2 >> regress.out
  1221. %SLEEP0%
  1222. %_CDB_% tsstore unregsys -lCurrentService SerCol >> regress.out
  1223. %SLEEP0%
  1224. %_CDB_% tsstore unregsys -lServices %SID%\SerSib1 >> regress.out
  1225. %SLEEP0%
  1226. %_CDB_% tsstore unregsys -lServices %LCN%\%SID%\SerSib2 >> regress.out
  1227. %SLEEP0%
  1228. %_CDB_% tsstore unregsys -lCurrentService SerSib3 >> regress.out
  1229. %SLEEP0%
  1230. %_CDB_% tsstore unregsys -lCurrentService SerSib4 >> regress.out
  1231. %SLEEP0%
  1232. %_CDB_% tsstore unregsys -lUsers %SID%\UseCol >> regress.out
  1233. %SLEEP0%
  1234. %_CDB_% tsstore unregsys -lCurrentUser UseSib1 >> regress.out
  1235. %SLEEP0%
  1236. %_CDB_% tsstore unregsys -lUsers %LCN%\%SID%\UseSib2 >> regress.out
  1237. %SLEEP0%
  1238. %_CDB_% tsstore unregsys -lUsers %SID%\UseSib3 >> regress.out
  1239. %SLEEP0%
  1240. %_CDB_% tsstore regsys -lLocalMachine -f0x4000 -e0x80070057 %LCN%\MacCol >> regress.out
  1241. %SLEEP0%
  1242. %_CDB_% tsstore regsys -lLocalMachine -f0x2000 %LCN%\MacCol >> regress.out
  1243. %SLEEP0%
  1244. %_CDB_% tsstore regsys -lLocalMachine -f0x2000 -e80 %LCN%\MacCol >> regress.out
  1245. %SLEEP0%
  1246. %_CDB_% tsstore regsys -lLocalMachine %LCN%\MacSib1 >> regress.out
  1247. %SLEEP0%
  1248. %_CDB_% tsstore regsys -lLocalMachine MacSib2 >> regress.out
  1249. %SLEEP0%
  1250. %_CDB_% tsstore regsys -lCurrentService SerCol >> regress.out
  1251. %SLEEP0%
  1252. %_CDB_% tsstore regsys -lServices %SID%\SerSib1 >> regress.out
  1253. %SLEEP0%
  1254. %_CDB_% tsstore regsys -lServices %LCN%\%SID%\SerSib2 >> regress.out
  1255. %SLEEP0%
  1256. %_CDB_% tsstore regsys -lUsers %SID%\UseCol >> regress.out
  1257. %SLEEP0%
  1258. %_CDB_% tsstore regsys -lCurrentUser UseSib1 >> regress.out
  1259. %SLEEP0%
  1260. %_CDB_% tsstore regsys -lUsers %LCN%\%SID%\UseSib2 >> regress.out
  1261. %SLEEP0%
  1262. %_CDB_% tsstore >> regress.out
  1263. %SLEEP0%
  1264. %_CDB_% tsstore -P%LCN% >> regress.out
  1265. %SLEEP0%
  1266. @rem CERT_STORE_PROV_SYSTEM_A ((LPCSTR) 9)
  1267. @rem CERT_STORE_PROV_SYSTEM_W ((LPCSTR) 10)
  1268. @rem CERT_STORE_PROV_SYSTEM_REGISTRY_A ((LPCSTR) 12)
  1269. @rem CERT_STORE_PROV_SYSTEM_REGISTRY_W ((LPCSTR) 13)
  1270. @rem CERT_STORE_PROV_PHYSICAL_W ((LPCSTR) 14)
  1271. @rem PhysicalStore dwFlags definitions
  1272. @rem CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG 0x1
  1273. @rem CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG 0x2
  1274. @rem CERT_PHYSICAL_STORE_REMOTE_OPEN_DISABLE_FLAG 0x4
  1275. @rem CERT_PHYSICAL_STORE_INSERT_COMPUTER_NAME_ENABLE_FLAG 0x8
  1276. %_CDB_% tsstore -lLocalMachine regphy %LCN%\MacCol MacSib1 -pOpenStoreProvider System -pOpenParameters %LCN%\MacSib1 -pOpenFlags 0x20000 -pFlags 0x1 -pPriority 1 >> regress.out
  1277. %SLEEP0%
  1278. %_CDB_% tsstore -lLocalMachine regphy %LCN%\MacCol MacSib2 -pOpenStoreProvider #9 -pOpenParameters MacSib2 -pOpenFlags 0x20000 -pFlags 0x1 -pPriority 2 >> regress.out
  1279. %SLEEP0%
  1280. %_CDB_% tsstore -lLocalMachine regphy MacCol ServiceStuff -pOpenStoreProvider System -pOpenParameters %SID%\SerSib4 -pOpenFlags 0x58000 -pFlags 0x0 -pPriority 4 >> regress.out
  1281. %SLEEP0%
  1282. %_CDB_% tsstore -lServices regphy %LCN%\%SID%\SerCol SerSib1 -pOpenStoreProvider #12 -pOpenParameters %LCN%\%SID%\SerSib1 -pOpenFlags 0x50000 -pFlags 0x1 -pPriority 1 >> regress.out
  1283. %SLEEP0%
  1284. %_CDB_% tsstore -lCurrentService regphy SerCol SerSib2 -pOpenStoreProvider #10 -pOpenParameters SerSib2 -pOpenFlags 0x40000 -pFlags 0x1 -pPriority 2 >> regress.out
  1285. %SLEEP0%
  1286. %_CDB_% tsstore -lServices regphy %LCN%\%SID%\SerCol SerSib3 -pOpenStoreProvider Physical -pOpenParameters %LCN%\%SID%\SerSib3\SerSib3 -pOpenFlags 0x50000 -pFlags 0x1 -pPriority 3 >> regress.out
  1287. %SLEEP0%
  1288. %_CDB_% tsstore -lServices regphy %SID%\SerCol SerSib4 -pOpenStoreProvider Physical -pOpenParameters %SID%\SerSib4\.Default -pOpenFlags 0x50000 -pFlags 0x1 -pPriority 4 >> regress.out
  1289. %SLEEP0%
  1290. %_CDB_% tsstore -lCurrentService regphy SerCol LocalMachineStuff -pOpenStoreProvider System -pOpenParameters MacSib0 -pOpenFlags 0x28000 -pFlags 0x0 -pPriority 0 >> regress.out
  1291. %SLEEP0%
  1292. %_CDB_% tsstore -lCurrentService regphy SerSib1 SerSib1 -pOpenStoreProvider #9 -pOpenParameters %LCN%\%SID%\SerSib1 -pOpenFlags 0x50000 -pFlags 0x1 -pPriority 1 >> regress.out
  1293. %SLEEP0%
  1294. %_CDB_% tsstore -lCurrentService regphy SerSib2 SerSib2 -pOpenStoreProvider System -pOpenParameters %SID%\SerSib2 -pOpenFlags 0x50000 -pFlags 0x1 -pPriority 1 >> regress.out
  1295. %SLEEP0%
  1296. %_CDB_% tsstore -lCurrentService regphy SerSib3 SerSib3 -pOpenStoreProvider SystemRegistry -pOpenParameters SerSib3 -pOpenFlags 0x40000 -pFlags 0x1 -pPriority 1 >> regress.out
  1297. %SLEEP0%
  1298. %_CDB_% tsstore -lCurrentService regphy SerSib4 SerSib4 -pOpenStoreProvider Physical -pOpenParameters SerSib4\.Default -pOpenFlags 0x40000 -pFlags 0x1 -pPriority 1 >> regress.out
  1299. %SLEEP0%
  1300. %_CDB_% tsstore -lUsers regphy %LCN%\%SID%\UseCol UseSib1 -pOpenStoreProvider System -pOpenParameters %LCN%\%SID%\UseSib1 -pOpenFlags 0x60000 -pFlags 0x1 -pPriority 1 >> regress.out
  1301. %SLEEP0%
  1302. %_CDB_% tsstore -lCurrentUser regphy UseCol UseSib2 -pOpenStoreProvider System -pOpenParameters UseSib2 -pOpenFlags 0x10000 -pFlags 0x1 -pPriority 2 >> regress.out
  1303. %SLEEP0%
  1304. %_CDB_% tsstore -lUsers regphy %LCN%\%SID%\UseCol UseSib3 -pOpenStoreProvider Physical -pOpenParameters %SID%\UseSib3\.Default -pOpenFlags 0x60000 -pFlags 0x5 -pPriority 3 >> regress.out
  1305. %SLEEP0%
  1306. %_CDB_% tsstore -lCurrentUser regphy UseCol LocalMachineStuff -pOpenStoreProvider System -pOpenParameters %LCN%\MacSib0 -pOpenFlags 0x20000 -pFlags 0x1 -pPriority 0 >> regress.out
  1307. %SLEEP0%
  1308. %_CDB_% tsstore -lCurrentUser regphy UseCol ServiceStuff -pOpenStoreProvider System -pOpenParameters SerSib3 -pOpenFlags 0x48000 -pFlags 0x0 -pPriority 3 >> regress.out
  1309. %SLEEP0%
  1310. %_CDB_% tsstore -lCurrentUser regphy UseSib1 UseSib1 -pOpenStoreProvider #9 -pOpenParameters %LCN%\%SID%\UseSib1 -pOpenFlags 0x60000 -pFlags 0x1 -pPriority 1 >> regress.out
  1311. %SLEEP0%
  1312. %_CDB_% tsstore -lCurrentUser regphy UseSib2 UseSib2 -pOpenStoreProvider System -pOpenParameters %SID%\UseSib2 -pOpenFlags 0x60000 -pFlags 0x1 -pPriority 1 >> regress.out
  1313. %SLEEP0%
  1314. %_CDB_% tsstore >> regress.out
  1315. %SLEEP0%
  1316. %_CDB_% tsstore -v >> regress.out
  1317. %SLEEP0%
  1318. %_CDB_% tsstore -P%LCN% >> regress.out
  1319. %SLEEP0%
  1320. %_CDB_% tsstore -P%LCN% -v >> regress.out
  1321. %SLEEP0%
  1322. %_CDB_% tsstore -lCurrentService enumphy SerCol -v >> regress.out
  1323. %SLEEP0%
  1324. %_CDB_% tsstore -lServices enumphy %SID%\SerCol -v >> regress.out
  1325. %SLEEP0%
  1326. %_CDB_% tsstore -lServices enumphy %LCN%\%SID%\SerCol -v >> regress.out
  1327. %SLEEP0%
  1328. %_CDB_% tsstore -lCurrentService enumphy SerSib1 -v >> regress.out
  1329. %SLEEP0%
  1330. %_CDB_% tsstore -lServices enumphy %SID%\SerSib1 -v >> regress.out
  1331. %SLEEP0%
  1332. %_CDB_% tsstore -lServices enumphy %LCN%\%SID%\SerSib1 -v >> regress.out
  1333. %SLEEP0%
  1334. %_CDB_% tsstore -lCurrentService enumphy SerSib2 -v >> regress.out
  1335. %SLEEP0%
  1336. %_CDB_% tsstore -lServices enumphy %SID%\SerSib2 -v >> regress.out
  1337. %SLEEP0%
  1338. %_CDB_% tsstore -lCurrentService enumphy SerSib3 -v >> regress.out
  1339. %SLEEP0%
  1340. %_CDB_% tsstore -lServices enumphy %LCN%\%SID%\SerSib3 -v >> regress.out
  1341. %SLEEP0%
  1342. %_CDB_% tsstore -lCurrentService enumphy SerSib4 -v >> regress.out
  1343. %SLEEP0%
  1344. %_CDB_% tsstore -lServices enumphy %SID%\SerSib4 -v >> regress.out
  1345. %SLEEP0%
  1346. %_CDB_% tsstore -lCurrentUser enumphy UseCol -v >> regress.out
  1347. %SLEEP0%
  1348. %_CDB_% tsstore -lUsers enumphy %SID%\UseCol -v >> regress.out
  1349. %SLEEP0%
  1350. %_CDB_% tsstore -lUsers enumphy %LCN%\%SID%\UseCol -v >> regress.out
  1351. %SLEEP0%
  1352. %_CDB_% tsstore -lCurrentUser enumphy UseSib1 -v >> regress.out
  1353. %SLEEP0%
  1354. %_CDB_% tsstore -lUsers enumphy %SID%\UseSib1 -v >> regress.out
  1355. %SLEEP0%
  1356. %_CDB_% tsstore -lUsers enumphy %LCN%\%SID%\UseSib1 -v >> regress.out
  1357. %SLEEP0%
  1358. %_CDB_% tsstore -lCurrentUser enumphy UseSib2 -v >> regress.out
  1359. %SLEEP0%
  1360. %_CDB_% tsstore -lUsers enumphy %SID%\UseSib2 -v >> regress.out
  1361. %SLEEP0%
  1362. %_CDB_% tfindcer %store% -S -q -aMSPub -pmspub.cer >> regress.out
  1363. %SLEEP0%
  1364. %_CDB_% tfindcer %store% -S -q -aPhilPub -pphilpub.cer >> regress.out
  1365. %SLEEP0%
  1366. %_CDB_% tfindcer %store% -S -q -ame -axchg -pme.cer >> regress.out
  1367. %SLEEP0%
  1368. %_CDB_% tfindcer %store% -S -q -akevin -asign -pkevin.cer >> regress.out
  1369. %SLEEP0%
  1370. %_CDB_% tstore -b -s LocalMachine:%LCN%\MacCol -amspub.cer >> regress.out
  1371. %SLEEP0%
  1372. %_CDB_% tstore -b -s LocalMachine:%LCN%\MacSib1 -aphilpub.cer >> regress.out
  1373. %SLEEP0%
  1374. %_CDB_% tstore -b -s LocalMachine:PHY:%LCN%\MacCol\MacSib1 -ame.cer >> regress.out
  1375. %SLEEP0%
  1376. %_CDB_% tstore -b -s Services:PHY:%LCN%\%SID%\SerCol\SerSib1 -amspub.cer >> regress.out
  1377. %SLEEP0%
  1378. %_CDB_% tstore -b -s Services:PHY:%SID%\SerCol\SerSib2 -aphilpub.cer >> regress.out
  1379. %SLEEP0%
  1380. %_CDB_% tstore -b -s CurrentService:PHY:SerCol\SerSib3 -ame.cer >> regress.out
  1381. %SLEEP0%
  1382. %_CDB_% tstore -b -s CurrentService:SerCol -avsgood.cer >> regress.out
  1383. %SLEEP0%
  1384. %_CDB_% tstore -b -s Services:%LCN%\%SID%\SerCol -avsrevoke.cer >> regress.out
  1385. %SLEEP0%
  1386. %_CDB_% tstore -b -s Users:%LCN%\%SID%\UseCol -amspub.cer >> regress.out
  1387. %_CDB_% tstore -b -s Users:%SID%\UseCol -aphilpub.cer >> regress.out
  1388. %SLEEP0%
  1389. %_CDB_% tstore -b -s Users:PHY:%LCN%\%SID%\UseCol\UseSib1 -avsgood.cer >> regress.out
  1390. %SLEEP0%
  1391. %_CDB_% tstore -b -s CurrentUser:PHY:UseCol\LocalMachineStuff -akevin.cer >> regress.out
  1392. %SLEEP0%
  1393. %_CDB_% tstore -b -s LocalMachine:MacCol >> regress.out
  1394. %SLEEP0%
  1395. %_CDB_% tstore -b -s LocalMachine:%LCN%\MacCol >> regress.out
  1396. %SLEEP0%
  1397. %_CDB_% tstore -b -s LocalMachine:MacSib2 >> regress.out
  1398. %SLEEP0%
  1399. %_CDB_% tstore -b -s LocalMachine:%LCN%\MacSib2 >> regress.out
  1400. %SLEEP0%
  1401. %_CDB_% tstore -b -s LocalMachine:MacSib0 >> regress.out
  1402. %SLEEP0%
  1403. %_CDB_% tstore -b -s Services:%SID%\SerCol >> regress.out
  1404. %SLEEP0%
  1405. %_CDB_% tstore -b -s Services:%LCN%\%SID%\SerCol >> regress.out
  1406. %SLEEP0%
  1407. %_CDB_% tstore -b -s CurrentService:SerCol >> regress.out
  1408. %SLEEP0%
  1409. %_CDB_% tstore -b -s CurrentService:SerSib4 >> regress.out
  1410. %SLEEP0%
  1411. %_CDB_% tstore -b -s CurrentService:SerSib3 >> regress.out
  1412. %SLEEP0%
  1413. %_CDB_% tstore -b -s CurrentService:SerSib2 >> regress.out
  1414. %SLEEP0%
  1415. %_CDB_% tstore -b -s CurrentService:SerSib1 >> regress.out
  1416. %SLEEP0%
  1417. %_CDB_% tstore -b -s Users:%SID%\UseCol >> regress.out
  1418. %SLEEP0%
  1419. %_CDB_% tstore -b -s Users:%LCN%\%SID%\UseCol >> regress.out
  1420. %SLEEP0%
  1421. %_CDB_% tstore -b -s CurrentUser:UseCol >> regress.out
  1422. %SLEEP0%
  1423. %_CDB_% tstore -b -s CurrentUser:UseSib3 >> regress.out
  1424. %SLEEP0%
  1425. %_CDB_% tstore -b -s CurrentUser:UseSib2 >> regress.out
  1426. %SLEEP0%
  1427. %_CDB_% tstore -b -s CurrentUser:UseSib1 >> regress.out
  1428. %SLEEP0%
  1429. @if "%RemoteComputerName%"=="" goto RemoteStoreDone
  1430. set RCN=%RemoteComputerName%
  1431. %_CDB_% tsstore unregsys -lLocalMachine %RCN%\MacCol >> regress.out
  1432. %SLEEP0%
  1433. %_CDB_% tsstore unregsys -lLocalMachine %RCN%\MacSib1 >> regress.out
  1434. %SLEEP0%
  1435. %_CDB_% tsstore unregsys -lLocalMachine %RCN%\MacSib2 >> regress.out
  1436. %SLEEP0%
  1437. %_CDB_% tsstore unregsys -lServices %RCN%\Remote\SerCol >> regress.out
  1438. %SLEEP0%
  1439. %_CDB_% tsstore unregsys -lServices %RCN%\Remote\SerSib1 >> regress.out
  1440. %SLEEP0%
  1441. %_CDB_% tsstore unregsys -lServices %RCN%\Remote\SerSib2 >> regress.out
  1442. %SLEEP0%
  1443. %_CDB_% tsstore unregsys -lServices %RCN%\Remote\SerSib3 >> regress.out
  1444. %SLEEP0%
  1445. %_CDB_% tsstore unregsys -lServices %RCN%\Remote\SerSib4 >> regress.out
  1446. %SLEEP0%
  1447. %_CDB_% tsstore unregsys -lServices %RCN%\Remote\SerSib5 >> regress.out
  1448. %SLEEP0%
  1449. %_CDB_% tsstore regsys -lLocalMachine -f0x4000 -e0x80070057 %RCN%\MacCol >> regress.out
  1450. %SLEEP0%
  1451. %_CDB_% tsstore regsys -lLocalMachine -f0x2000 %RCN%\MacCol >> regress.out
  1452. %SLEEP0%
  1453. %_CDB_% tsstore regsys -lLocalMachine -f0x2000 -e80 %RCN%\MacCol >> regress.out
  1454. %SLEEP0%
  1455. %_CDB_% tsstore regsys -lLocalMachine %RCN%\MacSib1 >> regress.out
  1456. %SLEEP0%
  1457. %_CDB_% tsstore regsys -lServices %RCN%\Remote\SerCol >> regress.out
  1458. %SLEEP0%
  1459. %_CDB_% tsstore regsys -lServices %RCN%\Remote\SerSib1 >> regress.out
  1460. %SLEEP0%
  1461. %_CDB_% tsstore -lLocalMachine -P%RCN% enumsys >> regress.out
  1462. %SLEEP0%
  1463. %_CDB_% tsstore -lServices -P%RCN% enumsys >> regress.out
  1464. %SLEEP0%
  1465. %_CDB_% tsstore -lLocalMachine regphy %RCN%\MacCol MacSib1 -pOpenStoreProvider System -pOpenParameters %RCN%\MacSib1 -pOpenFlags 0x20000 -pFlags 0x1 -pPriority 1 >> regress.out
  1466. %SLEEP0%
  1467. %_CDB_% tsstore -lLocalMachine regphy %RCN%\MacCol MacSib2 -pOpenStoreProvider #9 -pOpenParameters MacSib2 -pOpenFlags 0x20000 -pFlags 0x1 -pPriority 2 >> regress.out
  1468. %SLEEP0%
  1469. %_CDB_% tsstore -lServices regphy %RCN%\Remote\SerCol SerSib1 -pOpenStoreProvider #12 -pOpenParameters %RCN%\Remote\SerSib1 -pOpenFlags 0x50000 -pFlags 0x1 -pPriority 1 >> regress.out
  1470. %SLEEP0%
  1471. %_CDB_% tsstore -lServices regphy %RCN%\Remote\SerCol SerSib2 -pOpenStoreProvider #10 -pOpenParameters SerSib2 -pOpenFlags 0x40000 -pFlags 0x1 -pPriority 2 >> regress.out
  1472. %SLEEP0%
  1473. %_CDB_% tsstore -lServices regphy %RCN%\Remote\SerCol SerSib3 -pOpenStoreProvider Physical -pOpenParameters Remote\SerSib3\SerSib3 -pOpenFlags 0x50000 -pFlags 0x1 -pPriority 3 >> regress.out
  1474. %SLEEP0%
  1475. %_CDB_% tsstore -lServices regphy %RCN%\Remote\SerCol SerSib4 -pOpenStoreProvider Physical -pOpenParameters %RCN%\Remote\SerSib4\.Default -pOpenFlags 0x50000 -pFlags 0x1 -pPriority 4 >> regress.out
  1476. %SLEEP0%
  1477. %_CDB_% tsstore -lServices regphy %RCN%\Remote\SerCol SerSib5 -pOpenStoreProvider System -pOpenParameters SerSib5 -pOpenFlags 0x40000 -pFlags 0x5 -pPriority 5 >> regress.out
  1478. %SLEEP0%
  1479. %_CDB_% tsstore -lServices regphy %RCN%\Remote\SerSib3 SerSib3 -pOpenStoreProvider System -pOpenParameters SerSib3 -pOpenFlags 0x40000 -pFlags 0x1 -pPriority 1 >> regress.out
  1480. %SLEEP0%
  1481. %_CDB_% tsstore -lLocalMachine -P%RCN% enumsys >> regress.out
  1482. %SLEEP0%
  1483. %_CDB_% tsstore -lServices -P%RCN% enumsys >> regress.out
  1484. %SLEEP0%
  1485. %_CDB_% tsstore -lLocalMachine -P%RCN% -v enumsys >> regress.out
  1486. %SLEEP0%
  1487. %_CDB_% tsstore -lServices -P%RCN% -v enumsys >> regress.out
  1488. %SLEEP0%
  1489. %_CDB_% tstore -b -s LocalMachine:%RCN%\MacCol -amspub.cer >> regress.out
  1490. %SLEEP0%
  1491. %_CDB_% tstore -b -s LocalMachine:%RCN%\MacSib1 -aphilpub.cer >> regress.out
  1492. %SLEEP0%
  1493. %_CDB_% tstore -b -s LocalMachine:PHY:%RCN%\MacCol\MacSib1 -ame.cer >> regress.out
  1494. %SLEEP0%
  1495. %_CDB_% tstore -b -s Services:PHY:%RCN%\Remote\SerCol\SerSib1 -amspub.cer >> regress.out
  1496. %SLEEP0%
  1497. %_CDB_% tstore -b -s Services:%RCN%\Remote\SerSib2 -aphilpub.cer >> regress.out
  1498. %SLEEP0%
  1499. %_CDB_% tstore -b -s Services:PHY:%RCN%\Remote\SerCol\SerSib3 -ame.cer >> regress.out
  1500. %SLEEP0%
  1501. %_CDB_% tstore -b -s Services:%RCN%\Remote\SerCol -avsgood.cer >> regress.out
  1502. %SLEEP0%
  1503. %_CDB_% tstore -b -s LocalMachine:%RCN%\MacCol >> regress.out
  1504. %SLEEP0%
  1505. %_CDB_% tstore -b -s LocalMachine:%RCN%\MacSib1 >> regress.out
  1506. %SLEEP0%
  1507. %_CDB_% tstore -b -s LocalMachine:%RCN%\MacSib2 >> regress.out
  1508. %SLEEP0%
  1509. %_CDB_% tstore -b -s Services:%RCN%\Remote\SerCol >> regress.out
  1510. %SLEEP0%
  1511. %_CDB_% tstore -b -s Services:%RCN%\Remote\SerSib1 >> regress.out
  1512. %SLEEP0%
  1513. %_CDB_% tstore -b -s Services:%RCN%\Remote\SerSib2 >> regress.out
  1514. %SLEEP0%
  1515. %_CDB_% tstore -b -s Services:%RCN%\Remote\SerSib3 >> regress.out
  1516. %SLEEP0%
  1517. %_CDB_% tstore -b -s Services:%RCN%\Remote\SerSib4 >> regress.out
  1518. %SLEEP0%
  1519. %_CDB_% tstore -b -s Services:%RCN%\Remote\SerSib5 >> regress.out
  1520. %SLEEP0%
  1521. :RemoteStoreDone
  1522. @rem ----------------------------------------------------------------
  1523. @rem AVSTORE
  1524. @rem ----------------------------------------------------------------
  1525. @if not %t%=="avstore" if not %t%=="all" goto AVStoreDone
  1526. %_CDB_% tstore -s reg:wow2 -avsgood.cer >> regress.out
  1527. %_CDB_% tstore -7 avstore.p7b -avsgood.cer >> regress.out
  1528. %_CDB_% tstore avstore.sst -avsgood.cer >> regress.out
  1529. @rem CERT_STORE_PROV_MSG with NULL paramter
  1530. %_CDB_% tsstore RegPhy -pOpenStoreProvider #1 AV_MsgNull .Default >> regress.out
  1531. %_CDB_% tstore -b -s AV_MsgNull >> regress.out
  1532. %_CDB_% tsstore UnregSys AV_MsgNull >> regress.out
  1533. @rem CERT_STORE_PROV_FILE with NULL parameter
  1534. %_CDB_% tsstore RegPhy -pOpenStoreProvider #3 AV_FileNull .Default >> regress.out
  1535. %_CDB_% tstore -b -s AV_FileNull >> regress.out
  1536. %_CDB_% tsstore UnregSys AV_FileNull >> regress.out
  1537. @rem CERT_STORE_PROV_REG with NULL parameter
  1538. %_CDB_% tsstore RegPhy -pOpenStoreProvider #4 AV_RegNull .Default >> regress.out
  1539. %_CDB_% tstore -b -s AV_RegNull >> regress.out
  1540. %_CDB_% tsstore UnregSys AV_RegNull >> regress.out
  1541. @rem CERT_STORE_PROV_PKCS7 with NULL parameter
  1542. %_CDB_% tsstore RegPhy -pOpenStoreProvider #5 AV_Pkcs7Null .Default >> regress.out
  1543. %_CDB_% tstore -b -s AV_Pkcs7Null >> regress.out
  1544. %_CDB_% tsstore UnregSys AV_Pkcs7Null >> regress.out
  1545. @rem CERT_STORE_PROV_SERIALIZED with NULL parameter
  1546. %_CDB_% tsstore RegPhy -pOpenStoreProvider #6 AV_SerializedNull .Default >> regress.out
  1547. %_CDB_% tstore -b -s AV_SerializedNull >> regress.out
  1548. %_CDB_% tsstore UnregSys AV_SerializedNull >> regress.out
  1549. @rem CERT_STORE_PROV_MEMORY is allowed
  1550. %_CDB_% tsstore RegPhy -pOpenStoreProvider #2 Good_Memory .Default >> regress.out
  1551. %_CDB_% tstore -b -s Good_Memory >> regress.out
  1552. %_CDB_% tsstore UnregSys Good_Memory >> regress.out
  1553. @rem CERT_STORE_PROV_COLLECTION is allowed
  1554. %_CDB_% tsstore RegPhy -pOpenStoreProvider #11 Good_Collection .Default >> regress.out
  1555. %_CDB_% tstore -b -s Good_Collection >> regress.out
  1556. %_CDB_% tsstore UnregSys Good_Collection >> regress.out
  1557. @rem Filename (Serialized store) is allowed
  1558. %_CDB_% tsstore RegPhy -pOpenStoreProvider File -pOpenParameters avstore.sst Good_Filename .Default >> regress.out
  1559. %_CDB_% tstore -b -s Good_Filename >> regress.out
  1560. @rem Filename (PKCS7) is allowed
  1561. %_CDB_% tsstore RegPhy -pOpenStoreProvider File -pOpenParameters avstore.p7b Good_Filename .Default >> regress.out
  1562. %_CDB_% tstore -b -s Good_Filename >> regress.out
  1563. %_CDB_% tsstore UnregSys Good_Filename >> regress.out
  1564. @rem SmartCard not allowed
  1565. %_CDB_% tsstore RegPhy -pOpenStoreProvider SmartCard AV_SmartCard .Default >> regress.out
  1566. %_CDB_% tstore -b -s AV_SmartCard >> regress.out
  1567. %_CDB_% tsstore UnregSys AV_SmartCard >> regress.out
  1568. @rem following flags not allowed:
  1569. @rem #define CERT_STORE_NO_CRYPT_RELEASE_FLAG 0x00000001
  1570. @rem #define CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG 0x00000004
  1571. @rem #define CERT_STORE_DELETE_FLAG 0x00000010
  1572. @rem #define CERT_STORE_SHARE_STORE_FLAG 0x00000040
  1573. @rem #define CERT_STORE_SHARE_CONTEXT_FLAG 0x00000080
  1574. @rem #define CERT_STORE_MANIFOLD_FLAG 0x00000100
  1575. @rem #define CERT_STORE_BACKUP_RESTORE_FLAG 0x00000800
  1576. %_CDB_% tsstore RegPhy -pOpenStoreProvider Memory -pOpenFlags 0x00001 Bad_OpenFlags .Default >> regress.out
  1577. %_CDB_% tstore -b -s Bad_OpenFlags >> regress.out
  1578. %_CDB_% tsstore RegPhy -pOpenStoreProvider Memory -pOpenFlags 0x00010 Bad_OpenFlags .Default >> regress.out
  1579. %_CDB_% tstore -b -s Bad_OpenFlags >> regress.out
  1580. %_CDB_% tsstore RegPhy -pOpenStoreProvider Memory -pOpenFlags 0x000c0 Bad_OpenFlags .Default >> regress.out
  1581. %_CDB_% tstore -b -s Bad_OpenFlags >> regress.out
  1582. %_CDB_% tsstore UnregSys Bad_OpenFlags >> regress.out
  1583. @rem following flags are allowed:
  1584. @rem #define CERT_STORE_SET_LOCALIZED_NAME_FLAG 0x00000002
  1585. @rem #define CERT_STORE_UNSAFE_PHYSICAL_FLAG 0x00000020
  1586. @rem #define CERT_STORE_ENUM_ARCHIVED_FLAG 0x00000200
  1587. @rem #define CERT_STORE_UPDATE_KEYID_FLAG 0x00000400
  1588. @rem #define CERT_STORE_READONLY_FLAG 0x00008000
  1589. @rem #define CERT_STORE_OPEN_EXISTING_FLAG 0x00004000
  1590. @rem #define CERT_STORE_CREATE_NEW_FLAG 0x00002000
  1591. @rem #define CERT_STORE_MAXIMUM_ALLOWED_FLAG 0x00001000
  1592. %_CDB_% tsstore RegPhy -pOpenStoreProvider Memory -pOpenFlags 0x0000F622 Good_OpenFlags .Default >> regress.out
  1593. %_CDB_% tstore -b -s Good_OpenFlags >> regress.out
  1594. %_CDB_% tsstore UnregSys Good_OpenFlags >> regress.out
  1595. @rem set the relocate parameter for SystemRegistry
  1596. %_CDB_% tsstore RegPhy -pOpenStoreProvider SystemRegistry -pOpenParameters wow2 -pOpenFlags 0x80010000 AV_SystemRegistryRelocate .Default >> regress.out
  1597. %_CDB_% tstore -b -s AV_SystemRegistryRelocate >> regress.out
  1598. @rem remove the relocate flag
  1599. %_CDB_% tsstore RegPhy -pOpenStoreProvider SystemRegistry -pOpenParameters wow2 -pOpenFlags 0x00010000 AV_SystemRegistryRelocate .Default >> regress.out
  1600. %_CDB_% tstore -b -s AV_SystemRegistryRelocate >> regress.out
  1601. %_CDB_% tsstore UnregSys AV_SystemRegistryRelocate >> regress.out
  1602. @rem set the relocate parameter for SystemRegistryA
  1603. %_CDB_% tsstore RegPhy -pOpenStoreProvider #12 -pOpenParameters wow2 -pOpenFlags 0x80010000 AV_SystemRegistryRelocate .Default >> regress.out
  1604. %_CDB_% tstore -b -s AV_SystemRegistryRelocate >> regress.out
  1605. @rem remove the relocate flag
  1606. %_CDB_% tsstore RegPhy -pOpenStoreProvider #12 -pOpenParameters wow2 -pOpenFlags 0x00010000 AV_SystemRegistryRelocate .Default >> regress.out
  1607. %_CDB_% tstore -b -s AV_SystemRegistryRelocate >> regress.out
  1608. %_CDB_% tsstore UnregSys AV_SystemRegistryRelocate >> regress.out
  1609. @rem set the relocate parameter for System
  1610. %_CDB_% tsstore RegPhy -pOpenStoreProvider System -pOpenParameters wow2 -pOpenFlags 0x80010000 AV_SystemRelocate .Default >> regress.out
  1611. %_CDB_% tstore -b -s AV_SystemRelocate >> regress.out
  1612. @rem remove the relocate flag
  1613. %_CDB_% tsstore RegPhy -pOpenStoreProvider System -pOpenParameters wow2 -pOpenFlags 0x00010000 AV_SystemRelocate .Default >> regress.out
  1614. %_CDB_% tstore -b -s AV_SystemRelocate >> regress.out
  1615. %_CDB_% tsstore UnregSys AV_SystemRelocate >> regress.out
  1616. @rem set the relocate parameter for SystemA
  1617. %_CDB_% tsstore RegPhy -pOpenStoreProvider #9 -pOpenParameters wow2 -pOpenFlags 0x80010000 AV_SystemRelocate .Default >> regress.out
  1618. %_CDB_% tstore -b -s AV_SystemRelocate >> regress.out
  1619. @rem remove the relocate flag
  1620. %_CDB_% tsstore RegPhy -pOpenStoreProvider #9 -pOpenParameters wow2 -pOpenFlags 0x00010000 AV_SystemRelocate .Default >> regress.out
  1621. %_CDB_% tstore -b -s AV_SystemRelocate >> regress.out
  1622. %_CDB_% tsstore UnregSys AV_SystemRelocate >> regress.out
  1623. @rem set the relocate parameter for Physical
  1624. %_CDB_% tsstore RegPhy -pOpenStoreProvider Physical -pOpenParameters wow2\.Default -pOpenFlags 0x80010000 AV_PhysicalRelocate .Default >> regress.out
  1625. %_CDB_% tstore -b -s AV_PhysicalRelocate >> regress.out
  1626. @rem remove the relocate flag
  1627. %_CDB_% tsstore RegPhy -pOpenStoreProvider Physical -pOpenParameters wow2\.Default -pOpenFlags 0x00010000 AV_PhysicalRelocate .Default >> regress.out
  1628. %_CDB_% tstore -b -s AV_PhysicalRelocate >> regress.out
  1629. %_CDB_% tsstore UnregSys AV_PhysicalRelocate >> regress.out
  1630. @rem #define CERT_LDAP_STORE_OPENED_FLAG 0x40000
  1631. %_CDB_% tsstore RegPhy -pOpenStoreProvider Ldap -pOpenParameters "ldap://ntdev.microsoft.com/CN=Public Key Services,CN=Services,CN=Configuration,DC=ntdev,DC=microsoft,DC=com??sub" -pOpenFlags 0x48000 AV_LdapOpened .Default >> regress.out
  1632. %_CDB_% tstore -b -s AV_LdapOpened >> regress.out
  1633. %_CDB_% tsstore RegPhy -pOpenStoreProvider Ldap -pOpenFlags 0x48000 AV_LdapOpened .Default >> regress.out
  1634. %_CDB_% tstore -b -s AV_LdapOpened >> regress.out
  1635. @rem without OPENED should be OK
  1636. %_CDB_% tsstore RegPhy -pOpenStoreProvider Ldap -pOpenParameters "ldap://ntdev.microsoft.com/CN=Public Key Services,CN=Services,CN=Configuration,DC=ntdev,DC=microsoft,DC=com??sub" -pOpenFlags 0x8000 AV_LdapOpened .Default >> regress.out
  1637. %_CDB_% tstore -b -s AV_LdapOpened >> regress.out
  1638. %_CDB_% tsstore UnregSys AV_LdapOpened >> regress.out
  1639. :AVStoreDone
  1640. @rem ----------------------------------------------------------------
  1641. @rem CTL
  1642. @rem ----------------------------------------------------------------
  1643. @if not %t%=="ctl" if not %t%=="all" goto CtlDone
  1644. @rem %_CDB_% regsvr32 -s msctl.dll
  1645. @rem find certs according to EnhancedKeyUsage extension and property
  1646. @rem dwFindFlag definitions
  1647. @rem CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG 0x1
  1648. @rem CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG 0x2
  1649. @rem CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG 0x4
  1650. @rem CERT_FIND_NO_ENHKEY_USAGE_FLAG 0x8
  1651. @rem CERT_FIND_OR_ENHKEY_USAGE_FLAG 0x10
  1652. @rem CERT_FIND_VALID_ENHKEY_USAGE_FLAG 0x20
  1653. %_CDB_% tfindcer %store% -U >> regress.out
  1654. %_CDB_% tfindcer %store% -U -F2 >> regress.out
  1655. %_CDB_% tfindcer %store% -U -F4 >> regress.out
  1656. %_CDB_% tfindcer %store% -U -F8 >> regress.out
  1657. @rem none should be found for the following
  1658. %_CDB_% tfindcer %store% -U -F6 >> regress.out
  1659. %_CDB_% tfindcer %store% -U1.2.3.0 -U1.2.3.1 -U1.2.3.2 -U1.2.3.2.1 >> regress.out
  1660. @rem none should be found for the following
  1661. %_CDB_% tfindcer %store% -U1.2.3.0.0 >> regress.out
  1662. %_CDB_% tfindcer %store% -U1.2.3.0 >> regress.out
  1663. %_CDB_% tfindcer %store% -U1.2.3.0 -F1 >> regress.out
  1664. %_CDB_% tfindcer %store% -U1.2.3.1 >> regress.out
  1665. %_CDB_% tfindcer %store% -U1.2.3.2 -U1.2.3.2.1 >> regress.out
  1666. %_CDB_% tfindcer %store% -U1.2.3.2 >> regress.out
  1667. %_CDB_% tfindcer %store% -U1.2.3.2.1 >> regress.out
  1668. @rem only all ext
  1669. %_CDB_% tfindcer %store% -U1.2.3.2 -U1.2.3.2.1 -U1.2.3.1 -b >> regress.out
  1670. @rem "OR" of all usages
  1671. %_CDB_% tfindcer %store% -U1.2.3.2 -U1.2.3.2.1 -U1.2.3.1 -F0x10 -b >> regress.out
  1672. %_CDB_% tfindcer %store% -U1.2.8 -U1.2.3.2 -U1.2.3.2.1 -U1.2.3.1 -U1.2.10 -F0x10 -b >> regress.out
  1673. @rem none should be found for following
  1674. %_CDB_% tfindcer %store% -U1.2.8 -U1.2.10 -F0x10 -b >> regress.out
  1675. if exist tmp.store del tmp.store
  1676. copy %store% tmp.store >> regress.out
  1677. %_CDB_% tfindcer tmp.store -U1.2 -F0x8 -d -q >> regress.out
  1678. %_CDB_% tfindcer tmp.store -U1.2.3.2 -U1.2.3.2.1 -F0x20 -b >> regress.out
  1679. %_CDB_% tfindcer tmp.store -U1.2.3.2.1 -U1.2.3.2 -F0x20 -b >> regress.out
  1680. %_CDB_% tfindcer tmp.store -U1.2.3.2.1 -U1.2.3.2.1 -U1.2.3.2 -U1.2.3.2 -U1.2.3.2.1 -F0x20 -b >> regress.out
  1681. @rem "OR" of all usages
  1682. %_CDB_% tfindcer tmp.store -U1.2.3.2 -U1.2.3.2.1 -F0x30 -b >> regress.out
  1683. %_CDB_% tfindcer tmp.store -U1.2.8 -U1.2.3.2 -U1.2.3.2.1 -U1.2.3.1 -U1.2.10 -F0x30 -b >> regress.out
  1684. @rem none should be found for following 3 tests
  1685. %_CDB_% tfindcer tmp.store -U1.2.3.2 -U1.2.3.2.1 -U1.2.3.1 -F0x20 -b >> regress.out
  1686. %_CDB_% tfindcer tmp.store -U1.2.8 -U1.2.10 -F0x30 -b >> regress.out
  1687. %_CDB_% tfindcer tmp.store -U1.2.3.2 -U1.2.10 -F0x20 -b >> regress.out
  1688. @rem get signer and subject certs
  1689. %_CDB_% tfindcer %store% -S -q -aCtl1 -pctl1.cer >> regress.out
  1690. %_CDB_% tfindcer %store% -S -q -aCtl2 -pctl2.cer >> regress.out
  1691. %_CDB_% tfindcer %store% -S -q -a"all ext" -pallext.cer >> regress.out
  1692. %_CDB_% tfindcer %store% -S -q -aMSPub -pmspub.cer >> regress.out
  1693. %_CDB_% tfindcer %store% -S -q -aPhilPub -pphilpub.cer >> regress.out
  1694. %_CDB_% tstore -T %store% >> regress.out
  1695. %_CDB_% tstore -T -c %store% >> regress.out
  1696. %_CDB_% tstore -T -v %store% >> regress.out
  1697. @rem find CTLs according to Usage, ListIdentifier
  1698. %_CDB_% tfindctl %store% -U1.2.3.0 >> regress.out
  1699. %_CDB_% tfindctl %store% -U1.2.3.0 -L -I >> regress.out
  1700. %_CDB_% tfindctl %store% -U1.2.3.0 -fTimeValid >> regress.out
  1701. @rem none should be found for the following
  1702. %_CDB_% tfindctl %store% -U1.2.3.0 -fTimeInvalid >> regress.out
  1703. @rem none should be found for the following
  1704. %_CDB_% tfindctl %store% -U1.2.3.0 -Ictl1.cer >> regress.out
  1705. %_CDB_% tfindctl %store% -Ictl1.cer -b >> regress.out
  1706. %_CDB_% tfindctl %store% -U1.2.3.2.1 -U1.2.3.2 -b >> regress.out
  1707. %_CDB_% tfindctl %store% -LCtl2 -b >> regress.out
  1708. %_CDB_% tfindctl %store% -U1.2.3.2 -U1.2.3.2.1 -LCtl2 -Ictl2.cer -b >> regress.out
  1709. %_CDB_% tfindctl %store% -U1.2.3.2.1 -U1.2.3.2 -b -fSameUsage >> regress.out
  1710. @rem none should be found for the following 2 finds
  1711. %_CDB_% tfindctl %store% -U1.2.3.2 -b -fSameUsage >> regress.out
  1712. %_CDB_% tfindctl %store% -U1.2.3.2.1 -b -fSameUsage >> regress.out
  1713. @rem find Subjects
  1714. %_CDB_% tfindctl %store% -Smspub.cer -fTimeValid >> regress.out
  1715. %_CDB_% tfindctl %store% -Smspub.cer -fTimeValid -A >> regress.out
  1716. %_CDB_% tfindctl %store% -Sphilpub.cer -fTimeValid >> regress.out
  1717. %_CDB_% tfindctl %store% -Sallext.cer -fTimeValid >> regress.out
  1718. %_CDB_% tfindctl %store% -U1.2.3.2 -U1.2.3.2.1 -LCtl2 -Ictl2.cer -Sallext.cer -fTimeValid -fSameUsage >> regress.out
  1719. %_CDB_% tfindctl %store% -U1.2.3.2 -U1.2.3.2.1 -LCtl2 -Ictl2.cer -Sallext.cer -fTimeValid -fSameUsage -A >> regress.out
  1720. @rem none should be found for the following
  1721. %_CDB_% tfindctl %store% -Sctl1.cer -fTimeValid >> regress.out
  1722. @rem get store without any time invalid or http CTLs
  1723. if exist ctl.store del ctl.store >> regress.out
  1724. %_CDB_% tcopycer %store% ctl.store -A >> regress.out
  1725. %_CDB_% tfindctl ctl.store -d -fTimeInvalid -q >> regress.out
  1726. %_CDB_% tfindctl ctl.store -d -LHttp2 -q >> regress.out
  1727. %_CDB_% tstore -b -T ctl.store >> regress.out
  1728. @rem clean out Trust store
  1729. %_CDB_% tfindctl -s Trust -d -U1.2.3.0 -q >> regress.out
  1730. %_CDB_% tfindctl -s Trust -d -U1.2.3.1 -q >> regress.out
  1731. %_CDB_% tfindctl -s Trust -d -U1.2.3.2 -q >> regress.out
  1732. %_CDB_% tstore -b -T -s Trust >> regress.out
  1733. if exist file1.ctl del file1.ctl >> regress.out
  1734. if exist file2.ctl del file2.ctl >> regress.out
  1735. @rem expected error definitions
  1736. @rem CRYPT_E_NO_VERIFY_USAGE_DLL 0x80092027L
  1737. @rem CRYPT_E_NO_VERIFY_USAGE_CHECK 0x80092028L
  1738. @rem CRYPT_E_VERIFY_USAGE_OFFLINE 0x80092029L
  1739. @rem CRYPT_E_NOT_IN_CTL 0x8009202AL
  1740. @rem CRYPT_E_NO_TRUSTED_SIGNER 0x8009202BL
  1741. @rem flag definitions
  1742. @rem CERT_VERIFY_INHIBIT_CTL_UPDATE_FLAG 0x1
  1743. @rem CERT_VERIFY_TRUSTED_SIGNERS_FLAG 0x2
  1744. @rem CERT_VERIFY_NO_TIME_CHECK_FLAG 0x4
  1745. @rem CERT_VERIFY_ALLOW_MORE_USAGE_FLAG 0x8
  1746. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 philpub.cer -cctl.store >> regress.out
  1747. %_CDB_% tctlfunc -U1.2.3.2.1 -U1.2.3.2 philpub.cer -A -cctl.store >> regress.out
  1748. %_CDB_% tctlfunc -U1.2.3.2 philpub.cer -A -cctl.store -e0x80092028 >> regress.out
  1749. %_CDB_% tctlfunc -U1.2.3.2 philpub.cer -cctl.store -f8 >> regress.out
  1750. %_CDB_% tctlfunc -U1.2.3.2.1 philpub.cer -A -cctl.store -f8 >> regress.out
  1751. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 -LCtl2 philpub.cer -cctl.store >> regress.out
  1752. %_CDB_% tctlfunc -U1.2.3.2.8 philpub.cer -cctl.store -e0x80092028 >> regress.out
  1753. %_CDB_% tctlfunc -U1.2.3.2.8 philpub.cer -cctl.store -cctl.store -c%store% -e0x80092028 >> regress.out
  1754. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 mspub.cer -cctl.store -e0x8009202a >> regress.out
  1755. %_CDB_% tctlfunc -U1.2.3.1 -cctl.store allext.cer >> regress.out
  1756. %_CDB_% tctlfunc -U1.2.3.0 -cctl.store allext.cer -e0x8009202b >> regress.out
  1757. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 -LCtl2 -cctl.store -sctl.store -f2 allext.cer >> regress.out
  1758. %_CDB_% tstore ctl.store -dAll >> regress.out
  1759. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 -LCtl2 -cctl.store -sctl.store -sctl.store -f2 -e0x8009202b allext.cer >> regress.out
  1760. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 -LCtl2 -cctl.store -cctl.store -sctl.store -s%store% -f2 allext.cer >> regress.out
  1761. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 -LCtl2 -cctl.store -sctl.store -sctl.store -s%store% allext.cer >> regress.out
  1762. @rem get store without any time valid or http CTLs
  1763. if exist ctl.store del ctl.store >> regress.out
  1764. %_CDB_% tcopycer %store% ctl.store -A >> regress.out
  1765. %_CDB_% tfindctl ctl.store -d -fTimeValid -q >> regress.out
  1766. %_CDB_% tfindctl ctl.store -d -LHttp2 -q >> regress.out
  1767. %_CDB_% tstore -b -T ctl.store >> regress.out
  1768. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 philpub.cer -cctl.store -e0x80092029 >> regress.out
  1769. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 philpub.cer -cctl.store -f4 >> regress.out
  1770. %_CDB_% tfindctl %store% -U1.2.3.2 -LCtl2 -fTimeInvalid -pfile2.ctl -b >> regress.out
  1771. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 philpub.cer -cctl.store -e0x80092029 >> regress.out
  1772. %_CDB_% tfindctl %store% -U1.2.3.2 -LCtl2 -fTimeValid -pfile1.ctl -b >> regress.out
  1773. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 philpub.cer -cctl.store >> regress.out
  1774. @rem only look in default CTL stores (Trust)
  1775. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 philpub.cer allext.cer -e0x80092028 >> regress.out
  1776. %_CDB_% tstore -T -afile2.ctl -s Trust -b >> regress.out
  1777. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 philpub.cer allext.cer philpub.cer -b >> regress.out
  1778. @rem its property should not have been updated
  1779. %_CDB_% tstore -T -s Trust -v >> regress.out
  1780. %_CDB_% tstore -s TestTrust -dAll >> regress.out
  1781. %_CDB_% tstore -R -s TestTrust -dAll >> regress.out
  1782. %_CDB_% tstore -T -s TestTrust -dAll >> regress.out
  1783. %_CDB_% tctlfunc -CTestTrust -U1.2.3.2 -U1.2.3.2.1 philpub.cer allext.cer -e0x80092028 >> regress.out
  1784. @rem update TestTrust with only time invalid CTLs.
  1785. %_CDB_% tcopycer %store% -s TestTrust -A >> regress.out
  1786. %_CDB_% tfindctl -s TestTrust -d -fTimeValid -q >> regress.out
  1787. %_CDB_% tfindctl -s TestTrust -d -LHttp2 -q >> regress.out
  1788. %_CDB_% tstore -b -T -s TestTrust >> regress.out
  1789. %_CDB_% tctlfunc -CTestTrust -U1.2.3.2 -U1.2.3.2.1 philpub.cer allext.cer -f1 -b >> regress.out
  1790. %_CDB_% tstore -T -s TestTrust -v >> regress.out
  1791. %_CDB_% tctlfunc -CTestTrust -U1.2.3.2 -U1.2.3.2.1 philpub.cer allext.cer -b >> regress.out
  1792. @rem its property should have also been updated
  1793. %_CDB_% tstore -T -s TestTrust -v >> regress.out
  1794. @rem only do the following if network tests are enabled
  1795. @if "%n%"=="" goto CtlDone
  1796. @rem
  1797. @rem HTTP tests
  1798. @rem clean out Trust store
  1799. %_CDB_% tfindctl -s Trust -d -U1.2.3.0 -q >> regress.out
  1800. %_CDB_% tfindctl -s Trust -d -U1.2.3.1 -q >> regress.out
  1801. %_CDB_% tfindctl -s Trust -d -U1.2.3.2 -q >> regress.out
  1802. %_CDB_% tstore -b -T -s Trust >> regress.out
  1803. if exist file1.ctl del file1.ctl >> regress.out
  1804. if exist file2.ctl del file2.ctl >> regress.out
  1805. if exist \\timestamp\ctltest\http1.ctl del \\timestamp\ctltest\http1.ctl >> regress.out
  1806. if exist \\timestamp\ctltest\http2.ctl del \\timestamp\ctltest\http2.ctl >> regress.out
  1807. @rem flush URL caches
  1808. %_CDB_% turlcache -d http://timestamp/ctltest/http1.ctl >> regress.out
  1809. %_CDB_% turlcache -d http://timestamp/ctltest/http2.ctl >> regress.out
  1810. @rem get store with only time invalid http ctls
  1811. if exist ctl.store del ctl.store >> regress.out
  1812. %_CDB_% tcopycer %store% ctl.store -A >> regress.out
  1813. %_CDB_% tfindctl ctl.store -d -fTimeValid -q >> regress.out
  1814. %_CDB_% tfindctl ctl.store -d -LCtl1 -q >> regress.out
  1815. %_CDB_% tfindctl ctl.store -d -LCtl2 -q >> regress.out
  1816. %_CDB_% tstore -b -T ctl.store >> regress.out
  1817. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 philpub.cer -cctl.store -e0x80092029 >> regress.out
  1818. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 philpub.cer -cctl.store -f4 >> regress.out
  1819. %_CDB_% tfindctl %store% -U1.2.3.2 -U1.2.3.2.1 -LHttp2 -fTimeInvalid -p\\timestamp\ctltest\http1.ctl -b >> regress.out
  1820. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 philpub.cer -cctl.store -e0x80092029 >> regress.out
  1821. %_CDB_% tfindctl %store% -U1.2.3.2 -U1.2.3.2.1 -LHttp2 -fTimeValid -p\\timestamp\ctltest\http2.ctl -b >> regress.out
  1822. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 philpub.cer -cctl.store >> regress.out
  1823. @rem only look in default CTL stores (Trust)
  1824. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 philpub.cer allext.cer -e0x80092028 >> regress.out
  1825. %_CDB_% tstore -T -a\\timestamp\ctltest\http2.ctl -s Trust -b >> regress.out
  1826. %_CDB_% tctlfunc -U1.2.3.2 -U1.2.3.2.1 philpub.cer allext.cer philpub.cer -b >> regress.out
  1827. %_CDB_% tstore -T -s Trust -v >> regress.out
  1828. %_CDB_% tstore -s TestTrust -dAll >> regress.out
  1829. %_CDB_% tstore -R -s TestTrust -dAll >> regress.out
  1830. %_CDB_% tstore -T -s TestTrust -dAll >> regress.out
  1831. %_CDB_% tctlfunc -CTestTrust -U1.2.3.2 -U1.2.3.2.1 philpub.cer allext.cer -e0x80092028 >> regress.out
  1832. @rem update TestTrust with only time invalid http ctls
  1833. %_CDB_% tcopycer %store% -s TestTrust -A >> regress.out
  1834. %_CDB_% tfindctl -s TestTrust -d -fTimeValid -q >> regress.out
  1835. %_CDB_% tfindctl -s TestTrust -d -LCtl2 -q >> regress.out
  1836. %_CDB_% tfindctl -s TestTrust -d -U1.2.3.1 -q >> regress.out
  1837. %_CDB_% tstore -b -T -s TestTrust >> regress.out
  1838. %_CDB_% tctlfunc -CTestTrust -U1.2.3.2 -U1.2.3.2.1 philpub.cer allext.cer -f1 -b >> regress.out
  1839. @rem TestTrust still has time invalid ctl
  1840. %_CDB_% tstore -T -s TestTrust -b >> regress.out
  1841. %_CDB_% tctlfunc -CTestTrust -U1.2.3.2 -U1.2.3.2.1 philpub.cer allext.cer -b >> regress.out
  1842. %_CDB_% tstore -T -s TestTrust -b >> regress.out
  1843. :CtlDone
  1844. @rem ----------------------------------------------------------------
  1845. @rem SPC
  1846. @rem ----------------------------------------------------------------
  1847. @if not %t%=="spc" if not %t%=="all" goto SpcDone
  1848. @copy torgpe.exe testpe.exe >nul
  1849. @copy torg.cla animator.class >nul
  1850. @copy torg2.cab test2.cab >nul
  1851. @del test.spc >nul
  1852. @del test.cer >nul
  1853. %_CDB_% makecert -sv test.pvk -n "CN=regress;C=US;O=Microsoft;T=Mr Regress" -l "http://www.microsoft.com" test.cer >> regress.out
  1854. %_CDB_% cert2spc test.cer rooto.cer test.spc >> regress.out
  1855. @rem the following reports an erroneous memory leak for a redir allocation
  1856. @rem %_CDB_% signcode -spc test.spc -v test.pvk -n "Regress Program" testpe.exe >> regress.out
  1857. @rem %_CDB_% gentest2 -t -u testpe.exe >> regress.out
  1858. %_CDB_% pesigmgr -l testpe.exe >> regress.out
  1859. :SpcDone
  1860. @rem ----------------------------------------------------------------
  1861. @rem DIGSIG (digsig.dll wouldn't be included in NT 5.0)
  1862. @rem ----------------------------------------------------------------
  1863. @rem @if not %t%=="digsig" if not %t%=="all" goto DigsigDone
  1864. @rem %_CDB_% digtest -v >> regress.out
  1865. @rem :DigsigDone
  1866. @rem ----------------------------------------------------------------
  1867. @rem TIMESTAMP
  1868. @rem ----------------------------------------------------------------
  1869. @if not %t%=="timestamp" if not %t%=="all" goto TimeStampDone
  1870. %_CDB_% tsca xxx timestamp >> regress.out
  1871. :TimeStampDone
  1872. @rem ----------------------------------------------------------------
  1873. @rem XENROLL
  1874. @rem ----------------------------------------------------------------
  1875. @if not %t%=="xenroll" if not %t%=="all" goto XenrollDone
  1876. %_CDB_% txenrol >> regress.out
  1877. :XenrollDone
  1878. @rem ----------------------------------------------------------------
  1879. @rem FINDCLT
  1880. @rem ----------------------------------------------------------------
  1881. @if not %t%=="findclt" if not %t%=="all" goto FindCltDone
  1882. @rem add CrossCert DP property
  1883. %_CDB_% tfindcer -s lm:ca "root agency" -x60 -xfile://abc.cer -xfile://vsgood.cer -xfile://%store% -v >> regress.out
  1884. @rem update my with TestRoot certificate from default store
  1885. tfindcer -s my -S -aTestRoot -d >> regress.out
  1886. tcopycer %store% -s my -aTestRoot >> regress.out
  1887. @rem update "my" store with "my" certificates from default store
  1888. tfindcer -s my -S -aTestSigner -d >> regress.out
  1889. tfindcer -s my -S -aTestRecipient -d >> regress.out
  1890. tfindcer -s my -S -ame -d >> regress.out
  1891. tcopycer %store% -s my -aTestSigner >> regress.out
  1892. tcopycer %store% -s my -aTestRecipient >> regress.out
  1893. tcopycer %store% -s my -ame >> regress.out
  1894. @rem save root cert to use in tfindclt
  1895. tfindcer %store% -S -aTestRoot -ptemp.cert >> regress.out
  1896. @rem create all chains having the testroot as an issuer
  1897. @rem tests FindClientAuthCertsByIssuer API
  1898. %_CDB_% tfindclt temp.cert >> regress.out
  1899. %_CDB_% tfindclt temp.cert sign >> regress.out
  1900. %_CDB_% tfindclt temp.cert xchg >> regress.out
  1901. @rem %_CDB_% tfindclt >> regress.out
  1902. @rem %_CDB_% tfindclt "" sign >> regress.out
  1903. @rem %_CDB_% tfindclt "" xchg >> regress.out
  1904. tfindcer %store% -S -Aroot -proot.cer >> regress.out
  1905. tfindcer %store% -S -ame -axchg -pme.cer >> regress.out
  1906. %_CDB_% tfindclt -cmy temp.cert -b >> regress.out
  1907. @rem add a time invalid CTL having a NextUpdate time and location
  1908. %_CDB_% tfindctl %store% -LUpdateCtl1 -fTimeInvalid -ptestupdate1.ctl -q >> regress.out
  1909. %_CDB_% tfindctl -LUpdateCtl1 -s reg:trust -d -q >> regress.out
  1910. %_CDB_% tstore -s reg:trust -T -atestupdate1.ctl >> regress.out
  1911. %_CDB_% tfindclt -cmy temp.cert -b >> regress.out
  1912. @rem Update the CTL's URL
  1913. %_CDB_% tfindctl %store% -LUpdateCtl1 -fTimeValid -ptestupdate1.ctl >> regress.out
  1914. %_CDB_% tfindclt -cmy temp.cert -b >> regress.out
  1915. %_CDB_% tfindclt -cmy -CompareKey -CacheOnly -ComplexChain temp.cert -b >> regress.out
  1916. %_CDB_% tfindclt -cmy temp.cert sign -b >> regress.out
  1917. %_CDB_% tfindclt -cmy temp.cert xchg -b >> regress.out
  1918. %_CDB_% tfindclt -C%store% -Stemp.cert -b >> regress.out
  1919. %_CDB_% tfindclt -C%store% -Stemp.cert -u1.2.3.1 -v "" sign >> regress.out
  1920. %_CDB_% tfindclt -C%store% -Stemp.cert -u1.2.3.8 -v "" sign >> regress.out
  1921. %_CDB_% tfindclt -C%store% -Sme.cer -Stemp.cert -b >> regress.out
  1922. %_CDB_% tfindclt -C%store% -Sme.cer -Stemp.cert -u1.2.3.1 -b >> regress.out
  1923. %_CDB_% tfindclt -C%store% -Sme.cer -Stemp.cert -u1.2.3.1 -b "" sign >> regress.out
  1924. %_CDB_% tfindclt -C%store% -Sme.cer -Stemp.cert -u1.2.3.1 -b "" xchg >> regress.out
  1925. %_CDB_% tfindclt -C%store% -CompareKey -Sme.cer -Stemp.cert -u1.2.3.2 -b >> regress.out
  1926. @rem remove CrossCert DP property
  1927. %_CDB_% tfindcer -s lm:ca "root agency" -xDelete -v >> regress.out
  1928. @rem remove the Ctl with a NextUpdate time and location
  1929. %_CDB_% tfindctl -LUpdateCtl1 -s reg:trust -d -q >> regress.out
  1930. @rem should find the lower quality chain matching root2cert for the
  1931. @rem Microsoft publisher cert
  1932. %_CDB_% tfindcer nokeyclt.sst Root2Cert -q -pnokeyclt.cer >> regress.out
  1933. %_CDB_% tfindclt -Cnokeyclt.sst -NoKey nokeyclt.cer >> regress.out
  1934. @rem del temp.cert >nul
  1935. :FindCltDone
  1936. @rem ----------------------------------------------------------------
  1937. @rem PVKHLPR
  1938. @rem ----------------------------------------------------------------
  1939. @if not %t%=="pvkhlpr" if not %t%=="all" goto PvkHlprDone
  1940. %_CDB_% tpvkload test.pvk -cregress_container sign >> regress.out
  1941. %_CDB_% tpvkload test.pvk -F -E -cregress_container sign >> regress.out
  1942. %_CDB_% tpvkdel -d -cregress_container >> regress.out
  1943. %_CDB_% tpvkload test.pvk -m -E -cregress_container sign >> regress.out
  1944. %_CDB_% tpvkload test.pvk -m -F -cregress_container sign >> regress.out
  1945. %_CDB_% tpvkdel -d -cregress_container >> regress.out
  1946. :PvkHlprDone
  1947. @rem ----------------------------------------------------------------
  1948. @rem OIDFUNC
  1949. @rem ----------------------------------------------------------------
  1950. @if not %t%=="oidfunc" if not %t%=="all" goto OIDFuncDone
  1951. %_CDB_% regsvr32 -s setx509.dll
  1952. %_CDB_% regsvr32 -s setx509.dll
  1953. %_CDB_% toidfunc enum >> regress.out
  1954. %_CDB_% toidfunc enuminfo >> regress.out
  1955. %_CDB_% toidfunc enuminfo -G5 >> regress.out
  1956. %_CDB_% toidfunc enuminfo -G6 >> regress.out
  1957. %_CDB_% tfindcer %store% -v -S "all ext" >> regress.out
  1958. %_CDB_% regsvr32 -u -s setx509.dll
  1959. %_CDB_% toidfunc enum >> regress.out
  1960. %_CDB_% toidfunc register -o2.99999.1 -fCryptDllEncodeObject -e1 -dsetx509.dll -FSetAsn1AccountAliasEncode >> regress.out
  1961. %_CDB_% toidfunc register -o2.99999.1 -fCryptDllDecodeObject -e1 -dsetx509.dll -FSetAsn1AccountAliasDecode >> regress.out
  1962. %_CDB_% toidfunc register -o2.99999.2 -fCryptDllEncodeObject -e1 -dsetx509.dll -FSetAsn1HashedRootKeyEncode >> regress.out
  1963. %_CDB_% toidfunc register -o2.99999.2 -fCryptDllDecodeObject -e1 -dsetx509.dll -FSetAsn1HashedRootKeyDecode >> regress.out
  1964. %_CDB_% toidfunc register -o2.99999.3 -fCryptDllEncodeObject -e1 -dsetx509.dll -FSetAsn1CertificateTypeEncode >> regress.out
  1965. %_CDB_% toidfunc register -o2.99999.3 -fCryptDllDecodeObject -e1 -dsetx509.dll -FSetAsn1CertificateTypeDecode >> regress.out
  1966. %_CDB_% toidfunc register -o2.99999.4 -fCryptDllEncodeObject -e1 -dsetx509.dll -FSetAsn1MerchantDataEncode >> regress.out
  1967. %_CDB_% toidfunc register -o2.99999.4 -fCryptDllDecodeObject -e1 -dsetx509.dll -FSetAsn1MerchantDataDecode >> regress.out
  1968. %_CDB_% toidfunc register -o2.99999.4 -fCryptDllEncodeObject -e1 -vREG_DWORD WordValue 0x12345678 >> regress.out
  1969. %_CDB_% toidfunc register -o2.99999.4 -fCryptDllEncodeObject -e1 -vREG_EXPAND_SZ ExpandValue example.dll >> regress.out
  1970. %_CDB_% toidfunc register -O1000 -fCryptDllEncodeObject -e1 -dsetx509.dll -FSetAsn1AccountAliasEncode >> regress.out
  1971. %_CDB_% toidfunc register -O1000 -fCryptDllDecodeObject -e1 -dsetx509.dll -FSetAsn1AccountAliasDecode >> regress.out
  1972. %_CDB_% toidfunc register -O1001 -fCryptDllEncodeObject -e1 -dsetx509.dll -FSetAsn1HashedRootKeyEncode >> regress.out
  1973. %_CDB_% toidfunc register -O1001 -fCryptDllDecodeObject -e1 -dsetx509.dll -FSetAsn1HashedRootKeyDecode >> regress.out
  1974. %_CDB_% toidfunc register -O1002 -fCryptDllEncodeObject -e1 -dsetx509.dll -FSetAsn1CertificateTypeEncode >> regress.out
  1975. %_CDB_% toidfunc register -O1002 -fCryptDllDecodeObject -e1 -dsetx509.dll -FSetAsn1CertificateTypeDecode >> regress.out
  1976. %_CDB_% toidfunc register -O1003 -fCryptDllEncodeObject -e1 -dsetx509.dll -FSetAsn1MerchantDataEncode >> regress.out
  1977. %_CDB_% toidfunc register -O1003 -fCryptDllDecodeObject -e1 -dsetx509.dll -FSetAsn1MerchantDataDecode >> regress.out
  1978. %_CDB_% toidfunc register -O1003 -fCryptDllEncodeObject -e1 -vREG_DWORD WordValue 0x12345678 >> regress.out
  1979. %_CDB_% toidfunc register -O1003 -fCryptDllEncodeObject -e1 -vREG_EXPAND_SZ ExpandValue example.dll >> regress.out
  1980. %_CDB_% toidfunc enum >> regress.out
  1981. %_CDB_% tfindcer %store% -v -S "all ext" >> regress.out
  1982. %_CDB_% toidfunc unregister -o2.99999.1 -fCryptDllEncodeObject -e1 >> regress.out
  1983. %_CDB_% toidfunc unregister -o2.99999.2 -fCryptDllEncodeObject -e1 >> regress.out
  1984. %_CDB_% toidfunc unregister -o2.99999.3 -fCryptDllEncodeObject -e1 >> regress.out
  1985. %_CDB_% toidfunc unregister -o2.99999.4 -fCryptDllEncodeObject -e1 >> regress.out
  1986. %_CDB_% toidfunc unregister -O1000 -fCryptDllEncodeObject -e1 >> regress.out
  1987. %_CDB_% toidfunc unregister -O1001 -fCryptDllEncodeObject -e1 >> regress.out
  1988. %_CDB_% toidfunc unregister -O1002 -fCryptDllEncodeObject -e1 >> regress.out
  1989. %_CDB_% toidfunc unregister -O1003 -fCryptDllEncodeObject -e1 >> regress.out
  1990. %_CDB_% toidfunc unregister -o2.99999.1 -fCryptDllDecodeObject -e1 >> regress.out
  1991. %_CDB_% toidfunc unregister -o2.99999.2 -fCryptDllDecodeObject -e1 >> regress.out
  1992. %_CDB_% toidfunc unregister -o2.99999.3 -fCryptDllDecodeObject -e1 >> regress.out
  1993. %_CDB_% toidfunc unregister -o2.99999.4 -fCryptDllDecodeObject -e1 >> regress.out
  1994. %_CDB_% toidfunc unregister -O1000 -fCryptDllDecodeObject -e1 >> regress.out
  1995. %_CDB_% toidfunc unregister -O1001 -fCryptDllDecodeObject -e1 >> regress.out
  1996. %_CDB_% toidfunc unregister -O1002 -fCryptDllDecodeObject -e1 >> regress.out
  1997. %_CDB_% toidfunc unregister -O1003 -fCryptDllDecodeObject -e1 >> regress.out
  1998. %_CDB_% toidfunc enum >> regress.out
  1999. %_CDB_% regsvr32 -s setx509.dll
  2000. :OIDFuncDone
  2001. @rem ----------------------------------------------------------------
  2002. @rem REVFUNC
  2003. @rem ----------------------------------------------------------------
  2004. @if not %t%=="revfunc" if not %t%=="all" goto RevFuncDone
  2005. %_CDB_% regsvr32 -s setx509.dll
  2006. tfindcer %store% -S "setkeith" -pset.cer >> regress.out
  2007. tfindcer %store% -S "all ext" -psetall.cer >> regress.out
  2008. tfindcer %store% -S "setrevoked" -psetrevoke.cer >> regress.out
  2009. tfindcer %store% -S "MSPub" -psetnot.cer >> regress.out
  2010. tstore -s test -dAll >> regress.out
  2011. tstore -s test -dAll -R >> regress.out
  2012. %_CDB_% trevfunc set.cer -e0x80092013 -i0 >> regress.out
  2013. tcopycer %store% -s test >> regress.out
  2014. %_CDB_% trevfunc set.cer -e0 -i0 >> regress.out
  2015. %_CDB_% trevfunc setall.cer -e0 -i0 >> regress.out
  2016. %_CDB_% trevfunc setrevoke.cer -e0x80092010 -i0 >> regress.out
  2017. %_CDB_% trevfunc set.cer setall.cer setrevoke.cer setnot.cer -e0x80092010 -i2 >> regress.out
  2018. %_CDB_% trevfunc setnot.cer -e0x80092013 -i0 >> regress.out
  2019. %_CDB_% trevfunc set.cer setall.cer setnot.cer setrevoke.cer -e0x80092013 -i2 >> regress.out
  2020. tstore -s test -dAll >> regress.out
  2021. tstore -s test -dAll -R >> regress.out
  2022. %_CDB_% trevfunc -S%store% set.cer -e0 -i0 >> regress.out
  2023. %_CDB_% trevfunc -S%store% setall.cer -e0 -i0 >> regress.out
  2024. %_CDB_% trevfunc -S%store% setrevoke.cer -e0x80092010 -i0 >> regress.out
  2025. %_CDB_% trevfunc -S%store% set.cer setall.cer setrevoke.cer setnot.cer -e0x80092010 -i2 >> regress.out
  2026. %_CDB_% trevfunc -S%store% setnot.cer -e0 -i0 >> regress.out
  2027. @rem Freshness time of 1 second with accumulative and regular timeout
  2028. %_CDB_% trevfunc -S%store% setnot.cer -f1 -T5000 -e0x80092013 -i0 >> regress.out
  2029. %_CDB_% trevfunc -S%store% setnot.cer -f1 -t5000 -e0x80092013 -i0 >> regress.out
  2030. %_CDB_% trevfunc -S%store% set.cer setall.cer setnot.cer setrevoke.cer -e0x80092010 -i3 >> regress.out
  2031. tcopycer %store% -s test >> regress.out
  2032. @rem verisign revocation has been turned off
  2033. @rem %_CDB_% trevfunc vsgood.cer -e0 -i0 >> regress.out
  2034. @rem %_CDB_% trevfunc vsrevoke.cer -e0x80092010 -i0 >> regress.out
  2035. @rem %_CDB_% trevfunc set.cer vsgood.cer setall.cer vsrevoke.cer -e0x80092010 -i3 >> regress.out
  2036. if exist delta.store del delta.store
  2037. if exist crltest1.p7b del crltest1.p7b
  2038. if exist crltest2.p7b del crltest2.p7b
  2039. %_CDB_% tfindcer %store% -ACA -S -pca.cer >> regress.out
  2040. %_CDB_% tstore delta.store -aca.cer >> regress.out
  2041. @rem deltanovalid doesn't have a basic constraints extension
  2042. %_CDB_% tfindcer %store% DeltaNoValid -pdeltanovalid.cer -b >> regress.out
  2043. @rem deltaendvalid has a freshest CRL extensions
  2044. %_CDB_% tfindcer %store% DeltaEndValid -pdeltaendvalid.cer -b >> regress.out
  2045. %_CDB_% tfindcer %store% DeltaEndRevoked -pdeltaendrevoked.cer -b >> regress.out
  2046. %_CDB_% tfindcer %store% DeltaCAValid -pdeltacavalid.cer -b >> regress.out
  2047. %_CDB_% tfindcer %store% DeltaCARevoked -pdeltacarevoked.cer -b >> regress.out
  2048. %_CDB_% tfindcer %store% NoCDPValid -pnocdpvalid.cer -b >> regress.out
  2049. %_CDB_% tfindcer %store% NoCDPRevoked -pnocdprevoked.cer -b >> regress.out
  2050. %_CDB_% tfindcer %store% UnsupportedCDP -punsupportedCDP.cer -b >> regress.out
  2051. %_CDB_% tfindcer %store% "time invalid" -ptimeinvalid.cer -b >> regress.out
  2052. @rem CRYPT_E_REVOKED 0x80092010
  2053. @rem CRYPT_E_NO_REVOCATION_CHECK 0x80092012
  2054. @rem CRYPT_E_REVOCATION_OFFLINE 0x80092013
  2055. @rem on 4-8-01 reverted back to W2K semantics: expired certificate
  2056. @rem containing CDP is treated same as a time valid certificates
  2057. %_CDB_% trevfunc timeinvalid.cer -Sca.cer -e0x80092013 -i0 >> regress.out
  2058. @rem a CDP having only unsupported distribution points is considered no check
  2059. %_CDB_% trevfunc unsupportedcdp.cer -Sca.cer -e0x80092012 -i0 >> regress.out
  2060. @rem // Users Only: Base and Delta
  2061. @rem 1, ONLY_USERS_CRL_FLAG,
  2062. @rem 1, ONLY_USERS_CRL_FLAG | FRESHEST_CRL_FLAG,
  2063. %_CDB_% tcopycer %store% crltest1.p7b -7 -b1 -f1 >> regress.out
  2064. @rem if cert isn't in IDP, always considered as offline
  2065. %_CDB_% trevfunc deltanovalid.cer deltaendvalid.cer deltacavalid.cer -Sca.cer -e0x80092013 -i2 >> regress.out
  2066. %_CDB_% trevfunc deltanovalid.cer deltaendvalid.cer deltacarevoked.cer -Sca.cer -e0x80092013 -i2 >> regress.out
  2067. %_CDB_% trevfunc deltanovalid.cer deltaendvalid.cer deltaendrevoked.cer -Sca.cer -e0x80092010 -i2 >> regress.out
  2068. @rem // CAs Only: Base and Delta
  2069. @rem 2, ONLY_CAS_CRL_FLAG,
  2070. @rem 2, ONLY_CAS_CRL_FLAG | FRESHEST_CRL_FLAG,
  2071. %_CDB_% tcopycer %store% crltest1.p7b -7 -b2 -f2 >> regress.out
  2072. %_CDB_% trevfunc deltacavalid.cer deltaendvalid.cer -Sca.cer -e0x80092013 -i1 >> regress.out
  2073. %_CDB_% trevfunc deltacavalid.cer deltaendrevoked.cer -Sca.cer -e0x80092013 -i1 >> regress.out
  2074. %_CDB_% trevfunc deltacavalid.cer deltacarevoked.cer -Sca.cer -e0x80092010 -i1 >> regress.out
  2075. @rem // Base has hold entries, Delta has no entries
  2076. @rem 3, HOLD_CRL_FLAG,
  2077. @rem 3, NO_ENTRIES_CRL_FLAG | FRESHEST_CRL_FLAG,
  2078. %_CDB_% tcopycer %store% crltest1.p7b -7 -b3 -f3 >> regress.out
  2079. %_CDB_% trevfunc deltanovalid.cer deltaendvalid.cer deltacavalid.cer deltacarevoked.cer -Sca.cer -e0x80092010 -i3 >> regress.out
  2080. %_CDB_% trevfunc deltaendrevoked.cer -Sca.cer -e0x80092010 -i0 >> regress.out
  2081. @rem // Base has no entries, Delta has entries
  2082. @rem 4, NO_ENTRIES_CRL_FLAG,
  2083. @rem 4, FRESHEST_CRL_FLAG,
  2084. %_CDB_% tcopycer %store% crltest1.p7b -7 -b4 -f4 >> regress.out
  2085. %_CDB_% trevfunc deltanovalid.cer deltaendvalid.cer deltacavalid.cer deltaendrevoked.cer -Sca.cer -e0x80092010 -i3 >> regress.out
  2086. %_CDB_% trevfunc deltacarevoked.cer -Sca.cer -e0x80092010 -i0 >> regress.out
  2087. @rem 8-April-02: PartialChain doesn't do revocation checking, sets offline
  2088. %_CDB_% ttrust deltacarevoked.cer -Sca.cer -chain -f0x10000000 -e0x1010040 -i0x200 >> regress.out
  2089. @rem // Base has hold entries, Delta has remove entries
  2090. @rem 5, HOLD_CRL_FLAG,
  2091. @rem 5, REMOVE_FROM_CRL_FLAG | FRESHEST_CRL_FLAG,
  2092. %_CDB_% tcopycer %store% crltest1.p7b -7 -b5 >> regress.out
  2093. %_CDB_% trevfunc deltacarevoked.cer -Sca.cer -e0x80092010 -i0 >> regress.out
  2094. @rem 8-April-02: PartialChain doesn't do revocation checking, sets offline
  2095. %_CDB_% ttrust deltacarevoked.cer -Sca.cer -chain -f0x10000000 -e0x1010040 -i0x200 >> regress.out
  2096. %_CDB_% ttrust deltacarevoked.cer -Sca.cer -chain -f0x10000000 -r1 -t1000 -e0x1010040 -i0x200 >> regress.out
  2097. %_CDB_% trevfunc deltaendrevoked.cer -Sca.cer -e0x80092010 -i0 >> regress.out
  2098. %_CDB_% tcopycer %store% crltest1.p7b -7 -b5 -f5 >> regress.out
  2099. %_CDB_% trevfunc deltacarevoked.cer deltanovalid.cer deltaendvalid.cer deltacavalid.cer deltaendrevoked.cer deltacarevoked.cer -Sca.cer -e0 >> regress.out
  2100. %_CDB_% ttrust deltacarevoked.cer -Sca.cer -chain -f0x10000000 -e0x1010040 -i0x200 >> regress.out
  2101. %_CDB_% ttrust deltacarevoked.cer -Sca.cer -chain -f0x10000000 -r1 -e0x1010040 -i0x200 >> regress.out
  2102. @rem base higher than delta indicator is OK
  2103. %_CDB_% tcopycer %store% crltest1.p7b -7 -b6 -f5 >> regress.out
  2104. %_CDB_% trevfunc deltacarevoked.cer deltanovalid.cer deltaendvalid.cer deltacavalid.cer deltaendrevoked.cer deltacarevoked.cer -Sca.cer -e0 >> regress.out
  2105. @rem base higher than delta indicator, however not hold entries, still revoked
  2106. %_CDB_% tcopycer %store% crltest1.p7b -7 -b8 -f5 >> regress.out
  2107. %_CDB_% trevfunc deltacarevoked.cer deltanovalid.cer deltaendvalid.cer deltacavalid.cer deltaendrevoked.cer deltacarevoked.cer -Sca.cer -e0x80092010 -i0 >> regress.out
  2108. @rem delta indicator > base number, delta and base are considered offline
  2109. %_CDB_% tcopycer %store% crltest1.p7b -7 -b3 -f5 >> regress.out
  2110. %_CDB_% trevfunc deltacavalid.cer -Sca.cer -e0x80092013 -i0 >> regress.out
  2111. @rem honor the remove, however, still treat as offline
  2112. %_CDB_% trevfunc deltacarevoked.cer -Sca.cer -e0x80092013 -i0 >> regress.out
  2113. @rem // Valid base, delta has unsupported IDP options
  2114. @rem 6, HOLD_CRL_FLAG,
  2115. @rem 6, FRESHEST_CRL_FLAG | UNSUPPORTED_IDP_OPTIONS_CRL_FLAG,
  2116. %_CDB_% tcopycer %store% crltest1.p7b -7 -b6 -f6 >> regress.out
  2117. @rem unsupported IDP, always considered as offline, however, in this case
  2118. @rem the base is still valid for revoked
  2119. %_CDB_% trevfunc deltanovalid.cer -Sca.cer -e0x80092013 -i0 >> regress.out
  2120. %_CDB_% trevfunc deltaendvalid.cer -Sca.cer -e0x80092013 -i0 >> regress.out
  2121. %_CDB_% trevfunc deltacavalid.cer -Sca.cer -e0x80092013 -i0 >> regress.out
  2122. %_CDB_% trevfunc deltacarevoked.cer -Sca.cer -e0x80092010 -i0 >> regress.out
  2123. %_CDB_% trevfunc deltaendrevoked.cer -Sca.cer -e0x80092010 -i0 >> regress.out
  2124. @rem // Expired base, valid delta
  2125. @rem 7, EXPIRED_CRL_FLAG,
  2126. @rem 7, FRESHEST_CRL_FLAG,
  2127. @rem if delta is valid, then, the base is considered to be valid
  2128. %_CDB_% tcopycer %store% crltest1.p7b -7 -b7 -f7 >> regress.out
  2129. %_CDB_% trevfunc deltanovalid.cer deltaendvalid.cer deltacavalid.cer deltacarevoked.cer -Sca.cer -e0x80092010 -i3 >> regress.out
  2130. @rem case where get valid base #6 from store, get delta #7 from wire and
  2131. @rem retrieve time invalid #7 from wire. Since delta is valid, base is
  2132. @rem considered as being valid
  2133. %_CDB_% tcopycer %store% delta.store -b6 >> regress.out
  2134. %_CDB_% trevfunc deltanovalid.cer deltaendvalid.cer deltacavalid.cer deltaendrevoked.cer -Sdelta.store -e0x80092010 -i3 >> regress.out
  2135. @rem case where one of the URLs has a time valid base CRL. However,
  2136. @rem it doesn't have the base CRL number needed by the delta CRL.
  2137. @rem
  2138. @rem cryptnet.dll was fixed on 26-Sep-01 to continue on to the next
  2139. @rem CDP URL looking for a CRL having the necessary base number
  2140. @rem
  2141. @rem crltest2.p7b is the first one to be checked
  2142. %_CDB_% tcopycer %store% crltest2.p7b -7 -b6 >> regress.out
  2143. %_CDB_% trevfunc deltanovalid.cer deltaendvalid.cer deltacavalid.cer deltaendrevoked.cer -Sdelta.store -e0x80092010 -i3 >> regress.out
  2144. if exist crltest2.p7b del crltest2.p7b
  2145. @rem case where delta is > base number, delta and base are
  2146. @rem always offline
  2147. %_CDB_% tcopycer %store% crltest1.p7b -7 -b6 -f7 >> regress.out
  2148. %_CDB_% trevfunc deltaendvalid.cer -Sca.cer -e0x80092013 -i0 >> regress.out
  2149. %_CDB_% trevfunc deltacavalid.cer -Sca.cer -e0x80092013 -i0 >> regress.out
  2150. %_CDB_% trevfunc deltacarevoked.cer -Sca.cer -e0x80092010 -i0 >> regress.out
  2151. %_CDB_% trevfunc deltaendrevoked.cer -Sca.cer -e0x80092010 -i0 >> regress.out
  2152. @rem base 4 has no entries
  2153. %_CDB_% tcopycer %store% crltest1.p7b -7 -b4 -f7 >> regress.out
  2154. %_CDB_% trevfunc deltaendrevoked.cer -Sca.cer -e0x80092010 -i0 >> regress.out
  2155. @rem // Valid base, expired delta
  2156. @rem 8, 0,
  2157. @rem 8, EXPIRED_CRL_FLAG | FRESHEST_CRL_FLAG,
  2158. %_CDB_% tcopycer %store% crltest1.p7b -7 -b8 -f8 >> regress.out
  2159. @rem offline except for revoked
  2160. %_CDB_% trevfunc deltacavalid.cer -Sca.cer -e0x80092013 -i0 -L6 >> regress.out
  2161. %_CDB_% trevfunc deltaendrevoked.cer -Sca.cer -e0x80092010 -i0 -L3 >> regress.out
  2162. @rem // Expired base, without a freshest CDP extension
  2163. @rem 9, EXPIRED_CRL_FLAG | NO_FRESHEST_CDP_CRL_FLAG,
  2164. @rem 9, FRESHEST_CRL_FLAG,
  2165. @rem deltaendvalid has freshestCrl ext
  2166. %_CDB_% tcopycer %store% crltest1.p7b -7 -b9 -f9 >> regress.out
  2167. %_CDB_% trevfunc deltaendvalid.cer -Sca.cer -e0 -i0 >> regress.out
  2168. %_CDB_% trevfunc deltanovalid.cer -Sca.cer -e0x80092013 -i0 >> regress.out
  2169. %_CDB_% trevfunc deltacavalid.cer -Sca.cer -e0x80092013 -i0 >> regress.out
  2170. %_CDB_% trevfunc deltaendrevoked.cer -Sca.cer -e0x80092010 -i0 >> regress.out
  2171. @rem // Base without IDP and no freshest, delta CRL
  2172. @rem 10, NO_IDP_CRL_FLAG | NO_FRESHEST_CDP_CRL_FLAG,
  2173. %_CDB_% tstore delta.store -R -dAll >> regress.out
  2174. %_CDB_% trevfunc nocdpvalid.cer -Sdelta.store -e0x80092012 -i0 >> regress.out
  2175. %_CDB_% tcopycer %store% delta.store -b10 >> regress.out
  2176. %_CDB_% trevfunc nocdpvalid.cer -Sdelta.store -e0 -i0 >> regress.out
  2177. %_CDB_% trevfunc nocdprevoked.cer -Sdelta.store -e0x80092010 -i0 >> regress.out
  2178. @rem // Base and Delta CRL with unsupported critical ext
  2179. @rem 11, UNSUPPORTED_CRITICAL_EXT_CRL_FLAG,
  2180. @rem 11, UNSUPPORTED_CRITICAL_EXT_CRL_FLAG | FRESHEST_CRL_FLAG,
  2181. %_CDB_% tcopycer %store% crltest1.p7b -7 -b11 -f9 >> regress.out
  2182. %_CDB_% trevfunc deltaendvalid.cer -Sca.cer -e0x80092012 -i0 >> regress.out
  2183. @rem unsupported delta, treats the base as offline
  2184. %_CDB_% tcopycer %store% crltest1.p7b -7 -b100 -f11 >> regress.out
  2185. %_CDB_% trevfunc deltaendvalid.cer -Sca.cer -e0x80092013 -i0 >> regress.out
  2186. @rem // Valid base with number > above delta indicators
  2187. @rem 100, 0,
  2188. @rem CERT_E_EXPIRED 0x800b0101
  2189. @rem CERT_E_REVOKED 0x800b010c
  2190. @rem CERT_E_REVOCATION_FAILURE 0x800b010e
  2191. @rem CERT_E_UNTRUSTEDROOT 0x800b0109
  2192. @rem CERT_E_ROLE 0x800b0103
  2193. @rem CERT_E_PURPOSE 0x800b0106
  2194. @rem get a store without any CRLs
  2195. if exist tmp.store del tmp.store
  2196. %_CDB_% tcopycer %store% tmp.store >> regress.out
  2197. %_CDB_% tstore tmp.store -R -dAll >> regress.out
  2198. @rem enable expiration check
  2199. setreg -q 2 TRUE >> regress.out
  2200. @rem disable revocation check
  2201. setreg -q 3 FALSE >> regress.out
  2202. @rem disable individual and commercial offline OK
  2203. setreg -q 4 FALSE >> regress.out
  2204. setreg -q 5 FALSE >> regress.out
  2205. @rem 8-April-02: UntrustedRoot doesn't do revocation checking
  2206. %_CDB_% ttrust setrevoke.cer -Stmp.store -RevokeChain -q0x800b0109 >> regress.out
  2207. %_CDB_% ttrust setnot.cer -Stmp.store -RevokeChain -q0x800b0109 >> regress.out
  2208. %_CDB_% ttrust vsgood.cer -RevokeChain -q0x800b0101 >> regress.out
  2209. @rem enable revocation check
  2210. setreg -q 3 TRUE >> regress.out
  2211. %_CDB_% ttrust setrevoke.cer -Stmp.store -q0x800b0109 >> regress.out
  2212. %_CDB_% ttrust setnot.cer -S%store% -q0x800b0109 >> regress.out
  2213. %_CDB_% ttrust vsgood.cer -q0x800b0101 >> regress.out
  2214. @rem disable expiration check
  2215. setreg -q 2 FALSE >> regress.out
  2216. %_CDB_% ttrust vsgood.cer -q0x800b010e >> regress.out
  2217. @rem enable individual offline OK
  2218. setreg -q 4 TRUE >> regress.out
  2219. %_CDB_% ttrust vsgood.cer -q >> regress.out
  2220. @rem disable individual offline OK
  2221. setreg -q 4 FALSE >> regress.out
  2222. @rem enable expiration check
  2223. setreg -q 2 TRUE >> regress.out
  2224. @rem disable revocation check
  2225. setreg -q 3 FALSE >> regress.out
  2226. @rem 8-April-02: UntrustedRoot doesn't do revocation checking, sets offline
  2227. %_CDB_% ttrust setrevoke.cer -Stmp.store -https -RevokeChain -q0x80092013 -httpsIgnoreUnknownCA >> regress.out
  2228. @rem setnot.cer has no issuance policy which takes precedence
  2229. @rem over offline revocation
  2230. %_CDB_% ttrust setnot.cer -Stmp.store -e0x2000430 -i0x500 >> regress.out
  2231. %_CDB_% ttrust setnot.cer -Stmp.store -https -RevokeChain -q0x800b0106 -HttpsIgnoreWrongUsage -httpsIgnoreUnknownCA >> regress.out
  2232. %_CDB_% ttrust setnot.cer -Stmp.store -https -q0x800b0106 -HttpsIgnoreWrongUsage -httpsIgnoreUnknownCA >> regress.out
  2233. %_CDB_% ttrust vsgood.cer -https -RevokeChain -q0x800b0101 -HttpsIgnoreWrongUsage -httpsIgnoreUnknownCA >> regress.out
  2234. %_CDB_% ttrust vsgood.cer -https -RevokeChain -q0x80092012 -httpsIgnoreCertDateInvalid -HttpsIgnoreWrongUsage -httpsIgnoreUnknownCA >> regress.out
  2235. @rem CERT_CHAIN_REVOCATION_CHECK_END_CERT 0x10000000
  2236. @rem CERT_CHAIN_REVOCATION_CHECK_CHAIN 0x20000000
  2237. @rem CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT 0x40000000
  2238. @rem CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY 0x80000000
  2239. %_CDB_% ttrust setrevoke.cer -S%store% -chain -f0x10000000 -q0x800b0109 >> regress.out
  2240. %_CDB_% ttrust setrevoke.cer -S%store% -chain -f0x20000000 -q0x800b0109 >> regress.out
  2241. %_CDB_% ttrust setrevoke.cer -S%store% -chain -f0x40000000 -q0x800b0109 >> regress.out
  2242. %_CDB_% ttrust vsgood.cer -chain -f0x20000000 -q0x800b0101 >> regress.out
  2243. @rem by itself the CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY should be ignored
  2244. @rem #define CERT_TRUST_IS_NOT_TIME_VALID 0x00000001
  2245. %_CDB_% ttrust vsgood.cer -chain -e0x1 >> regress.out
  2246. %_CDB_% ttrust vsgood.cer -chain -f0x80000000 -e0x1 >> regress.out
  2247. :RevFuncDone
  2248. @rem ----------------------------------------------------------------
  2249. @rem ENCODE
  2250. @rem ----------------------------------------------------------------
  2251. @if not %t%=="encode" if not %t%=="all" goto EncodeDone
  2252. %_CDB_% tencode >> regress.out
  2253. :EncodeDone
  2254. @rem ----------------------------------------------------------------
  2255. @rem SIGNCODE
  2256. @rem ----------------------------------------------------------------
  2257. @if not %t%=="signcode" if not %t%=="all" goto SignCodeDone
  2258. @rem
  2259. @rem Trust the test root
  2260. @rem
  2261. %_CDB_% setreg -q 1 TRUE 2 TRUE 3 TRUE 4 TRUE 5 TRUE 6 TRUE 7 TRUE >> regress.out
  2262. %SLEEP0%
  2263. @rem explicitly trust the "Root Agency" testroot
  2264. %_CDB_% tstore -s lm:root -arooto.cer >> regress.out
  2265. @copy texe.exe testexe.exe >nul
  2266. @copy texe.exe test.exe >nul
  2267. @copy tdll.dll testdll.dll >nul
  2268. @copy tcab.cab testcab.cab >nul
  2269. @rem
  2270. @rem sign an exe file with certificates in the store
  2271. @rem
  2272. @echo ------- signcode (exe) -------- >> regress.out
  2273. %_CDB_% makecert -sq foo.p10 signexe.cer >> regress.out
  2274. %_CDB_% certmgr signexe.cer >> regress.out
  2275. %_CDB_% makecert -sq foo.p10 -n "CN=xiaohs" signexe.cer >> regress.out
  2276. %_CDB_% certmgr signexe.cer >> regress.out
  2277. %_CDB_% makecert signexe.cer >> regress.out
  2278. %_CDB_% certmgr -add -all -c signexe.cer -s foosign >> regress.out
  2279. %_CDB_% certmgr -add -all -c signexe.cer -s signCab >> regress.out
  2280. %_CDB_% certmgr -del -all -c -s foosign >> regress.out
  2281. %_CDB_% makecert -ss foosign -$ commercial -n "CN=foosign's cert" signexe.cer >> regress.out
  2282. @rem %_CDB_% signcode -spc softkey.spc -v softkey.pvk testexe.exe >> regress.out
  2283. %_CDB_% signcode -s foosign -cn "foosign" -a md5 -i "http://xiaohs1" -n "xiaohong's test" -$ commercial testexe.exe >> regress.out
  2284. %_CDB_% chktrust -q -h0x0 testexe.exe >> regress.out
  2285. %_CDB_% signcode -s foosign -cn "foosign" -i "http://xiaohs1" -n "xiaohong's test" -$ commercial testexe.exe >> regress.out
  2286. %_CDB_% chktrust -q -h0x0 testexe.exe >> regress.out
  2287. @rem
  2288. @rem sign a dll file with pvk file and spc file
  2289. @rem
  2290. @echo ------- signcode (dll) -------- >> regress.out
  2291. %_CDB_% makecert -b 11/21/1996 -m 700 -sv test.pvk signdll.cer >> regress.out
  2292. %_CDB_% cert2spc signdll.cer signdll.spc >> regress.out
  2293. %_CDB_% signcode -spc signdll.spc -v test.pvk testdll.dll >> regress.out
  2294. %_CDB_% cert2spc signdll.spc signexe.cer signexe.spc >> regress.out
  2295. @rem
  2296. @rem sign a CTL file
  2297. @rem
  2298. @echo ------- signcode (ctl) -------- >> regress.out
  2299. %_CDB_% makecert -sk signCTL -b 02/02/1999 signCTL.cer >> regress.out
  2300. %_CDB_% makecert -ik signCTL -ic signCTL.cer -b 02/04/1999 sign2.cer >> regress.out
  2301. %_CDB_% cert2spc signCTL.cer signCTL.spc >> regress.out
  2302. %_CDB_% makeCTL signdll.spc signexe.cer testctl.ctl >> regress.out
  2303. %_CDB_% signcode -k signCTL -spc signCTL.spc -t http://timestamp.verisign.com/scripts/timstamp.dll -$ individual testctl.ctl >> regress.out
  2304. %_CDB_% chktrust -q -h0x0 testctl.ctl >> regress.out
  2305. %_CDB_% signcode -x -t http://timestamp.verisign.com/scripts/timstamp.dll testctl.ctl >> regress.out
  2306. %_CDB_% chktrust -q -h0x0 testctl.ctl >> regress.out
  2307. @rem
  2308. @rem sign a cab file
  2309. @rem
  2310. @echo ------- signcode (cab) -------- >> regress.out
  2311. %_CDB_% certmgr -del -all -c -s signCab >> regress.out
  2312. %_CDB_% makecert -sk signCab -ss ca signcab.cer -cy authority -n "CN=SIGNCAB.CER" >> regress.out
  2313. %_CDB_% makecert -is ca -ic signcab.cer -ss signCab -n "CN=SignCab cert in signCab store" >> regress.out
  2314. %_CDB_% signcode -s signCab -$ individual testcab.cab >> regress.out
  2315. %_CDB_% chktrust -q -h0x0 testcab.cab >> regress.out
  2316. @rem
  2317. @rem test CertMgr
  2318. @rem
  2319. @echo ------- signcode (certmgr) -------- >> regress.out
  2320. %_CDB_% certmgr %store% -v >> regress.out
  2321. %_CDB_% certmgr %store% -v -m >> regress.out
  2322. %_CDB_% certmgr -eku "1.3.6.2.5.5.7.3.2,1.2.3.4.5.6.7" -add -c -all signcab.cer signcab.cer >> regress.out
  2323. %_CDB_% certmgr -s signCab >> regress.out
  2324. %_CDB_% certmgr -del -c -all %store% -s signcab >> regress.out
  2325. %_CDB_% certmgr -add -crl -all %store% -s signcab >> regress.out
  2326. %_CDB_% certmgr -add -all -c -s signCab sign.cer >> regress.out
  2327. %_CDB_% certmgr -del -all -c -s signCab >> regress.out
  2328. %_CDB_% certmgr -del -all sign.cer sign.mgr >> regress.out
  2329. %_CDB_% certmgr -v testexe.exe >> regress.out
  2330. %_CDB_% certmgr testctl.ctl >> regress.out
  2331. %_CDB_% certmgr signexe.spc >> regress.out
  2332. %_CDB_% makecert -sq foo.p10 -n "CN=xiaohs" -eku "1.2.3,2.3.4" -ss signcab >> regress.out
  2333. @rem ensure the test root is removed
  2334. %_CDB_% tfindcer -S -s lm:root -a"Root Agency" -d >> regress.out
  2335. @rem
  2336. @rem cleanup the files and registry
  2337. @rem
  2338. @echo ------- signcode (cleanup) -------- >> regress.out
  2339. @del sign.mgr
  2340. @del sign.cer
  2341. @del signcab.cer
  2342. %_CDB_% certmgr -del -all -c -s signcab >> regress.out
  2343. %_CDB_% tstore -T -s signcab -dAll >> regress.out
  2344. @del testctl.ctl
  2345. @del signctl.spc
  2346. @del sign2.cer
  2347. @del signctl.cer
  2348. @del signexe.spc
  2349. @del signdll.spc
  2350. @del signdll.cer
  2351. @del signexe.cer
  2352. %_CDB_% certmgr -del -all -c -s foosign >>regress.out
  2353. @del testcab.cab
  2354. @del testdll.dll
  2355. @del test.exe
  2356. @del testexe.exe
  2357. :SignCodeDone
  2358. @rem ----------------------------------------------------------------
  2359. @rem DECODE
  2360. @rem ----------------------------------------------------------------
  2361. @if not %t%=="decode" if not %t%=="all" goto DecodeDone
  2362. @echo ------- Decode -------- >> regress.out
  2363. %_CDB_% tdecode Ctdecode1.cer >> regress.out
  2364. %_CDB_% tdecode Ctdecode2.cer >> regress.out
  2365. %_CDB_% tdecode Stdecode3.spc >> regress.out
  2366. %_CDB_% tdecode Ctdecode4.cer >> regress.out
  2367. %_CDB_% tdecode Ctdecode5.spc >> regress.out
  2368. %_CDB_% tdecode Stdecode5.spc >> regress.out
  2369. :DecodeDone
  2370. @rem ----------------------------------------------------------------
  2371. @rem PKCS8
  2372. @rem ----------------------------------------------------------------
  2373. @if not %t%=="pkcs8" if not %t%=="all" goto PKCS8Done
  2374. %_CDB_% pkcs8im -cpkcs8test -E pkcs8tst.pkcs8 Xchg >> regress.out
  2375. %_CDB_% pkcs8ex -cpkcs8test -d pkcs8out.pkcs8 Xchg >> regress.out
  2376. :PKCS8Done
  2377. @rem ----------------------------------------------------------------
  2378. @rem TRUST
  2379. @rem ----------------------------------------------------------------
  2380. @if not %t%=="trust" if not %t%=="all" goto TrustDone
  2381. @rem
  2382. @rem get certs to be used for building chains
  2383. @rem
  2384. %_CDB_% tfindcer %store% -S -q -a"all ext" -pallext.cer >> regress.out
  2385. %_CDB_% tfindcer %store% -S -q -akevin -asign -pkevin.cer >> regress.out
  2386. %_CDB_% tfindcer %store% -S -q -ame -axchg -pme.cer >> regress.out
  2387. %_CDB_% tfindcer %store% notpermitted -pnotpermitted.cer >> regress.out
  2388. %_CDB_% tfindcer %store% excluded -pexcluded.cer >> regress.out
  2389. %_CDB_% tfindcer %store% missingncend -pmissingncend.cer >> regress.out
  2390. %_CDB_% tfindcer %store% DssEnd -pdssend.cer >> regress.out
  2391. %_CDB_% tfindcer %store% Duplicate1 -pduplicate1.cer >> regress.out
  2392. %_CDB_% tfindcer %store% InvalidKeyUsageEnd -pinvalidKUend.cer >> regress.out
  2393. %_CDB_% tfindcer %store% InvalidKeyUsageCA -pinvalidKUCA.cer >> regress.out
  2394. @rem ensure TestRoot is removed from the root store
  2395. %_CDB_% tfindcer -s lm:root -S -o2.5.4.3 -aTestRoot -d >> regress.out
  2396. @rem #define CERT_NAME_DNS_TYPE 6
  2397. @rem #define CERT_NAME_URL_TYPE 7
  2398. @rem #define CERT_NAME_UPN_TYPE 8
  2399. %_CDB_% tx500str -callext.cer -g6 >> regress.out
  2400. %_CDB_% tx500str -cme.cer -g6 >> regress.out
  2401. %_CDB_% tx500str -callext.cer -g7 >> regress.out
  2402. %_CDB_% tx500str -callext.cer -g8 >> regress.out
  2403. %_CDB_% tx500str -cme.cer -g8 >> regress.out
  2404. @rem disable revocation checking
  2405. %_CDB_% setreg -q 3 false >> regress.out
  2406. @rem ensure we don't have any cached authroot stuff
  2407. %_CDB_% turlcache -d http://www.download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authrootseq.txt >> regress.out
  2408. %_CDB_% turlcache -d http://www.download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authrootstl.cab >> regress.out
  2409. %_CDB_% tstore -s lm:authroot -dAll >> regress.out
  2410. @rem remove any VeriSign Publisher roots that could have been copied to
  2411. @rem the ca store
  2412. %_CDB_% tfindcer -s reg:ca "VeriSign Individual Software Publishers CA" -d >> regress.out
  2413. @rem with authroot auto update disabled the following should return
  2414. @rem CERT_E_CHAINING
  2415. %_CDB_% ttrust -DisableRootAutoUpdate vsgood.cer -q0x800b010a >> regress.out
  2416. @rem with authroot auto update disabled the following should return
  2417. @rem CERT_E_UNTRUSTEDROOT
  2418. %_CDB_% ttrust -DisableRootAutoUpdate testsslroot.cer -q0x800b0109 >> regress.out
  2419. @rem enabling authroot auto update should fetch the ctl
  2420. %_CDB_% ttrust -EnableRootAutoUpdate testsslroot.cer -q >> regress.out
  2421. %_CDB_% turlcache -e -1 http://www.download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authrootseq.txt >> regress.out
  2422. %_CDB_% turlcache -e -1 http://www.download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authrootstl.cab >> regress.out
  2423. @rem with authroot auto update enabled, the following should be
  2424. @rem CERT_E_EXPIRED
  2425. %_CDB_% ttrust vsgood.cer -q0x800b0101 >> regress.out
  2426. @rem fetch some Verisign 3rd party roots. Also, the following 3 certs
  2427. @rem will have 2 possible roots. Make sure the newer root is picked
  2428. @rem newer root has sha1 thumb=90AEA269 85FF1480 4C434952 ECE96084 77AF556F
  2429. %_CDB_% ttrust -chain -f0x80 vsclass1ca.cer >> regress.out
  2430. @rem newer root has sha1 thumb=6782AAE0 EDEEE21A 5839D3C0 CD14680A 4F60142A
  2431. %_CDB_% ttrust -chain -f0x80 vsclass2ca.cer >> regress.out
  2432. @rem newer root has sha1 thumb=742C3192 E607E424 EB454954 2BE1BBC5 3E6174E2
  2433. %_CDB_% ttrust -chain -f0x80 vsclass3ca.cer >> regress.out
  2434. @rem verify that we can fetch the verisign CRL.
  2435. @rem first ensure its removed from the cache
  2436. %_CDB_% turlcache -d -e http://crl.verisign.com/class1.crl >> regress.out
  2437. @rem around 8-8-02 verisign removed expired certs from the CRL
  2438. %_CDB_% ttrust -chain -f0x10000000 vsrevoke2.cer -q0x800b0101 >> regress.out
  2439. %_CDB_% turlcache -1 -e http://crl.verisign.com/class1.crl >> regress.out
  2440. @rem flush the above CRL from the cache using CryptFlushTimeValidObject()
  2441. %_CDB_% ttrust -chain vsrevoke2.cer -FlushCrl >> regress.out
  2442. %_CDB_% turlcache -0 -e http://crl.verisign.com/class1.crl >> regress.out
  2443. @rem verify we can create a CTL with property entries. Verify these
  2444. @rem can be added back to certs. Make an explicit check for the
  2445. @rem KEY_PROV_INFO property
  2446. if exist tmp.store del tmp.store
  2447. if exist tmp.stl del tmp.stl
  2448. %_CDB_% makerootctl -a %store% -c tmp.stl >> regress.out
  2449. %_CDB_% tstore -T -atmp.stl tmp.store >> regress.out
  2450. %_CDB_% tfindcer %store% TestRecipient2 >> regress.out
  2451. %_CDB_% tfindcer tmp.store TestRecipient2 >> regress.out
  2452. %_CDB_% makerootctl -d %store% tmp.stl >> regress.out
  2453. %_CDB_% tstore -T -atmp.stl tmp.store >> regress.out
  2454. %_CDB_% tstore tmp.store >> regress.out
  2455. @rem
  2456. @rem build chains and check the chain's TrustStatus
  2457. @rem
  2458. @rem TrustErrorStatus
  2459. @rem CERT_TRUST_NO_ERROR 0x00000000
  2460. @rem CERT_TRUST_IS_NOT_TIME_VALID 0x00000001
  2461. @rem CERT_TRUST_IS_NOT_TIME_NESTED 0x00000002
  2462. @rem CERT_TRUST_IS_REVOKED 0x00000004
  2463. @rem CERT_TRUST_IS_NOT_SIGNATURE_VALID 0x00000008
  2464. @rem CERT_TRUST_IS_NOT_VALID_FOR_USAGE 0x00000010
  2465. @rem CERT_TRUST_IS_UNTRUSTED_ROOT 0x00000020
  2466. @rem CERT_TRUST_REVOCATION_STATUS_UNKNOWN 0x00000040
  2467. @rem CERT_TRUST_IS_CYCLIC 0x00000080
  2468. @rem CERT_TRUST_INVALID_EXTENSION 0x00000100
  2469. @rem CERT_TRUST_INVALID_POLICY_CONSTRAINTS 0x00000200
  2470. @rem CERT_TRUST_INVALID_BASIC_CONSTRAINTS 0x00000400
  2471. @rem CERT_TRUST_INVALID_NAME_CONSTRAINTS 0x00000800
  2472. @rem CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT 0x00001000
  2473. @rem CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT 0x00002000
  2474. @rem CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT 0x00004000
  2475. @rem CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT 0x00008000
  2476. @rem CERT_TRUST_IS_PARTIAL_CHAIN 0x00010000
  2477. @rem CERT_TRUST_CTL_IS_NOT_TIME_VALID 0x00020000
  2478. @rem CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID 0x00040000
  2479. @rem CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE 0x00080000
  2480. @rem CERT_TRUST_IS_OFFLINE_REVOCATION 0x01000000
  2481. @rem CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY 0x02000000
  2482. @rem TrustInfoStatus
  2483. @rem CERT_TRUST_HAS_EXACT_MATCH_ISSUER 0x00000001
  2484. @rem CERT_TRUST_HAS_KEY_MATCH_ISSUER 0x00000002
  2485. @rem CERT_TRUST_HAS_NAME_MATCH_ISSUER 0x00000004
  2486. @rem CERT_TRUST_IS_SELF_SIGNED 0x00000008
  2487. @rem CERT_TRUST_HAS_PREFERRED_ISSUER 0x00000100
  2488. @rem CERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY 0x00000200
  2489. @rem CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS 0x00000400
  2490. @rem CERT_TRUST_IS_COMPLEX_CHAIN 0x00010000
  2491. @rem ensure the test root is removed
  2492. %_CDB_% tfindcer -S -s lm:root -a"Root Agency" -d >> regress.out
  2493. %_CDB_% tfindcer -S -s unprotected:root -a"Root Agency" -d >> regress.out
  2494. @rem allext.cer and kevin.cer have valid name constraints
  2495. @rem check both issuance and application usage
  2496. %_CDB_% ttrust allext.cer -S%store% -chain -u1.2.3.2 -u1.2.3.1 -p1.1.1 -p1.1.22 -p1.1.4444 -e0x20 -i0x700 -DeleteSaferRegKey >> regress.out
  2497. @rem check issuance usage
  2498. %_CDB_% ttrust allext.cer -S%store% -chain -p1.1.22 -e0x20 -i0x700 >> regress.out
  2499. @rem check application usage
  2500. %_CDB_% ttrust allext.cer -S%store% -chain -u1.2.3.1 -e0x20 -i0x700 >> regress.out
  2501. @rem end usage without being mapped
  2502. %_CDB_% ttrust allext.cer -S%store% -chain -u1.1.55555 -e0x30 -i0x700 >> regress.out
  2503. @rem cert has any application usage, therefore, will match any issuance usage
  2504. %_CDB_% ttrust kevin.cer -S%store% -chain -u1.1.1 -u1.1.666666 -e0x20 -i0x700 >> regress.out
  2505. @rem do "or" matching of issuance policy
  2506. %_CDB_% ttrust kevin.cer -S%store% -chain -p1.1.1 -p1.1.666666 -p1.1.55555 -e0x30 -i0x700 >> regress.out
  2507. %_CDB_% ttrust kevin.cer -S%store% -chain -OrPolicy -p1.1.1 -p1.1.666666 -p1.1.55555 -e0x20 -i0x700 >> regress.out
  2508. @rem dssend.cer doesn't have required issuance chain policy
  2509. @rem for dssend.cer OrUsage must be selected to have valid usage
  2510. @rem DssCA certificate doesn't have the mandatory basic constraint ext
  2511. %_CDB_% ttrust dssend.cer -DisableMandatoryBasicConstraints 1 -S%store% -chain -p1.1.4444 -e0x20 -i0x100 >> regress.out
  2512. %_CDB_% ttrust dssend.cer -S%store% -chain -u1.2.3.0 -u1.2.3.2 -e0x30 -i0x100 >> regress.out
  2513. %_CDB_% ttrust dssend.cer -S%store% -chain -OrUsage -u1.2.3.0 -u1.2.3.2 -e0x20 -i0x100 >> regress.out
  2514. %_CDB_% ttrust dssend.cer -DisableMandatoryBasicConstraints 0xFFFFFFFF -S%store% -chain -p1.1.4444 -e0x420 -i0x100 >> regress.out
  2515. %_CDB_% ttrust dssend.cer -S%store% -chain -u1.2.3.0 -u1.2.3.2 -e0x430 -i0x100 >> regress.out
  2516. %_CDB_% ttrust dssend.cer -S%store% -chain -OrUsage -u1.2.3.0 -u1.2.3.2 -e0x420 -i0x100 >> regress.out
  2517. @rem following has both not supported and not permitted name constraints
  2518. %_CDB_% ttrust notpermitted.cer -S%store% -chain -e0x5020 -i0x300 >> regress.out
  2519. @rem following has an excluded name constraint
  2520. %_CDB_% ttrust excluded.cer -S%store% -chain -e0x8020 -i0x300 >> regress.out
  2521. if exist misingnc.store del missingnc.store
  2522. %_CDB_% tcopycer %store% missingnc.store >> regress.out
  2523. @rem Following has not supported constraints
  2524. %_CDB_% ttrust missingncend.cer -Smissingnc.store -chain -e0x1020 -i0x300 -DisableNotDefinedNameConstraint >> regress.out
  2525. @rem Following has not defined and not supported constraints. However,
  2526. @rem root's nameconstraint will suppress the not defined error.
  2527. %_CDB_% ttrust missingncend.cer -Smissingnc.store -chain -e0x1020 -i0x300 -EnableNotDefinedNameConstraint >> regress.out
  2528. @rem Remove the root. The not defined error should now be set when enabled.
  2529. @rem Also, with root removed, CERT_TRUST_IS_PARTIAL_CHAIN is now set.
  2530. %_CDB_% tfindcer missingnc.store -S -aroot -d >> regress.out
  2531. %_CDB_% ttrust missingncend.cer -Smissingnc.store -chain -e0x11000 -i0x0 -DisableNotDefinedNameConstraint >> regress.out
  2532. %_CDB_% ttrust missingncend.cer -Smissingnc.store -chain -e0x13000 -i0x0 -EnableNotDefinedNameConstraint >> regress.out
  2533. @rem following only does key matching
  2534. %_CDB_% ttrust me.cer -S%store% -chain -e0x20 -i0x0 >> regress.out
  2535. @rem enable revocation checking, no revocation errors, url timeout (5 seconds)
  2536. @rem 8-April-02: UntrustedRoot doesn't do revocation checking, sets offline
  2537. %_CDB_% ttrust allext.cer -S%store% -chain -f0x20000000 -t5000 -e0x1000060 -i0x700 >> regress.out
  2538. @rem enable revocation checking with invalid freshness (1 second)
  2539. %_CDB_% ttrust allext.cer -S%store% -chain -f0x20000000 -r1 -e0x1000060 -i0x700 >> regress.out
  2540. @rem enable revocation checking with valid freshness (1 year)
  2541. %_CDB_% ttrust allext.cer -S%store% -chain -f0x20000000 -r31536000 -e0x1000060 -i0x700 >> regress.out
  2542. @rem enable resync and revocation
  2543. %_CDB_% tchain allext.cer -A%store% -r1000 -i20 -f0x20000000 -t2 >> regress.out
  2544. @rem InvalidKUCA cert doesn't have the KEY_CERT usage bit set. The end
  2545. @rem certificate should have CERT_TRUST_IS_NOT_VALID_FOR_USAGE.
  2546. @rem However, when the CA cert is explicitly checked, no USAGE error
  2547. %_CDB_% ttrust invalidKUEnd.cer -S%store% -chain -e0x30 -i0x100 >> regress.out
  2548. %_CDB_% ttrust invalidKUCA.cer -S%store% -chain -e0x20 -i0x100 >> regress.out
  2549. @rem
  2550. @rem We will get (CERT_TRUST_IS_PARTIAL_CHAIN 0x00010000) for allext.cer
  2551. @rem Given different AIA config parameters we will get different
  2552. @rem debugger output error messages
  2553. @rem
  2554. @rem ensure CTL containing any test CA certs is removed
  2555. %_CDB_% tfindctl -LUpdateCtl1 -s reg:trust -d -q >> regress.out
  2556. %_CDB_% tfindctl -LUpdateCtl2 -s reg:trust -d -q >> regress.out
  2557. @rem Exceeded MaxAIAUrlCountInCert
  2558. %_CDB_% ttrust allext.cer -chain -e0x10000 >> regress.out
  2559. @rem Exceeded MaxUrlRetrievalByteCount for: http://crl.verisign.com/class1.crl
  2560. @rem Invalid AIA content, no caching: http://crl.microsoft.com/pki/crl/products/CodeSignPCA.crl
  2561. %_CDB_% ttrust allext.cer -chain -e0x10000 -MaxAIAUrlCountInCert 15 >> regress.out
  2562. @rem Exceeded MaxAIAUrlRetrievalCountPerChain
  2563. %_CDB_% ttrust allext.cer -chain -e0x10000 -MaxAIAUrlCountInCert 15 -MaxAIAUrlRetrievalCountPerChain 6 >> regress.out
  2564. @rem restore defaults
  2565. ttrust -DisableAIAUrlRetrieval 0xFFFFFFFF -MaxAIAUrlCountInCert 0xFFFFFFFF -MaxAIAUrlRetrievalCountPerChain 0xFFFFFFFF -MaxAIAUrlRetrievalByteCount 0xFFFFFFFF -MaxAIAUrlRetrievalCertCount 0xFFFFFFFF -RegistryOnlyExit >> regress.out
  2566. @rem ensure the VBL03CA cert isn't in any system store. Want to force
  2567. @rem AIA retrieval
  2568. %_CDB_% tfindcer -s ep:ca -S -a"Microsoft Windows VBL03CA" -d >> regress.out
  2569. %_CDB_% tfindcer -s lm:reg:ca -S -a"Microsoft Windows VBL03CA" -d >> regress.out
  2570. %_CDB_% tfindcer -s reg:ca -S -a"Microsoft Windows VBL03CA" -d >> regress.out
  2571. %_CDB_% tfindcer -s ca -S -a"Microsoft Windows VBL03CA" >> regress.out
  2572. @rem the following should fetch the cert and store in the cache. Since
  2573. @rem not able to build a chain, shouldn't be installed in the CA store
  2574. %_CDB_% turlcache "20VBL03CA.crt" -d >> regress.out
  2575. %_CDB_% ttrust kevin.cer -chain -e0x10000 >> regress.out
  2576. %_CDB_% turlcache "20VBL03CA.crt" -1 >> regress.out
  2577. @rem the CA certificate shouldn't be in the CA store
  2578. %_CDB_% tfindcer -s ca -S -a"Microsoft Windows VBL03CA" >> regress.out
  2579. @rem ensure the test root is installed
  2580. %_CDB_% tstore -s lm:reg:root -avbl03AIAroot.cer >> regress.out
  2581. %_CDB_% turlcache "20VBL03CA.crt" -d >> regress.out
  2582. %_CDB_% ttrust vbl03AIAend.cer -chain -e0x10000 -DisableAIAUrlRetrieval 1 >> regress.out
  2583. @rem the CA certificate shouldn't be in the CA store
  2584. %_CDB_% tfindcer -s ca -S -a"Microsoft Windows VBL03CA" >> regress.out
  2585. @rem Exceeded MaxUrlRetrievalByteCount for: Ldap Url
  2586. @rem Exceeded MaxUrlRetrievalByteCount for: http://vbl03ca.ntdev.microsoft.com/CertEnroll/vbl03ca.ntdev.microsoft.com_Microsoft%20Windows%20VBL03CA.crt
  2587. %_CDB_% ttrust vbl03AIAend.cer -chain -e0x10000 -MaxAIAUrlRetrievalByteCount 100 -DisableAIAUrlRetrieval 0xFFFFFFFF >> regress.out
  2588. @rem the CA certificate shouldn't be added to the CA store
  2589. %_CDB_% tfindcer -s ca -S -a"Microsoft Windows VBL03CA" >> regress.out
  2590. %_CDB_% ttrust vbl03AIAend.cer -chain -e0x0 -MaxAIAUrlRetrievalByteCount 0xFFFFFFFF >> regress.out
  2591. @rem the CA certificate should be added to the CA store
  2592. %_CDB_% tfindcer -s ca -S -a"Microsoft Windows VBL03CA" >> regress.out
  2593. @rem
  2594. @rem Test AIA URL retrieval
  2595. @rem
  2596. if exist testAIACA.p7b del testAIACA.p7b
  2597. %_CDB_% tfindcer -s reg:ca "TestAIA" -d >> regress.out
  2598. %_CDB_% tfindcer -s lm:reg:root "TestAIA" -d >> regress.out
  2599. if exist testAIA.store del testAIA.store
  2600. %_CDB_% tcopycer %store% testAIA.store >> regress.out
  2601. %_CDB_% tfindcer testAIA.store TestAIARoot -ptestAIAroot.cer >> regress.out
  2602. %_CDB_% tfindcer testAIA.store TestAIAEnd -ptestAIAend.cer >> regress.out
  2603. %_CDB_% tfindcer testAIA.store -I TestAIARoot -d >> regress.out
  2604. %_CDB_% tfindcer testAIA.store -I TestAIAExpireRoot -d >> regress.out
  2605. %_CDB_% tfindcer testAIA.store TestAIACA -ptestAIACArevoke.cer >> regress.out
  2606. if exist testAIA.store del testAIA.store
  2607. %_CDB_% tcopycer %store% testAIA.store >> regress.out
  2608. %_CDB_% tfindcer testAIA.store -I TestAIARoot -d >> regress.out
  2609. %_CDB_% tfindcer testAIA.store -I TestAIARevokeRoot -d >> regress.out
  2610. %_CDB_% tfindcer testAIA.store TestAIACA -ptestAIACAexpire.cer >> regress.out
  2611. if exist testAIA.store del testAIA.store
  2612. %_CDB_% tcopycer %store% testAIA.store >> regress.out
  2613. %_CDB_% tfindcer testAIA.store -I TestAIARevokeRoot -d >> regress.out
  2614. %_CDB_% tfindcer testAIA.store -I TestAIAExpireRoot -d >> regress.out
  2615. %_CDB_% tfindcer testAIA.store TestAIACA -ptestAIACAgood.cer >> regress.out
  2616. if exist testAIA.store del testAIA.store
  2617. %_CDB_% tcopycer %store% testAIA.store >> regress.out
  2618. %_CDB_% tfindcer testAIA.store TestAIACA -d >> regress.out
  2619. @rem CERT_TRUST_IS_PARTIAL_CHAIN
  2620. %_CDB_% ttrust testAIAend.cer -StestAIA.store -chain -e0x10000 -i0x0 >> regress.out
  2621. %_CDB_% tstore testAIACA.p7b -atestAIACArevoke.cer -7 >> regress.out
  2622. @rem CERT_TRUST_INVALID_BASIC_CONSTRAINTS
  2623. @rem CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_HAS_PREFERRED_ISSUER
  2624. %_CDB_% ttrust testAIAend.cer -StestAIA.store -chain -e0x420 -i0x100 >> regress.out
  2625. @rem CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_REVOCATION_STATUS_UNKNOWN,
  2626. @rem CERT_TRUST_IS_OFFLINE_REVOCATION, CERT_TRUST_HAS_PREFERRED_ISSUER
  2627. %_CDB_% ttrust testAIAend.cer -StestAIA.store -chain -f0x20000000 -e0x1000460 -i0x100 >> regress.out
  2628. %_CDB_% tstore testAIACA.p7b -atestAIACAgood.cer -7 >> regress.out
  2629. @rem CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_REVOCATION_STATUS_UNKNOWN,
  2630. @rem CERT_TRUST_IS_OFFLINE_REVOCATION, CERT_TRUST_HAS_PREFERRED_ISSUER
  2631. %_CDB_% ttrust testAIAend.cer -StestAIA.store -chain -f0x20000000 -e0x1000460 -i0x100 >> regress.out
  2632. %_CDB_% tfindcer -s reg:ca "TestAIA" -d >> regress.out
  2633. %_CDB_% tfindcer -s reg:ca -I TestAIARoot -d >> regress.out
  2634. if exist testAIACA.p7b del testAIACA.p7b
  2635. %_CDB_% tstore testAIACA.p7b -atestAIACAexpire.cer -7 >> regress.out
  2636. @rem CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_IS_NOT_TIME_VALID,
  2637. @rem CERT_TRUST_REVOCATION_STATUS_UNKNOWN,
  2638. @rem CERT_TRUST_IS_OFFLINE_REVOCATION,
  2639. @rem CERT_TRUST_HAS_PREFERRED_ISSUER
  2640. %_CDB_% ttrust testAIAend.cer -StestAIA.store -chain -f0x20000000 -e0x1000461 -i0x100 >> regress.out
  2641. %_CDB_% tstore testAIACA.p7b -atestAIACAgood.cer -7 >> regress.out
  2642. @rem CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_REVOCATION_STATUS_UNKNOWN,
  2643. @rem CERT_TRUST_IS_OFFLINE_REVOCATION, CERT_TRUST_HAS_PREFERRED_ISSUER
  2644. %_CDB_% ttrust testAIAend.cer -StestAIA.store -chain -f0x20000000 -e0x1000460 -i0x100 >> regress.out
  2645. %_CDB_% tfindcer -s reg:ca "TestAIA" >> regress.out
  2646. %_CDB_% tfindcer -s reg:ca -I TestAIARoot -d >> regress.out
  2647. @rem Invalid File(TestAIACA.p7b):: Attributes: 0x20 Size: 761
  2648. %_CDB_% ttrust testAIAend.cer -chain -e0x10000 -MaxAIAUrlRetrievalByteCount 100 >> regress.out
  2649. @rem Exceeded MaxAIAUrlRetrievalCertCount
  2650. %_CDB_% ttrust testAIAend.cer -chain -e0x10000 -MaxAIAUrlRetrievalByteCount 0xFFFFFFFF -MaxAIAUrlRetrievalCertCount 1 >> regress.out
  2651. @rem Install the TestAIA's root
  2652. %_CDB_% tstore -s lm:reg:root -atestAIAroot.cer >> regress.out
  2653. @rem Exceeded MaxAIAUrlRetrievalCertCount
  2654. %_CDB_% ttrust testAIAend.cer -chain -e0x10000 -MaxAIAUrlRetrievalByteCount 0xFFFFFFFF -MaxAIAUrlRetrievalCertCount 1 >> regress.out
  2655. %_CDB_% tfindcer -s reg:ca "TestAIA" -d >> regress.out
  2656. %_CDB_% ttrust testAIAend.cer -chain -e0x400 -MaxAIAUrlRetrievalByteCount 0xFFFFFFFF -MaxAIAUrlRetrievalCertCount 0xFFFFFFFF >> regress.out
  2657. @rem should be a certificate in the CA store
  2658. %_CDB_% tfindcer -s reg:ca "TestAIA" >> regress.out
  2659. @rem
  2660. @rem Revocation of a CA. Shouldn't do revocation checking for certs
  2661. @rem lower in the chain.
  2662. @rem
  2663. @rem with trusted root and revocation of a CA cert
  2664. @rem CERT_TRUST_IS_OFFLINE_REVOCATION,
  2665. @rem CERT_TRUST_REVOCATION_STATUS_UNKNOWN,
  2666. @rem CERT_TRUST_IS_REVOKED
  2667. %_CDB_% tfindcer nt.store -S -aNetscape -pnetescapeend.cer >> regress.out
  2668. %_CDB_% ttrust netescapeend.cer -chain -Snt.store -f0x20000000 -e0x1000044 >> regress.out
  2669. @rem with untrusted root and revocation of a CA cert, no rev check
  2670. @rem CERT_TRUST_IS_OFFLINE_REVOCATION,
  2671. @rem CERT_TRUST_REVOCATION_STATUS_UNKNOWN,
  2672. @rem CERT_TRUST_IS_UNTRUSTED_ROOT
  2673. %_CDB_% tfindcer -s lm:reg:root "TestAIA" -d >> regress.out
  2674. %_CDB_% ttrust netescapeend.cer -chain -Snt.store -f0x20000000 -e0x1000060 >> regress.out
  2675. @rem
  2676. @rem Test Rollover URL retrieval
  2677. @rem
  2678. if exist rolloverAIAroot.p7b del rolloverAIAroot.p7b
  2679. if exist rollover.store del rollover.store
  2680. %_CDB_% tfindcer -s ca Rollover -d >> regress.out
  2681. %_CDB_% tstore2 -P rollover.store >> regress.out
  2682. %_CDB_% tcopycer rollover.store rolloverAIAroot.p7b -7 -aRolloverRoot >> regress.out
  2683. %_CDB_% tfindcer rolloverAIAroot.p7b -I TestRoot -prollovercross.cer >> regress.out
  2684. %_CDB_% tfindcer rolloverAIAroot.p7b -I TestRoot -d -7 >> regress.out
  2685. %_CDB_% tstore rolloverAIAroot.p7b -i0 -prollovermap.cer >> regress.out
  2686. %_CDB_% tstore rolloverAIAroot.p7b -i1 -prolloverroot.cer >> regress.out
  2687. %_CDB_% tfindcer rollover.store TestRoot -pTestRoot.cer >> regress.out
  2688. %_CDB_% tfindcer rollover.store RollOverEnd -prolloverend.cer >> regress.out
  2689. %_CDB_% tfindcer rollover.store RollOverRoot -d >> regress.out
  2690. %_CDB_% tstore rollover.store -arolloverroot.cer >> regress.out
  2691. @rem following should be untrusted root using the original RollOverRoot
  2692. %_CDB_% ttrust rolloverend.cer -Srollover.store -chain -e0x420 -i0x100 >> regress.out
  2693. %_CDB_% tstore -s lm:root -aTestRoot.cer >> regress.out
  2694. %_CDB_% tstore -s ca -arollovercross.cer >> regress.out
  2695. %_CDB_% tfindcer -s ca Rollover >> regress.out
  2696. @rem following should do AIA retrieval to get the rollovermap.cer
  2697. %_CDB_% ttrust rolloverend.cer -Srollover.store -chain -e0x400 -i0x100 >> regress.out
  2698. @rem rollovermap.cer should be added. Not, rolloverroot.cer
  2699. %_CDB_% tfindcer -s ca Rollover >> regress.out
  2700. %_CDB_% tfindcer -s lm:root -S -o2.5.4.3 -aTestRoot -d >> regress.out
  2701. @rem
  2702. @rem time invalid chain (end cert is time invalid)
  2703. @rem
  2704. %_CDB_% tfindcer %store% "time invalid" -ptimeinvalid.cer -b >> regress.out
  2705. @rem CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_IS_NOT_TIME_VALID,
  2706. @rem CERT_TRUST_HAS_PREFERRED_ISSUER, CERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY,
  2707. @rem CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS
  2708. %_CDB_% ttrust timeinvalid.cer -S%store% -chain -e0x21 -i0x700 >> regress.out
  2709. @rem
  2710. @rem test Cross Cert Distribution Point and CTL's with NextUpdate time
  2711. @rem and location
  2712. @rem
  2713. if exist %UNC_PREFIX%\tmp.store del %UNC_PREFIX%\tmp.store
  2714. if exist testupdate1.ctl del testupdate1.ctl
  2715. if exist testupdate2.ctl del testupdate2.ctl
  2716. %_CDB_% tfindctl -LUpdateCtl1 -s reg:trust -d -q >> regress.out
  2717. %_CDB_% tfindctl -LUpdateCtl2 -s reg:trust -d -q >> regress.out
  2718. %_CDB_% turlcache -d file://%UNC_PREFIX%\tmp.store >> regress.out
  2719. %_CDB_% tstore %UNC_PREFIX%\tmp.store -aallext.cer >> regress.out
  2720. %_CDB_% ttrust vsgood.cer -q0x800b0101 >> regress.out
  2721. %_CDB_% turlcache -0 file://%UNC_PREFIX%\tmp.store >> regress.out
  2722. @rem Cross Cert Distribution Point are only valid for HKLM certs
  2723. %_CDB_% tstore -s reg:ca -arooto.cer >> regress.out
  2724. %_CDB_% tfindcer -s reg:ca "root agency" -x3600 -xfile://nonexistant1.cer -Xfile://nonexistant2.cer -Xfile://%UNC_PREFIX%\tmp.store -Xfile://nonexistant3.cer -xfile://noexistant4.cer -xfile://%store% -v >> regress.out
  2725. %_CDB_% ttrust vsgood.cer -q0x800b0101 >> regress.out
  2726. %_CDB_% turlcache -0 file://%UNC_PREFIX%\tmp.store >> regress.out
  2727. %_CDB_% tfindcer -s reg:ca "root agency" -d >> regress.out
  2728. %_CDB_% tfindcer -s lm:ca "root agency" -x3600 -xfile://nonexistant1.cer -Xfile://nonexistant2.cer -Xfile://%UNC_PREFIX%\tmp.store -Xfile://nonexistant3.cer -xfile://noexistant4.cer -xfile://%store% -v >> regress.out
  2729. %_CDB_% ttrust vsgood.cer -q0x800b0101 >> regress.out
  2730. %_CDB_% turlcache -1 file://%UNC_PREFIX%\tmp.store >> regress.out
  2731. %_CDB_% ttrust vsgood.cer -q0x800b0101 >> regress.out
  2732. %_CDB_% turlcache -1 file://%UNC_PREFIX%\tmp.store >> regress.out
  2733. @rem set sync time back 2 hours. This should force a resync
  2734. %_CDB_% turlcache -1 -S-7200 file://%UNC_PREFIX%\tmp.store >> regress.out
  2735. %_CDB_% turlcache -1 file://%UNC_PREFIX%\tmp.store >> regress.out
  2736. %_CDB_% ttrust vsgood.cer -q0x800b0101 >> regress.out
  2737. %_CDB_% turlcache -1 file://%UNC_PREFIX%\tmp.store >> regress.out
  2738. @rem remove Distribution point from Url store
  2739. %_CDB_% tstore %UNC_PREFIX%\tmp.store -dAll >> regress.out
  2740. %_CDB_% turlcache -1 -S-7200 file://%UNC_PREFIX%\tmp.store >> regress.out
  2741. %_CDB_% turlcache -1 file://%UNC_PREFIX%\tmp.store >> regress.out
  2742. %_CDB_% ttrust vsgood.cer -q0x800b0101 >> regress.out
  2743. %_CDB_% turlcache -1 file://%UNC_PREFIX%\tmp.store >> regress.out
  2744. @rem Add Distribution point to Url store
  2745. %_CDB_% tstore %UNC_PREFIX%\tmp.store -aallext.cer >> regress.out
  2746. %_CDB_% turlcache -1 -S-7200 file://%UNC_PREFIX%\tmp.store >> regress.out
  2747. %_CDB_% turlcache -1 file://%UNC_PREFIX%\tmp.store >> regress.out
  2748. %_CDB_% ttrust vsgood.cer -q0x800b0101 >> regress.out
  2749. %_CDB_% turlcache -1 file://%UNC_PREFIX%\tmp.store >> regress.out
  2750. @rem
  2751. @rem 06-May-02: updated chain building not to do CTL Next Update
  2752. @rem retrieval. Therefore, shouldn't see the time valid CTL's added to
  2753. @rem the reg:trust store.
  2754. @rem
  2755. @rem time invalid CTL without an URL
  2756. %_CDB_% tfindctl %store% -LUpdateCtl1 -fTimeInvalid -ptestupdate1.ctl -q >> regress.out
  2757. %_CDB_% tstore -s reg:trust -T -atestupdate1.ctl >> regress.out
  2758. del testupdate1.ctl
  2759. %_CDB_% ttrust vsgood.cer -q0x800b0101 >> regress.out
  2760. @rem time invalid CTL with time invalid URL
  2761. %_CDB_% tfindctl %store% -LUpdateCtl1 -fTimeInvalid -ptestupdate1.ctl >> regress.out
  2762. %_CDB_% ttrust vsgood.cer -q0x800b0101 >> regress.out
  2763. @rem time invalid CTL with time valid URL
  2764. %_CDB_% tfindctl %store% -LUpdateCtl1 -fTimeValid -ptestupdate1.ctl >> regress.out
  2765. %_CDB_% tstore -s reg:Trust -T >> regress.out
  2766. %_CDB_% ttrust vsgood.cer -q0x800b0101 >> regress.out
  2767. %_CDB_% tstore -s reg:Trust -T >> regress.out
  2768. @rem 2 time invalid CTLs with time valid URLs
  2769. %_CDB_% tfindctl -LUpdateCtl1 -s reg:trust -d -q >> regress.out
  2770. %_CDB_% tfindctl %store% -LUpdateCtl1 -fTimeInvalid -ptestupdate1.ctl -q >> regress.out
  2771. %_CDB_% tstore -s reg:trust -T -atestupdate1.ctl >> regress.out
  2772. %_CDB_% tfindctl %store% -LUpdateCtl1 -fTimeValid -ptestupdate1.ctl >> regress.out
  2773. %_CDB_% tfindctl %store% -LUpdateCtl2 -fTimeInvalid -ptestupdate2.ctl -q >> regress.out
  2774. %_CDB_% tstore -s reg:trust -T -atestupdate2.ctl >> regress.out
  2775. %_CDB_% tfindctl %store% -LUpdateCtl2 -fTimeValid -ptestupdate2.ctl >> regress.out
  2776. %_CDB_% tstore -s reg:Trust -T >> regress.out
  2777. %_CDB_% ttrust vsgood.cer -q0x800b0101 >> regress.out
  2778. %_CDB_% tstore -s reg:Trust -T >> regress.out
  2779. %_CDB_% tfindctl -LUpdateCtl1 -s reg:trust -d -q >> regress.out
  2780. %_CDB_% tfindctl -LUpdateCtl2 -s reg:trust -d -q >> regress.out
  2781. %_CDB_% tfindcer -s lm:ca "root agency" -xDelete -v >> regress.out
  2782. @rem
  2783. @rem Trust the test root
  2784. @rem
  2785. %_CDB_% setreg -q 1 true >> ..\..\regress.out
  2786. @rem CERT_E_EXPIRED 0x800b0101
  2787. @rem CERT_E_VALIDITYPERIODNESTING 0x800b0102
  2788. @rem CERT_E_WRONG_USAGE 0x800b0110
  2789. @rem CERT_E_CN_NO_MATCH 0x800b010f
  2790. @rem CERT_E_ROLE 0x800b0103
  2791. @rem CERT_E_UNTRUSTEDTESTROOT 0x800b010d
  2792. @rem CERT_E_PURPOSE 0x800b0106
  2793. @rem TRUST_E_BASIC_CONSTRAINTS 0x80096019
  2794. @rem CERT_E_CHAINING 0x800b010a
  2795. @rem CERT_E_UNTRUSTEDROOT 0x800b0109
  2796. @rem CERT_E_UNTRUSTEDCA 0x800b0112
  2797. @rem TRUST_E_CERT_SIGNATURE 0x80096004
  2798. @rem TRUST_E_NOSIGNATURE 0x800b0100
  2799. @rem Match name as a DNS Name choice in an alternate name extension
  2800. %_CDB_% tfindcer %store% -S -q -a"all ext" -pallext.cer >> regress.out
  2801. %_CDB_% ttrust allext.cer -https -server -q -S%store% -HttpsIgnoreWrongUsage -HttpsIgnoreUnknownCA -n"DNS name" >> regress.out
  2802. %_CDB_% ttrust allext.cer -https -server -q0x800b010f -S%store% -HttpsIgnoreWrongUsage -HttpsIgnoreUnknownCA -n"DNS nameX" >> regress.out
  2803. @rem in allext.cer AltName has a DNS choice, therefore, don't look
  2804. @rem for CN in subject name
  2805. %_CDB_% ttrust allext.cer -https -server -q0x800b010f -S%store% -HttpsIgnoreWrongUsage -HttpsIgnoreUnknownCA -n"all ext" >> regress.out
  2806. @rem in kevin.cer AltName doesn't have a DNS choice, therefore, look
  2807. @rem for CN in subject name
  2808. %_CDB_% ttrust kevin.cer -https -server -q -S%store% -HttpsIgnoreWrongUsage -HttpsIgnoreUnknownCA -n"kevin" >> regress.out
  2809. %_CDB_% ttrust kevin.cer -https -server -q0x800b010f -S%store% -HttpsIgnoreWrongUsage -HttpsIgnoreUnknownCA -n"kevin2" >> regress.out
  2810. @rem in dssend.cer doesn't have an AltName extension, therefore, look
  2811. @rem for CN in subject name
  2812. %_CDB_% ttrust dssend.cer -DisableMandatoryBasicConstraints 1 -https -server -q -S%store% -HttpsIgnoreWrongUsage -HttpsIgnoreUnknownCA -n"dssend" >> regress.out
  2813. %_CDB_% ttrust dssend.cer -https -server -q0x800b010f -S%store% -HttpsIgnoreWrongUsage -HttpsIgnoreUnknownCA -n"not dssend" >> regress.out
  2814. %_CDB_% ttrust dssend.cer -DisableMandatoryBasicConstraints 0xFFFFFFFF -https -server -q0x800b0103 -S%store% -HttpsIgnoreWrongUsage -HttpsIgnoreUnknownCA -n"dssend" >> regress.out
  2815. %_CDB_% ttrust dssend.cer -https -server -q0x800b0103 -S%store% -HttpsIgnoreWrongUsage -HttpsIgnoreUnknownCA -n"not dssend" >> regress.out
  2816. @rem not permitted, not supported name constraint
  2817. %_CDB_% ttrust notpermitted.cer -https -server -q0x800b010f -S%store% -HttpsIgnoreWrongUsage -HttpsIgnoreUnknownCA -n"www.excluded.dns.not" >> regress.out
  2818. @rem not excluded name constraint
  2819. %_CDB_% ttrust excluded.cer -https -server -q0x800b010f -S%store% -HttpsIgnoreWrongUsage -HttpsIgnoreUnknownCA -n"www.excluded.dns.com" >> regress.out
  2820. @rem not permitted name constraint. Also has an
  2821. @rem invalid policy constraint. For https, mapped to CERT_E_PURPOSE
  2822. %_CDB_% ttrust duplicate1.cer -https -server -q0x800b010f -S%store% -HttpsIgnoreWrongUsage -HttpsIgnoreUnknownCA >> regress.out
  2823. %_CDB_% ttrust duplicate1.cer -https -server -q0x800b0106 -S%store% -HttpsIgnoreWrongUsage -HttpsIgnoreUnknownCA -HttpsIgnoreCertCNInvalid >> regress.out
  2824. @rem without an additional store, use the AuthorityInfoAccess extension
  2825. @rem to find the issuer certificate. In this case, none of the URLs
  2826. @rem exist
  2827. %_CDB_% ttrust allext.cer -q0x800b010a >> regress.out
  2828. @rem test CryptInstallDefaultContext
  2829. %_CDB_% ttrust dss1024.cer -q0x800b0109 >> regress.out
  2830. %_CDB_% ttrust dss1024.cer -q0x800b0109 -InstallThreadDefaultContext >> regress.out
  2831. %_CDB_% ttrust dss1024.cer -q0x80096004 -InstallThreadDefaultContext -NullDefaultContext >> regress.out
  2832. @rem Test NTAuthNameConstraint policy
  2833. @rem CERT_E_UNTRUSTEDCA 0x800b0112
  2834. @rem TRUST_E_BASIC_CONSTRAINTS 0x80096019
  2835. @rem allext.cer has valid name constraints, dssend.cer doesn't
  2836. @rem -NTAuthNameConstraint sets CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG
  2837. %_CDB_% ttrust -DisableNTAuthRequired -chain -NTAuthNameConstraint allext.cer -q -S%store% >> regress.out
  2838. %_CDB_% ttrust -EnableNTAuthRequired -chain -NTAuthNameConstraint allext.cer -q0x800b0112 -S%store% >> regress.out
  2839. %_CDB_% ttrust -DisableMandatoryBasicConstraints 1 -DisableNTAuthRequired -chain -NTAuthNameConstraint dssend.cer -q0x800b0112 -S%store% >> regress.out
  2840. %_CDB_% ttrust -EnableNTAuthRequired -chain -NTAuthNameConstraint dssend.cer -q0x800b0112 -S%store% >> regress.out
  2841. %_CDB_% ttrust -DisableMandatoryBasicConstraints 0xFFFFFFFF -DisableNTAuthRequired -chain -NTAuthNameConstraint dssend.cer -q0x80096019 -S%store% >> regress.out
  2842. %_CDB_% ttrust -EnableNTAuthRequired -chain -NTAuthNameConstraint dssend.cer -q0x80096019 -S%store% >> regress.out
  2843. @cd ttrust\testfile
  2844. @rem driver and https no longer use setreg's trust test root
  2845. @rem driver no requires it to be the Microsoft root or the Microsoft
  2846. @rem test root
  2847. %_CDB_% ttrust indasind.cab -q0x800b0109 -driver >> ..\..\regress.out
  2848. %_CDB_% ttrust comend3.cer -Scomend3.spc -q0x800b0109 -https -server -HttpsIgnoreWrongUsage >> ..\..\regress.out
  2849. @rem explicitly trust the "Root Agency" testroot
  2850. %_CDB_% tstore -s lm:root -a..\..\rooto.cer >> ..\..\regress.out
  2851. @rem Test CertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_MICROSOFT_ROOT)
  2852. %_CDB_% ttrust -chain -e0x0 -NotMicrosoftRoot ..\..\rooto.cer >> ..\..\regress.out
  2853. %_CDB_% ttrust -chain -e0x1 -NotMicrosoftRoot ..\..\vsgood.cer >> ..\..\regress.out
  2854. %_CDB_% ttrust -chain -e0x0 -MicrosoftRoot msroot01.cer >> ..\..\regress.out
  2855. %_CDB_% ttrust timestmp.dll -q -file -DisplayKnownUsages >> ..\..\regress.out
  2856. %_CDB_% ttrust timestmp.dll -q -file -chain >> ..\..\regress.out
  2857. @rem with LifetimeSigning, timestamped signatures can expire
  2858. %_CDB_% ttrust timestmp.dll -q0x800b0101 -file -LifetimeSigning >> ..\..\regress.out
  2859. @rem following timestamped cab, also has LIFTIME_SIGNING OID
  2860. %_CDB_% ttrust lifetime.cab -q0x800b0101 -file >> ..\..\regress.out
  2861. @rem following certs are valid before timestamp.
  2862. @rem First also has LIFETIME_SIGNING OID
  2863. %_CDB_% ttrust beforets.cab -q0x800b0101 -file >> ..\..\regress.out
  2864. %_CDB_% ttrust beforets2.cab -q0x800b0101 -file >> ..\..\regress.out
  2865. @rem following certs are valid after timestamp. Should be valid now
  2866. @rem First also has LIFETIME_SIGNING OID
  2867. %_CDB_% ttrust afterts.cab -q0x800b0101 -file >> ..\..\regress.out
  2868. %_CDB_% ttrust afterts2.cab -q0x800b0101 -file >> ..\..\regress.out
  2869. %_CDB_% ttrust indasind.cab -q -file >> ..\..\regress.out
  2870. %_CDB_% ttrust indasind.cab -q -file -chain >> ..\..\regress.out
  2871. %_CDB_% ttrust indasind.cab -q0x800b0109 -driver >> ..\..\regress.out
  2872. @rem individual cert signed as being commercial
  2873. @rem July 30, 2000 removed all the individual, commerical comparison junk
  2874. %_CDB_% ttrust indascom.cab -q -file >> ..\..\regress.out
  2875. %_CDB_% ttrust indascom.cab -q -file -chain >> ..\..\regress.out
  2876. @rem commercial cert signed as being individual
  2877. %_CDB_% ttrust comasind.cab -q -file >> ..\..\regress.out
  2878. @rem commercial cert issued by individual CA
  2879. %_CDB_% ttrust comend2.cer -Scomend2.spc -q >> ..\..\regress.out
  2880. @rem signed by commercial cert issued by individual CA
  2881. %_CDB_% ttrust indissue.cab -q -file >> ..\..\regress.out
  2882. @rem following was signed using a CA certificate
  2883. %_CDB_% ttrust notend.cab -q0x80096019 -file >> ..\..\regress.out
  2884. @rem Note, not a BASIC_CONSTRAINTS error to verify chain starting with CA
  2885. %_CDB_% ttrust indca.cer -q >> ..\..\regress.out
  2886. %_CDB_% ttrust comca.cer -q >> ..\..\regress.out
  2887. @rem Intermediate cert had a max depth of 0
  2888. %_CDB_% ttrust comend3.cer -Scomend3.spc -q0x80096019 >> ..\..\regress.out
  2889. %_CDB_% ttrust pathlen.cab -q0x80096019 -file >> ..\..\regress.out
  2890. %_CDB_% ttrust comend3.cer -q0x800b010a >> ..\..\regress.out
  2891. @rem https policy converts to CERT_E_ROLE
  2892. %_CDB_% ttrust comend3.cer -Scomend3.spc -q0x800b0103 -https -server -HttpsIgnoreWrongUsage >> ..\..\regress.out
  2893. @rem End certificate signing another certificate
  2894. %_CDB_% ttrust end2.cer -Send.spc -q0x80096019 >> ..\..\regress.out
  2895. @rem Sign with an email certificate (wrong usage)
  2896. %_CDB_% ttrust email.cer -q0x800b0110 >> ..\..\regress.out
  2897. %_CDB_% ttrust email.cer -u1.3.6.1.5.5.7.3.4 -q >>..\..\regress.out
  2898. %_CDB_% ttrust email.cab -q0x800b0110 -file >> ..\..\regress.out
  2899. @rem Code Signing EKU cert signed as being individual
  2900. %_CDB_% ttrust csasind.cab -q -file >> ..\..\regress.out
  2901. @rem Code Signing EKU cert signed as being commercial
  2902. %_CDB_% ttrust csascom.cab -q -file >> ..\..\regress.out
  2903. @rem Commercial EKU cert issued by CodeSigning EKU CA
  2904. %_CDB_% ttrust comend4.cer -Scomend4.spc -q >> ..\..\regress.out
  2905. %_CDB_% ttrust comend4.cer -q0x800b010a >> ..\..\regress.out
  2906. %_CDB_% ttrust csissue.cab -q -file >> ..\..\regress.out
  2907. @rem Commercial EKU cert issued by Commercial EKU CA
  2908. %_CDB_% ttrust comend5.cer -Scomend5.spc -q >> ..\..\regress.out
  2909. %_CDB_% ttrust comcsiss.cab -q -file >> ..\..\regress.out
  2910. @rem Commercial EKU cert issued by Individual EKU CA
  2911. %_CDB_% ttrust comend6.cer -Scomend6.spc -q >> ..\..\regress.out
  2912. %_CDB_% ttrust indcsiss.cab -q -file >> ..\..\regress.out
  2913. %_CDB_% ttrust expired.cer -q0x800b0101 >> ..\..\regress.out
  2914. %_CDB_% ttrust expired.cer -chain -q0x800b0101 >> ..\..\regress.out
  2915. %_CDB_% ttrust expired.cer -https -q0x800b0101 >> ..\..\regress.out
  2916. %_CDB_% ttrust expired.cer -https -q -HttpsIgnoreCertDateInvalid >> ..\..\regress.out
  2917. @rem on Sep 10, 1998 disabled time nesting checking in authenticode and
  2918. @rem and SSL chain policy (-q0x800b0102)
  2919. %_CDB_% ttrust timenest.cer -q >> ..\..\regress.out
  2920. %_CDB_% ttrust timenest.cer -chain -q >> ..\..\regress.out
  2921. %_CDB_% ttrust timenest.cer -https -q >> ..\..\regress.out
  2922. %_CDB_% ttrust timenest.cer -https -q -HttpsIgnoreCertDateInvalid >> ..\..\regress.out
  2923. %_CDB_% ttrust client.cer -cert -q0x800b0110 >> ..\..\regress.out
  2924. %_CDB_% ttrust client.cer -chain -q >> ..\..\regress.out
  2925. %_CDB_% ttrust client.cer -chain -u1.2.3.4 -q0x800b0110 >> ..\..\regress.out
  2926. %_CDB_% ttrust client.cer -https -client -q >> ..\..\regress.out
  2927. %_CDB_% ttrust client.cer -https -server -q0x800b0110 >> ..\..\regress.out
  2928. %_CDB_% ttrust client.cer -https -server -q -HttpsIgnoreWrongUsage >> ..\..\regress.out
  2929. %_CDB_% ttrust client.cer -https -server -q -HttpsIgnoreWrongUsage -HttpsIgnoreUnknownCA >> ..\..\regress.out
  2930. %_CDB_% ttrust client.cer -https -client -q -nClient >> ..\..\regress.out
  2931. %_CDB_% ttrust client.cer -https -client -q -n"LDAP/LDAP/Client@MoreLDAP" >> ..\..\regress.out
  2932. %_CDB_% ttrust client.cer -https -client -q -n"LDAP/Client@MoreLDAP" >> ..\..\regress.out
  2933. %_CDB_% ttrust client.cer -https -client -q -n"////LDAP/Client@Mo@reL@DAP" >> ..\..\regress.out
  2934. %_CDB_% ttrust client.cer -https -client -q0x800b010f -nCleent >> ..\..\regress.out
  2935. %_CDB_% ttrust client.cer -https -client -q0x800b010f -nCleent -RevokeChain >> ..\..\regress.out
  2936. %_CDB_% ttrust client.cer -https -client -q -HttpsIgnoreCertCNInvalid -nCleent >> ..\..\regress.out
  2937. %_CDB_% ttrust server.cer -https -server -q >> ..\..\regress.out
  2938. %_CDB_% ttrust server.cer -https -client -q0x800b0110 >> ..\..\regress.out
  2939. %_CDB_% ttrust server.cer -https -client -q -HttpsIgnoreWrongUsage >> ..\..\regress.out
  2940. %_CDB_% ttrust server.cer -https -client -q -HttpsIgnoreWrongUsage -HttpsIgnoreUnknownCA >> ..\..\regress.out
  2941. %_CDB_% ttrust server.cer -https -server -q -nServer >> ..\..\regress.out
  2942. %_CDB_% ttrust server.cer -https -server -q0x800b010f -nServerx >> ..\..\regress.out
  2943. %_CDB_% ttrust server.cer -https -server -q -HttpsIgnoreCertCNInvalid -nServerx >> ..\..\regress.out
  2944. %_CDB_% ttrust sgc.cer -https -server -q >> ..\..\regress.out
  2945. %_CDB_% ttrust sgcnet.cer -https -server -q >> ..\..\regress.out
  2946. @rem test CryptInstallDefaultContext
  2947. %_CDB_% ttrust indca.cer -q -InstallThreadDefaultContext >> ..\..\regress.out
  2948. %_CDB_% ttrust indca.cer -q -InstallThreadDefaultContext -MultiDefaultContext >> ..\..\regress.out
  2949. %_CDB_% ttrust indca.cer -q -InstallThreadDefaultContext -MultiDefaultContext -AutoReleaseDefaultContext >> ..\..\regress.out
  2950. %_CDB_% ttrust indca.cer -q -InstallThreadDefaultContext -NULLDefaultContext >> ..\..\regress.out
  2951. %_CDB_% ttrust indca.cer -q -InstallProcessDefaultContext >> ..\..\regress.out
  2952. %_CDB_% ttrust indca.cer -q -InstallProcessDefaultContext -MultiDefaultContext >> ..\..\regress.out
  2953. %_CDB_% ttrust indca.cer -q -InstallProcessDefaultContext -MultiDefaultContext -AutoReleaseDefaultContext >> ..\..\regress.out
  2954. @rem Test NTAuth policy
  2955. %_CDB_% ttrust indasind.cab -q0x800b0112 -file -NTAuth >> ..\..\regress.out
  2956. %_CDB_% ttrust indasind.cab -q0x80092012 -file -NTAuth -RevokeChain >> ..\..\regress.out
  2957. %_CDB_% ttrust pathlen.cab -q0x80096019 -file -NTAuth >> ..\..\regress.out
  2958. %_CDB_% ttrust end2.cer -Send.spc -q0x80096019 -NTAuth >> ..\..\regress.out
  2959. %_CDB_% ttrust expired.cer -q0x800b0101 -NTAuth >> ..\..\regress.out
  2960. @rem Test Safer
  2961. @rem remove all TestSafer roots and trusted publishers
  2962. %_CDB_% tfindcer -s lm:TrustedPublisher TestSafer -d >> ..\..\regress.out
  2963. %_CDB_% tfindcer -s reg:TrustedPublisher TestSafer -d >> ..\..\regress.out
  2964. %_CDB_% tfindcer -s lm:Root TestSafer -d >> ..\..\regress.out
  2965. @rem remove all TestSafer disallowewd publishers
  2966. %_CDB_% tfindcer -s lm:Disallowed TestSafer -d >> ..\..\regress.out
  2967. %_CDB_% tfindcer -s reg:Disallowed TestSafer -d >> ..\..\regress.out
  2968. @rem TRUST_E_NO_SIGNATURE
  2969. %_CDB_% ttrust -file -Safer -DeleteSaferRegKey -q0x800b0100 torg2.cab >> ..\..\regress.out
  2970. @rem Safer maps TRUST_E_BAD_DIGEST to TRUST_E_NO_SIGNATURE
  2971. %_CDB_% ttrust -file -Safer -q0x800b0100 b_dig.cab >> ..\..\regress.out
  2972. @rem TRUST_E_BAD_DIGEST (without safer)
  2973. %_CDB_% ttrust -file -q0x80096010 b_dig.cab >> ..\..\regress.out
  2974. @rem TRUST_E_CERT_SIGNATURE
  2975. %_CDB_% ttrust -file -Safer -q0x80096004 bad_sign.cab >> ..\..\regress.out
  2976. @rem TRUST_E_COUNTER_SIGNER
  2977. %_CDB_% ttrust -file -Safer -q0x80096003 tscert.cab >> ..\..\regress.out
  2978. @rem CERT_E_UNTRUSTEDROOT
  2979. %_CDB_% ttrust -file -Safer -q0x800b0109 saferuntrusted.cab >> ..\..\regress.out
  2980. %_CDB_% ttrust -file -Safer -q0x800b0109 saferuntrusted2.cab >> ..\..\regress.out
  2981. %_CDB_% ttrust -file -Safer -q0x800b0109 saferuser.cab >> ..\..\regress.out
  2982. @rem explicitly trust publisher
  2983. %_CDB_% tstore -s reg:TrustedPublisher -asaferuser.cer >> ..\..\regress.out
  2984. @rem remains untrusted root
  2985. %_CDB_% ttrust -file -Safer -q0x800b0109 saferuser.cab >> ..\..\regress.out
  2986. %_CDB_% tfindcer -s reg:TrustedPublisher TestSafer -d >> ..\..\regress.out
  2987. %_CDB_% tstore -s lm:Root -asaferroot.cer >> ..\..\regress.out
  2988. @rem
  2989. @rem the safer certs have expired on 7/30/01. Therefore needed to change
  2990. @rem numerous expected errors to expired.
  2991. @rem
  2992. %_CDB_% ttrust -file -DeleteSaferRegKey -Safer -q0x800b0101 saferfull.cab >> ..\..\regress.out
  2993. @rem AuthenticodeFlags definitions
  2994. @rem CERT_TRUST_PUB_ALLOW_TRUST_MASK 0x00000003
  2995. @rem CERT_TRUST_PUB_ALLOW_END_USER_TRUST 0x00000000
  2996. @rem CERT_TRUST_PUB_ALLOW_MACHINE_ADMIN_TRUST 0x00000001
  2997. @rem CERT_TRUST_PUB_ALLOW_ENTERPRISE_ADMIN_TRUST 0x00000002
  2998. @rem CERT_TRUST_PUB_CHECK_PUBLISHER_REV_FLAG 0x00000100
  2999. @rem CERT_TRUST_PUB_CHECK_TIMESTAMP_REV_FLAG 0x00000200
  3000. @rem Expired overrides: CRYPT_E_SECURITY_SETTINGS, don't allow end user trust
  3001. %_CDB_% ttrust -file -Safer -AuthenticodeFlags 0x1 -q0x800b0101 saferfull.cab >> ..\..\regress.out
  3002. @rem both SAFER and default ignore NO_REVOCATION check
  3003. %_CDB_% ttrust -file -Safer -AuthenticodeFlags 0x300 -q0x800b0101 saferfull.cab >> ..\..\regress.out
  3004. %_CDB_% ttrust -file -AuthenticodeFlags 0x300 -q0x800b0101 saferfull.cab >> ..\..\regress.out
  3005. @rem explicitly trust publisher
  3006. %_CDB_% tstore -s reg:TrustedPublisher -asaferuser.cer >> ..\..\regress.out
  3007. %_CDB_% ttrust -file -Safer -AuthenticodeFlags 0x0 -q0x800b0101 saferuser.cab >> ..\..\regress.out
  3008. @rem Expired overrides: don't trust end user, should get CRYPT_E_SECURITY_SETTINGS
  3009. %_CDB_% ttrust -file -Safer -AuthenticodeFlags 0x1 -q0x800b0101 saferuser.cab >> ..\..\regress.out
  3010. @rem shouldn't appear in TrustedPublisher store
  3011. %_CDB_% tstore -s TrustedPublisher >> ..\..\regress.out
  3012. @rem explicitly distrust publisher
  3013. %_CDB_% tstore -s reg:Disallowed -asaferuser.cer >> ..\..\regress.out
  3014. %_CDB_% ttrust -file -Safer -AuthenticodeFlags 0x0 -q0x800b0111 saferuser.cab >> ..\..\regress.out
  3015. @rem should get TRUST_E_EXPLICIT_DISTRUST (0x800b0111) for all options
  3016. %_CDB_% ttrust -file -q0x800b0111 saferuser.cab >> ..\..\regress.out
  3017. %_CDB_% ttrust -q0x800b0111 saferuser.cer >> ..\..\regress.out
  3018. @rem Https will treat as CRYPT_E_REVOKED (0x80092010)
  3019. %_CDB_% ttrust -Https -q0x80092010 -Ssaferca.cer saferuser.cer >> ..\..\regress.out
  3020. @rem Chain will treat as CERT_E_REVOKED (0x800b010c)
  3021. %_CDB_% ttrust -Chain -q0x800b010c -Ssaferca.cer saferuser.cer >> ..\..\regress.out
  3022. @rem remove trusted publisher from CurrentUser and add to HKLM
  3023. %_CDB_% tfindcer -s reg:TrustedPublisher TestSafer -d >> ..\..\regress.out
  3024. %_CDB_% tfindcer -s reg:Disallowed TestSafer -d >> ..\..\regress.out
  3025. %_CDB_% tstore -s lm:TrustedPublisher -asaferuser.cer >> ..\..\regress.out
  3026. @rem Expired overrides: don't allow end user trust, however trusted in HKLM
  3027. %_CDB_% ttrust -file -Safer -AuthenticodeFlags 0x1 -q0x800b0101 saferuser.cab >> ..\..\regress.out
  3028. @rem Expired overrides: CRYPT_E_SECURITY_SETTINGS, don't allow machine trust
  3029. %_CDB_% ttrust -file -Safer -AuthenticodeFlags 0x2 -q0x800b0101 saferuser.cab >> ..\..\regress.out
  3030. @rem remove TestSafer stuff
  3031. %_CDB_% ttrust -file -Safer -DeleteSaferRegKey -q0x800b0100 torg2.cab >> ..\..\regress.out
  3032. %_CDB_% tfindcer -s lm:TrustedPublisher TestSafer -d >> ..\..\regress.out
  3033. %_CDB_% tfindcer -s reg:TrustedPublisher TestSafer -d >> ..\..\regress.out
  3034. %_CDB_% tfindcer -s lm:Root TestSafer -d >> ..\..\regress.out
  3035. %_CDB_% tfindcer -s lm:Disallowed TestSafer -d >> ..\..\regress.out
  3036. %_CDB_% tfindcer -s reg:Disallowed TestSafer -d >> ..\..\regress.out
  3037. @rem
  3038. @rem Test for cyclic
  3039. @rem
  3040. @rem CERT_TRUST_IS_CYCLIC 0x00000080
  3041. @rem CERT_TRUST_IS_PARTIAL_CHAIN 0x00010000
  3042. @rem
  3043. %_CDB_% ttrust -chain cycleend.cer -Scycle.p7b -e0x10080 >> ..\..\regress.out
  3044. @rem ensure the test root is removed
  3045. %_CDB_% tfindcer -S -s lm:root -a"Root Agency" -d >> ..\..\regress.out
  3046. @cd ..\..
  3047. :TrustDone
  3048. @rem ----------------------------------------------------------------
  3049. @rem KEYID
  3050. @rem ----------------------------------------------------------------
  3051. @if not %t%=="keyid" if not %t%=="all" goto KeyIdDone
  3052. if exist tmp.store del tmp.store
  3053. %_CDB_% tcopycer %store% tmp.store -aTestRecipient2 >> regress.out
  3054. %_CDB_% tsca -l tmp.store envelope -mtmp.msg -v >> regress.out
  3055. %_CDB_% tcopycer %store% tmp.store -aTestSigner2 >> regress.out
  3056. %_CDB_% tcopycer %store% tmp.store -aTestSigner >> regress.out
  3057. %_CDB_% tcopycer %store% tmp.store -aTestSigner3 >> regress.out
  3058. %_CDB_% tcopycer %store% tmp.store -aTestRecipient >> regress.out
  3059. %_CDB_% tstore tmp.store -b >> regress.out
  3060. %_CDB_% tfindcer -s archived:my TestSigner -d -q >> regress.out
  3061. %_CDB_% tfindcer -s archived:my TestRecipient -d -q >> regress.out
  3062. %_CDB_% tfindcer -s archived:lm:my TestSigner -d -q >> regress.out
  3063. %_CDB_% tfindcer -s archived:lm:my TestRecipient -d -q >> regress.out
  3064. %_CDB_% tcopycer tmp.store -s my >> regress.out
  3065. %_CDB_% tcopycer tmp.store -s lm:my >> regress.out
  3066. %_CDB_% tstore -s my -b >> regress.out
  3067. %_CDB_% tstore -s archived:my -b >> regress.out
  3068. %_CDB_% tstore -s lm:my -b >> regress.out
  3069. %_CDB_% tstore -s archived:lm:my -b >> regress.out
  3070. @rem CERT_STORE_MANIFOLD_FLAG 0x00000100
  3071. @rem CERT_STORE_ENUM_ARCHIVED_FLAG 0x00000200
  3072. %_CDB_% tstore tmp.store -b -f0x100 >> regress.out
  3073. %_CDB_% tstore tmp.store -f0x300 -S >> regress.out
  3074. %_CDB_% tstore tmp.store -b >> regress.out
  3075. %_CDB_% tstore tmp.store -b -f0x200 >> regress.out
  3076. %_CDB_% tsca -l tmp.store envelope -rtmp.msg -v >> regress.out
  3077. %_CDB_% tfindcer tmp.store TestSigner -ptestsign.cer >> regress.out
  3078. %_CDB_% tfindcer tmp.store TestRecipient -ptestxchg.cer >> regress.out
  3079. %_CDB_% tkeyid set -Stmp.store -ctestxchg.cer >> regress.out
  3080. %_CDB_% tkeyid set -Stmp.store -ctestsign.cer >> regress.out
  3081. %_CDB_% tkeyid enum -b >> regress.out
  3082. %_CDB_% tkeyid enum -v >> regress.out
  3083. %_CDB_% tkeyid delete -ctestxchg.cer -p20 >> regress.out
  3084. %_CDB_% tkeyid delete -ctestsign.cer -p4 >> regress.out
  3085. %_CDB_% tkeyid delete -ctestsign.cer -p3 >> regress.out
  3086. %_CDB_% tkeyid delete -ctestsign.cer -p15 >> regress.out
  3087. %_CDB_% tkeyid get -ctestxchg.cer -V >> regress.out
  3088. %_CDB_% tkeyid get -ctestsign.cer -V >> regress.out
  3089. %_CDB_% tfindcer -s archived:lm:my TestRecipient -d -q >> regress.out
  3090. if exist mach.store del mach.store
  3091. %_CDB_% tstore2 -M mach.store >> regress.out
  3092. %_CDB_% tfindcer mach.store -S -aTestRecipient -ptestxchg.cer >> regress.out
  3093. %_CDB_% tkeyid set -M -Smach.store -ctestxchg.cer >> regress.out
  3094. %_CDB_% tkeyid enum -M -b >> regress.out
  3095. %_CDB_% tkeyid enum -M -v >> regress.out
  3096. %_CDB_% tstore -s lm:my -atestxchg.cer >> regress.out
  3097. %_CDB_% tkeyid enum -M -v >> regress.out
  3098. %_CDB_% tkeyid delete -M -ctestxchg.cer -p20 >> regress.out
  3099. %_CDB_% tkeyid delete -M -ctestxchg.cer -p4 >> regress.out
  3100. %_CDB_% tkeyid get -M -ctestxchg.cer -V >> regress.out
  3101. %_CDB_% tkeyid get -M -ctestxchg.cer -V -p2 >> regress.out
  3102. %_CDB_% tkeyid get -M -ctestxchg.cer -V -p3 >> regress.out
  3103. :KeyIdDone
  3104. @rem ----------------------------------------------------------------
  3105. @rem URL
  3106. @rem ----------------------------------------------------------------
  3107. @if not %t%=="url" if not %t%=="all" goto UrlDone
  3108. %_CDB_% tcrobu "ldap://ntdev.microsoft.com/CN=Public Key Services,CN=Services,CN=Configuration,DC=ntdev,DC=microsoft,DC=com??sub" cert -m -k >> regress.out
  3109. %_CDB_% tcrobu "ldap://ntdev.microsoft.com/CN=Public Key Services,CN=Services,CN=Configuration,DC=ntdev,DC=microsoft,DC=com??sub" crl -m >> regress.out
  3110. %_CDB_% tcrobu "ldap://ntdev.microsoft.com/CN=Public Key Services,CN=Services,CN=Configuration,DC=ntdev,DC=microsoft,DC=com??sub" any -m -t 20000 >> regress.out
  3111. %_CDB_% tstore -s "prov:ldap:ldap://ntdev.microsoft.com/CN=Public Key Services,CN=Services,CN=Configuration,DC=ntdev,DC=microsoft,DC=com??sub" -f0x18000 >> regress.out
  3112. %_CDB_% tstore -R -s "prov:ldap:ldap://ntdev.microsoft.com/CN=Public Key Services,CN=Services,CN=Configuration,DC=ntdev,DC=microsoft,DC=com??sub" -f0x8000 >> regress.out
  3113. @rem flags:
  3114. @rem CERT_LDAP_STORE_OPENED_FLAG 0x40000
  3115. @rem CERT_LDAP_STORE_UNBIND_FLAG 0x80000
  3116. %_CDB_% tstore -s "prov:ldap:ldap://ntdev.microsoft.com/CN=Public Key Services,CN=Services,CN=Configuration,DC=ntdev,DC=microsoft,DC=com??sub" -f0x48000 >> regress.out
  3117. %_CDB_% tstore -R -s "prov:ldap:ldap://ntdev.microsoft.com/CN=Public Key Services,CN=Services,CN=Configuration,DC=ntdev,DC=microsoft,DC=com??sub" -f0xc8000 >> regress.out
  3118. %_CDB_% tcrobu "ldap://ntdev.microsoft.com/CN=Public Key Services,CN=Services,CN=Configuration,DC=ntdev,DC=microsoft,DC=com?caCertificate?sub?objectclass=certificationAuthority" cert -m >> regress.out
  3119. %_CDB_% tcrobu "ldap://ntdev.microsoft.com/CN=Public Key Services,CN=Services,CN=Configuration,DC=ntdev,DC=microsoft,DC=com?certificateRevocationList,authorityrevocationlist?sub?objectclass=cRlDistributionPoint" crl -m >> regress.out
  3120. @rem don't support multiple host names
  3121. %_CDB_% tcrobu "ldap://ntdev.microsoft.com ntdev.microsoft.com/CN=Public Key Services,CN=Services,CN=Configuration,DC=ntdev,DC=microsoft,DC=com?certificateRevocationList,authorityrevocationlist?sub?objectclass=cRlDistributionPoint" crl -m -Error 0x80070057 >> regress.out
  3122. @rem CRYPT_AIA_RETRIEVAL 0x00080000
  3123. @rem when the above flag is set, a nonCert URL retrieval shouldn't be
  3124. @rem cached
  3125. %_CDB_% turlcache "VBL03CA.crl" -d >> regress.out
  3126. %_CDB_% tcrobu "http://vbl03ca.ntdev.microsoft.com/CertEnroll/Microsoft Windows VBL03CA.crl" crl -Flags 0x80000 -Error 0 >> regress.out
  3127. %_CDB_% turlcache "VBL03CA.crl" -0 >> regress.out
  3128. %_CDB_% tcrobu "http://vbl03ca.ntdev.microsoft.com/CertEnroll/Microsoft Windows VBL03CA.crl" crl -Error 0 >> regress.out
  3129. %_CDB_% turlcache "VBL03CA.crl" -1 >> regress.out
  3130. @rem dwMaxUrlRetrievalByteCount
  3131. %_CDB_% tcrobu "ldap:///CN=Microsoft Windows VBL03CA,CN=AIA,CN=Public Key Services,CN=Services,CN=Configuration,DC=ntdev,DC=microsoft,DC=com?cACertificate?base?objectClass=certificationAuthority" cert -m -Size 2700 -Error 13 >> regress.out
  3132. %_CDB_% tcrobu "ldap:///CN=Microsoft Windows VBL03CA,CN=AIA,CN=Public Key Services,CN=Services,CN=Configuration,DC=ntdev,DC=microsoft,DC=com?cACertificate?base?objectClass=certificationAuthority" cert -m -Size 3000 -Error 0 >> regress.out
  3133. %_CDB_% tcrobu "http://vbl03ca.ntdev.microsoft.com/CertEnroll/vbl03ca.ntdev.microsoft.com_Microsoft Windows VBL03CA.crt" cert -Size 2700 -Error 13 >> regress.out
  3134. %_CDB_% tcrobu "http://vbl03ca.ntdev.microsoft.com/CertEnroll/vbl03ca.ntdev.microsoft.com_Microsoft Windows VBL03CA.crt" cert -Size 3000 -Error 0 >> regress.out
  3135. %_CDB_% tcrobu file://vsgood.cer cert -Size 2560 -Error 13 >> regress.out
  3136. %_CDB_% tcrobu file://vsgood.cer cert -Size 2660 -Error 0 >> regress.out
  3137. goto UrlDone
  3138. %_CDB_% tcrobu "ldap://157.59.132.34/c=us??sub" cert -m >> regress.out
  3139. %_CDB_% tcrobu "ldap://157.59.132.34/c=us??sub" crl -m >> regress.out
  3140. %_CDB_% tcrobu "ldap://157.59.132.34/c=us??sub" any -m >> regress.out
  3141. :UrlDone
  3142. @rem ----------------------------------------------------------------
  3143. @rem **** END ****
  3144. @rem ----------------------------------------------------------------
  3145. ttrust -EnableUntrustedRootLogging -EnablePartialChainLogging -RegistryOnlyExit
  3146. ttrust -DisableAIAUrlRetrieval 0xFFFFFFFF -MaxAIAUrlCountInCert 0xFFFFFFFF -MaxAIAUrlRetrievalCountPerChain 0xFFFFFFFF -MaxAIAUrlRetrievalByteCount 0xFFFFFFFF -MaxAIAUrlRetrievalCertCount 0xFFFFFFFF -RegistryOnlyExit
  3147. setreg -q 1 FALSE 2 TRUE 3 TRUE 4 TRUE 5 TRUE 6 TRUE 7 TRUE
  3148. @rem ensure the test root is removed
  3149. @tfindcer -S -s lm:root -a"Root Agency" -d >nul
  3150. @qgrep -y "pass succe" regress.out
  3151. @echo ****************************
  3152. @qgrep -y "leak fail" regress.out | qgrep -v -e "returned expected"
  3153. @qgrep -y -e "expected return:" regress.out
  3154. @qgrep -y -B -e "error:" regress.out
  3155. @rem @qgrep -e "Error at" regress.out
  3156. @echo ****************************
  3157. :exeunt
  3158. @echo off
  3159. set v=%_old_v%
  3160. set l=%_old_l%
  3161. set p=%_old_p%
  3162. set pe=%_old_pe%
  3163. set s=%_old_s%
  3164. set n=%_old_n%
  3165. set t=%_old_t%
  3166. set _CDB_=%_old_CDB_%
  3167. set DEBUG_MASK=%_old_DEBUG_MASK%
  3168. set DEBUG_PRINT_MASK=%_old_DEBUG_PRINT_MASK%
  3169. set LCN=%_old_LCN%
  3170. set RCN=%_old_RCN%
  3171. set SID=%_old_SID%
  3172. set SLEEP0=%_old_SLEEP0%
  3173. set UNC_PREFIX=%_old_UNC_PREFIX%
  3174. set _old_v=
  3175. set _old_l=
  3176. set _old_p=
  3177. set _old_pe=
  3178. set _old_s=
  3179. set _old_n=
  3180. set _old_t=
  3181. set _old_CDB_=
  3182. set _old_DEBUG_MASK=
  3183. set _old_LCN=
  3184. set _old_RCN=
  3185. set _old_SID=
  3186. set _old_SLEEP0=
  3187. set _old_UNC_PREFIX=
  3188. REM @ENDLOCAL