testce.bat 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. @echo off
  2. cemkdir CE:\OpenSSL
  3. set test=..\ms
  4. set opath=%PATH%
  5. PATH=..\ms;%PATH%
  6. cecopy ..\apps\openssl.cnf CE:\OpenSSL
  7. set OPENSSL_CONF=\OpenSSL\openssl.cnf
  8. set HOME=\OpenSSL
  9. set CERUN_PASS_ENV=OPENSSL_CONF HOME
  10. rem run this from inside the bin directory
  11. rem Copy the DLL's (though they'll only exist if we're in out32dll)
  12. if exist libeay32.dll cecopy libeay32.dll CE:\OpenSSL
  13. if exist ssleay32.dll cecopy ssleay32.dll CE:\OpenSSL
  14. echo rsa_test
  15. call %test%\testce2 rsa_test
  16. if errorlevel 1 goto done
  17. echo destest
  18. call %test%\testce2 destest
  19. if errorlevel 1 goto done
  20. echo ideatest
  21. call %test%\testce2 ideatest
  22. if errorlevel 1 goto done
  23. echo bftest
  24. call %test%\testce2 bftest
  25. if errorlevel 1 goto done
  26. echo shatest
  27. call %test%\testce2 shatest
  28. if errorlevel 1 goto done
  29. echo sha1test
  30. call %test%\testce2 sha1test
  31. if errorlevel 1 goto done
  32. echo md5test
  33. call %test%\testce2 md5test
  34. if errorlevel 1 goto done
  35. echo md2test
  36. call %test%\testce2 md2test
  37. if errorlevel 1 goto done
  38. echo mdc2test
  39. call %test%\testce2 mdc2test
  40. if errorlevel 1 goto done
  41. echo rc2test
  42. call %test%\testce2 rc2test
  43. if errorlevel 1 goto done
  44. echo rc4test
  45. call %test%\testce2 rc4test
  46. if errorlevel 1 goto done
  47. echo randtest
  48. call %test%\testce2 randtest
  49. if errorlevel 1 goto done
  50. echo dhtest
  51. call %test%\testce2 dhtest
  52. if errorlevel 1 goto done
  53. echo exptest
  54. call %test%\testce2 exptest
  55. if errorlevel 1 goto done
  56. echo dsatest
  57. call %test%\testce2 dsatest
  58. if errorlevel 1 goto done
  59. echo testenc
  60. call %test%\testencce openssl.exe
  61. if errorlevel 1 goto done
  62. echo testpem
  63. call %test%\testpemce openssl.exe
  64. if errorlevel 1 goto done
  65. cecopy openssl.exe CE:\OpenSSL
  66. echo verify
  67. copy ..\certs\*.pem cert.tmp >nul
  68. cecopy cert.tmp CE:\OpenSSL
  69. cemkdir CE:\OpenSSL\certs
  70. rem cecopy ..\certs\*.pem CE:\OpenSSL\certs
  71. cecopy ..\certs\ca-cert.pem CE:\OpenSSL\certs
  72. cecopy ..\certs\dsa-ca.pem CE:\OpenSSL\certs
  73. cecopy ..\certs\dsa-pca.pem CE:\OpenSSL\certs
  74. cecopy ..\certs\factory.pem CE:\OpenSSL\certs
  75. cecopy ..\certs\ICE-CA.pem CE:\OpenSSL\certs
  76. cecopy ..\certs\ICE-root.pem CE:\OpenSSL\certs
  77. cecopy ..\certs\ICE-user.pem CE:\OpenSSL\certs
  78. cecopy ..\certs\nortelCA.pem CE:\OpenSSL\certs
  79. cecopy ..\certs\pca-cert.pem CE:\OpenSSL\certs
  80. cecopy ..\certs\RegTP-4R.pem CE:\OpenSSL\certs
  81. cecopy ..\certs\RegTP-5R.pem CE:\OpenSSL\certs
  82. cecopy ..\certs\RegTP-6R.pem CE:\OpenSSL\certs
  83. cecopy ..\certs\rsa-cca.pem CE:\OpenSSL\certs
  84. cecopy ..\certs\thawteCb.pem CE:\OpenSSL\certs
  85. cecopy ..\certs\thawteCp.pem CE:\OpenSSL\certs
  86. cecopy ..\certs\timCA.pem CE:\OpenSSL\certs
  87. cecopy ..\certs\tjhCA.pem CE:\OpenSSL\certs
  88. cecopy ..\certs\vsign1.pem CE:\OpenSSL\certs
  89. cecopy ..\certs\vsign2.pem CE:\OpenSSL\certs
  90. cecopy ..\certs\vsign3.pem CE:\OpenSSL\certs
  91. cecopy ..\certs\vsignss.pem CE:\OpenSSL\certs
  92. cecopy ..\certs\vsigntca.pem CE:\OpenSSL\certs
  93. cerun CE:\OpenSSL\openssl verify -CAfile \OpenSSL\cert.tmp \OpenSSL\certs\*.pem
  94. echo testss
  95. call %test%\testssce openssl.exe
  96. if errorlevel 1 goto done
  97. cecopy ssltest.exe CE:\OpenSSL
  98. cecopy ..\apps\server.pem CE:\OpenSSL
  99. cecopy ..\apps\client.pem CE:\OpenSSL
  100. echo test sslv2
  101. cerun CE:\OpenSSL\ssltest -ssl2
  102. if errorlevel 1 goto done
  103. echo test sslv2 with server authentication
  104. cerun CE:\OpenSSL\ssltest -ssl2 -server_auth -CAfile \OpenSSL\cert.tmp
  105. if errorlevel 1 goto done
  106. echo test sslv2 with client authentication
  107. cerun CE:\OpenSSL\ssltest -ssl2 -client_auth -CAfile \OpenSSL\cert.tmp
  108. if errorlevel 1 goto done
  109. echo test sslv2 with both client and server authentication
  110. cerun CE:\OpenSSL\ssltest -ssl2 -server_auth -client_auth -CAfile \OpenSSL\cert.tmp
  111. if errorlevel 1 goto done
  112. echo test sslv3
  113. cerun CE:\OpenSSL\ssltest -ssl3
  114. if errorlevel 1 goto done
  115. echo test sslv3 with server authentication
  116. cerun CE:\OpenSSL\ssltest -ssl3 -server_auth -CAfile \OpenSSL\cert.tmp
  117. if errorlevel 1 goto done
  118. echo test sslv3 with client authentication
  119. cerun CE:\OpenSSL\ssltest -ssl3 -client_auth -CAfile \OpenSSL\cert.tmp
  120. if errorlevel 1 goto done
  121. echo test sslv3 with both client and server authentication
  122. cerun CE:\OpenSSL\ssltest -ssl3 -server_auth -client_auth -CAfile \OpenSSL\cert.tmp
  123. if errorlevel 1 goto done
  124. echo test sslv2/sslv3
  125. cerun CE:\OpenSSL\ssltest
  126. if errorlevel 1 goto done
  127. echo test sslv2/sslv3 with server authentication
  128. cerun CE:\OpenSSL\ssltest -server_auth -CAfile \OpenSSL\cert.tmp
  129. if errorlevel 1 goto done
  130. echo test sslv2/sslv3 with client authentication
  131. cerun CE:\OpenSSL\ssltest -client_auth -CAfile \OpenSSL\cert.tmp
  132. if errorlevel 1 goto done
  133. echo test sslv2/sslv3 with both client and server authentication
  134. cerun CE:\OpenSSL\ssltest -server_auth -client_auth -CAfile \OpenSSL\cert.tmp
  135. if errorlevel 1 goto done
  136. echo test sslv2 via BIO pair
  137. cerun CE:\OpenSSL\ssltest -bio_pair -ssl2
  138. if errorlevel 1 goto done
  139. echo test sslv2/sslv3 with 1024 bit DHE via BIO pair
  140. cerun CE:\OpenSSL\ssltest -bio_pair -dhe1024dsa -v
  141. if errorlevel 1 goto done
  142. echo test sslv2 with server authentication via BIO pair
  143. cerun CE:\OpenSSL\ssltest -bio_pair -ssl2 -server_auth -CAfile \OpenSSL\cert.tmp
  144. if errorlevel 1 goto done
  145. echo test sslv2 with client authentication via BIO pair
  146. cerun CE:\OpenSSL\ssltest -bio_pair -ssl2 -client_auth -CAfile \OpenSSL\cert.tmp
  147. if errorlevel 1 goto done
  148. echo test sslv2 with both client and server authentication via BIO pair
  149. cerun CE:\OpenSSL\ssltest -bio_pair -ssl2 -server_auth -client_auth -CAfile \OpenSSL\cert.tmp
  150. if errorlevel 1 goto done
  151. echo test sslv3 via BIO pair
  152. cerun CE:\OpenSSL\ssltest -bio_pair -ssl3
  153. if errorlevel 1 goto done
  154. echo test sslv3 with server authentication via BIO pair
  155. cerun CE:\OpenSSL\ssltest -bio_pair -ssl3 -server_auth -CAfile \OpenSSL\cert.tmp
  156. if errorlevel 1 goto done
  157. echo test sslv3 with client authentication via BIO pair
  158. cerun CE:\OpenSSL\ssltest -bio_pair -ssl3 -client_auth -CAfile \OpenSSL\cert.tmp
  159. if errorlevel 1 goto done
  160. echo test sslv3 with both client and server authentication via BIO pair
  161. cerun CE:\OpenSSL\ssltest -bio_pair -ssl3 -server_auth -client_auth -CAfile \OpenSSL\cert.tmp
  162. if errorlevel 1 goto done
  163. echo test sslv2/sslv3 via BIO pair
  164. cerun CE:\OpenSSL\ssltest
  165. if errorlevel 1 goto done
  166. echo test sslv2/sslv3 with server authentication
  167. cerun CE:\OpenSSL\ssltest -bio_pair -server_auth -CAfile \OpenSSL\cert.tmp
  168. if errorlevel 1 goto done
  169. echo test sslv2/sslv3 with client authentication via BIO pair
  170. cerun CE:\OpenSSL\ssltest -bio_pair -client_auth -CAfile \OpenSSL\cert.tmp
  171. if errorlevel 1 goto done
  172. echo test sslv2/sslv3 with both client and server authentication via BIO pair
  173. cerun CE:\OpenSSL\ssltest -bio_pair -server_auth -client_auth -CAfile \OpenSSL\cert.tmp
  174. if errorlevel 1 goto done
  175. del cert.tmp
  176. echo passed all tests
  177. goto end
  178. :done
  179. echo problems.....
  180. :end
  181. PATH=%opath%