aboutsummaryrefslogtreecommitdiff
path: root/tests/testenc.bat
diff options
context:
space:
mode:
authorkinichiro <kinichiro.inoguchi@gmail.com>2016-10-18 17:13:56 +0900
committerBrent Cook <bcook@openbsd.org>2016-10-30 21:40:24 -0500
commit14905877a0eb85ebdc16162e820cda51f0895fc7 (patch)
treec8999f2188004e581e49480496139c7a5a9f7076 /tests/testenc.bat
parentb434123987dc08fd47bd988bd3fe09277445001d (diff)
downloadportable-14905877a0eb85ebdc16162e820cda51f0895fc7.tar.gz
portable-14905877a0eb85ebdc16162e820cda51f0895fc7.tar.bz2
portable-14905877a0eb85ebdc16162e820cda51f0895fc7.zip
Enable tests on Visual Studio
- add patch for aeadtest.c to undef IN - add patch for ocsp_test.c to call BIO_sock_init() before getaddrinfo() - define STDERR_FILENO in unistd.h to build pkcs7test.c - add option ENABLE_VSTEST(default OFF) to enable test on Visual Studio - modify to pass test data file as an argument (aeadtest, evptest) - add Windows scripts (ocsptest, pq_test, ssltest, testdsa, testenc, testrsa) - do not build pidwraptest on MSVC - fix some indentations
Diffstat (limited to 'tests/testenc.bat')
-rw-r--r--tests/testenc.bat69
1 files changed, 69 insertions, 0 deletions
diff --git a/tests/testenc.bat b/tests/testenc.bat
new file mode 100644
index 0000000..a925ec3
--- /dev/null
+++ b/tests/testenc.bat
@@ -0,0 +1,69 @@
1@echo off
2setlocal enabledelayedexpansion
3REM testenc.bat
4
5set test=p
6set cmd=..\apps\openssl\Debug\openssl.exe
7if not exist %cmd% exit /b 1
8
9set srcdir=..\..\tests
10
11copy %srcdir%\openssl.cnf %test%
12
13echo cat
14%cmd% enc -in %test% -out %test%.cipher
15%cmd% enc -in %test%.cipher -out %test%.clear
16fc /b %test% %test%.clear
17if !errorlevel! neq 0 (
18 exit /b 1
19) else (
20 del %test%.cipher %test%.clear
21)
22
23echo base64
24%cmd% enc -a -e -in %test% -out %test%.cipher
25%cmd% enc -a -d -in %test%.cipher -out %test%.clear
26fc /b %test% %test%.clear
27if !errorlevel! neq 0 (
28 exit /b 1
29) else (
30 del %test%.cipher %test%.clear
31)
32
33for %%i in (
34 aes-128-cbc aes-128-cfb aes-128-cfb1 aes-128-cfb8
35 aes-128-ecb aes-128-ofb aes-192-cbc aes-192-cfb
36 aes-192-cfb1 aes-192-cfb8 aes-192-ecb aes-192-ofb
37 aes-256-cbc aes-256-cfb aes-256-cfb1 aes-256-cfb8
38 aes-256-ecb aes-256-ofb
39 bf-cbc bf-cfb bf-ecb bf-ofb
40 cast-cbc cast5-cbc cast5-cfb cast5-ecb cast5-ofb
41 des-cbc des-cfb des-cfb8 des-ecb des-ede
42 des-ede-cbc des-ede-cfb des-ede-ofb des-ede3
43 des-ede3-cbc des-ede3-cfb des-ede3-ofb des-ofb desx-cbc
44 rc2-40-cbc rc2-64-cbc rc2-cbc rc2-cfb rc2-ecb rc2-ofb
45 rc4 rc4-40
46) do (
47 echo %%i
48 %cmd% %%i -e -k test -in %test% -out %test%.%%i.cipher
49 %cmd% %%i -d -k test -in %test%.%%i.cipher -out %test%.%%i.clear
50 fc /b %test% %test%.%%i.clear
51 if !errorlevel! neq 0 (
52 exit /b 1
53 ) else (
54 del %test%.%%i.cipher %test%.%%i.clear
55 )
56
57 echo %%i base64
58 %cmd% %%i -a -e -k test -in %test% -out %test%.%%i.cipher
59 %cmd% %%i -a -d -k test -in %test%.%%i.cipher -out %test%.%%i.clear
60 fc /b %test% %test%.%%i.clear
61 if !errorlevel! neq 0 (
62 exit /b 1
63 ) else (
64 del %test%.%%i.cipher %test%.%%i.clear
65 )
66)
67
68del %test%
69endlocal