aboutsummaryrefslogtreecommitdiff
path: root/tests/testrsa.bat
diff options
context:
space:
mode:
authorDon <don.j.olmstead@gmail.com>2018-03-20 15:55:41 -0700
committerDon <don.j.olmstead@gmail.com>2018-03-20 16:44:41 -0700
commit644c1097a8402d170603f5a0ff17efb37360dac7 (patch)
tree473b3aae687b1aa1a30bd68559035162bc0600cc /tests/testrsa.bat
parent0263e69a9346e2a3c3bcbbed8f12a9749da63900 (diff)
downloadportable-644c1097a8402d170603f5a0ff17efb37360dac7.tar.gz
portable-644c1097a8402d170603f5a0ff17efb37360dac7.tar.bz2
portable-644c1097a8402d170603f5a0ff17efb37360dac7.zip
Fix Windows tests within CMake
Diffstat (limited to 'tests/testrsa.bat')
-rw-r--r--tests/testrsa.bat15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/testrsa.bat b/tests/testrsa.bat
index 6d88d21..59c3b5d 100644
--- a/tests/testrsa.bat
+++ b/tests/testrsa.bat
@@ -5,29 +5,26 @@ REM testrsa.bat
5 5
6REM # Test RSA certificate generation of openssl 6REM # Test RSA 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 RSA private key 12REM # Generate RSA private key
16%cmd% genrsa -out rsakey.pem 13%openssl_bin% genrsa -out rsakey.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 an RSA certificate 19REM # Generate an RSA certificate
23%cmd% req -config %srcdir%\openssl.cnf -key rsakey.pem -new -x509 -days 365 -out rsacert.pem 20%openssl_bin% req -config %srcdir%\openssl.cnf -key rsakey.pem -new -x509 -days 365 -out rsacert.pem
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 rsacert.pem 27%openssl_bin% x509 -text -in rsacert.pem
31if !errorlevel! neq 0 ( 28if !errorlevel! neq 0 (
32 exit /b 1 29 exit /b 1
33) 30)