Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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