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