diff options
Diffstat (limited to '')
-rw-r--r-- | tests/testdsa.bat | 15 |
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 | ||
6 | REM # Test DSA certificate generation of openssl | 6 | REM # Test DSA certificate generation of openssl |
7 | 7 | ||
8 | set cmd=..\apps\openssl\Debug\openssl.exe | 8 | set openssl_bin=%1 |
9 | if not exist %cmd% exit /b 1 | 9 | set openssl_bin=%openssl_bin:/=\% |
10 | 10 | if not exist %openssl_bin% exit /b 1 | |
11 | if "%srcdir%"=="" ( | ||
12 | set srcdir=. | ||
13 | ) | ||
14 | 11 | ||
15 | REM # Generate DSA paramter set | 12 | REM # Generate DSA paramter set |
16 | %cmd% dsaparam 512 -out dsa512.pem | 13 | %openssl_bin% dsaparam 512 -out dsa512.pem |
17 | if !errorlevel! neq 0 ( | 14 | if !errorlevel! neq 0 ( |
18 | exit /b 1 | 15 | exit /b 1 |
19 | ) | 16 | ) |
20 | 17 | ||
21 | 18 | ||
22 | REM # Generate a DSA certificate | 19 | REM # 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 |
24 | if !errorlevel! neq 0 ( | 21 | if !errorlevel! neq 0 ( |
25 | exit /b 1 | 22 | exit /b 1 |
26 | ) | 23 | ) |
27 | 24 | ||
28 | 25 | ||
29 | REM # Now check the certificate | 26 | REM # Now check the certificate |
30 | %cmd% x509 -text -in testdsa.pem | 27 | %openssl_bin% x509 -text -in testdsa.pem |
31 | if !errorlevel! neq 0 ( | 28 | if !errorlevel! neq 0 ( |
32 | exit /b 1 | 29 | exit /b 1 |
33 | ) | 30 | ) |