aboutsummaryrefslogtreecommitdiff
path: root/tests/testdsa.bat
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/testdsa.bat15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/testdsa.bat b/tests/testdsa.bat
index 9a9690e..898ded8 100644
--- a/tests/testdsa.bat
+++ b/tests/testdsa.bat
@@ -5,29 +5,26 @@ REM testdsa.bat
5 5
6REM # Test DSA certificate generation of openssl 6REM # Test DSA certificate generation of openssl
7 7
8set cmd=..\apps\openssl\Debug\openssl.exe 8set openssl_bin=%1
9if not exist %cmd% exit /b 1 9set openssl_bin=%openssl_bin:/=\%
10 10if not exist %openssl_bin% exit /b 1
11if "%srcdir%"=="" (
12 set srcdir=.
13)
14 11
15REM # Generate DSA paramter set 12REM # Generate DSA paramter set
16%cmd% dsaparam 512 -out dsa512.pem 13%openssl_bin% dsaparam 512 -out dsa512.pem
17if !errorlevel! neq 0 ( 14if !errorlevel! neq 0 (
18 exit /b 1 15 exit /b 1
19) 16)
20 17
21 18
22REM # Generate a DSA certificate 19REM # Generate a DSA certificate
23%cmd% req -config %srcdir%\openssl.cnf -x509 -newkey dsa:dsa512.pem -out testdsa.pem -keyout testdsa.key 20%openssl_bin% req -config %srcdir%\openssl.cnf -x509 -newkey dsa:dsa512.pem -out testdsa.pem -keyout testdsa.key
24if !errorlevel! neq 0 ( 21if !errorlevel! neq 0 (
25 exit /b 1 22 exit /b 1
26) 23)
27 24
28 25
29REM # Now check the certificate 26REM # Now check the certificate
30%cmd% x509 -text -in testdsa.pem 27%openssl_bin% x509 -text -in testdsa.pem
31if !errorlevel! neq 0 ( 28if !errorlevel! neq 0 (
32 exit /b 1 29 exit /b 1
33) 30)