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