diff options
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | .travis.yml | 3 | ||||
-rwxr-xr-x | scripts/travis_failure | 18 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 27 | ||||
-rw-r--r-- | tests/Makefile.am | 24 | ||||
-rwxr-xr-x | tests/dtlstest.sh | 13 |
6 files changed, 83 insertions, 8 deletions
@@ -47,6 +47,10 @@ Makefile.in | |||
47 | *.3 | 47 | *.3 |
48 | *.5 | 48 | *.5 |
49 | 49 | ||
50 | cert.pem | ||
51 | openssl.cnf | ||
52 | x509v3.cnf | ||
53 | |||
50 | # tests | 54 | # tests |
51 | test-driver | 55 | test-driver |
52 | *.log | 56 | *.log |
@@ -60,12 +64,14 @@ tests/bn_rand_interval* | |||
60 | tests/bn_to_string* | 64 | tests/bn_to_string* |
61 | tests/cipher* | 65 | tests/cipher* |
62 | tests/constraints* | 66 | tests/constraints* |
67 | tests/ec_point_conversion* | ||
63 | tests/explicit_bzero* | 68 | tests/explicit_bzero* |
64 | tests/freenull* | 69 | tests/freenull* |
65 | tests/gost2814789t* | 70 | tests/gost2814789t* |
66 | tests/key_schedule* | 71 | tests/key_schedule* |
67 | tests/mont* | 72 | tests/mont* |
68 | tests/rfc5280time* | 73 | tests/rfc5280time* |
74 | tests/ssl_get_shared_ciphers* | ||
69 | tests/ssl_methods* | 75 | tests/ssl_methods* |
70 | tests/ssl_versions* | 76 | tests/ssl_versions* |
71 | tests/timingsafe* | 77 | tests/timingsafe* |
diff --git a/.travis.yml b/.travis.yml index 3e50e18..12e1d56 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -62,3 +62,6 @@ matrix: | |||
62 | 62 | ||
63 | script: | 63 | script: |
64 | "./scripts/travis" | 64 | "./scripts/travis" |
65 | |||
66 | after_failure: | ||
67 | "./scripts/travis_failure" | ||
diff --git a/scripts/travis_failure b/scripts/travis_failure new file mode 100755 index 0000000..93354fd --- /dev/null +++ b/scripts/travis_failure | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | CWD=`pwd` | ||
4 | |||
5 | testsdir=`ls -d libressl-*/_build/sub/tests` | ||
6 | if [ -d "$testsdir" ] ; then | ||
7 | echo "##### test logs in $testsdir" | ||
8 | cd $testsdir | ||
9 | for i in `ls *.trs` ; do | ||
10 | grep ':test-result: PASS' $i > /dev/null | ||
11 | if [ $? -eq 1 ] ; then | ||
12 | log=`echo $i | sed 's/\.trs$/\.log/'` | ||
13 | echo "***** $log" | ||
14 | cat $log | ||
15 | fi | ||
16 | done | ||
17 | cd $CWD | ||
18 | fi | ||
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d0280f7..52acbba 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
@@ -132,10 +132,9 @@ if(NOT BUILD_SHARED_LIBS) | |||
132 | endif() | 132 | endif() |
133 | 133 | ||
134 | # clienttest | 134 | # clienttest |
135 | # disabled | 135 | add_executable(clienttest clienttest.c) |
136 | #add_executable(clienttest clienttest.c) | 136 | target_link_libraries(clienttest ${OPENSSL_LIBS}) |
137 | #target_link_libraries(clienttest ${OPENSSL_LIBS}) | 137 | add_test(clienttest clienttest) |
138 | #add_test(clienttest clienttest) | ||
139 | 138 | ||
140 | # cmstest | 139 | # cmstest |
141 | add_executable(cmstest cmstest.c) | 140 | add_executable(cmstest cmstest.c) |
@@ -174,6 +173,14 @@ add_executable(dsatest dsatest.c) | |||
174 | target_link_libraries(dsatest ${OPENSSL_LIBS}) | 173 | target_link_libraries(dsatest ${OPENSSL_LIBS}) |
175 | add_test(dsatest dsatest) | 174 | add_test(dsatest dsatest) |
176 | 175 | ||
176 | # dtlstest | ||
177 | if(NOT WIN32) | ||
178 | add_executable(dtlstest dtlstest.c) | ||
179 | target_link_libraries(dtlstest ${OPENSSL_LIBS}) | ||
180 | add_test(NAME dtlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/dtlstest.sh) | ||
181 | set_tests_properties(dtlstest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | ||
182 | endif() | ||
183 | |||
177 | if(NOT BUILD_SHARED_LIBS) | 184 | if(NOT BUILD_SHARED_LIBS) |
178 | # ec_point_conversion | 185 | # ec_point_conversion |
179 | add_executable(ec_point_conversion ec_point_conversion.c) | 186 | add_executable(ec_point_conversion ec_point_conversion.c) |
@@ -439,6 +446,13 @@ add_executable(sm4test sm4test.c) | |||
439 | target_link_libraries(sm4test ${OPENSSL_LIBS}) | 446 | target_link_libraries(sm4test ${OPENSSL_LIBS}) |
440 | add_test(sm4test sm4test) | 447 | add_test(sm4test sm4test) |
441 | 448 | ||
449 | # ssl_get_shared_ciphers | ||
450 | add_executable(ssl_get_shared_ciphers ssl_get_shared_ciphers.c) | ||
451 | set_source_files_properties(ssl_get_shared_ciphers.c PROPERTIES COMPILE_FLAGS | ||
452 | -DCERTSDIR=\\"${CMAKE_CURRENT_SOURCE_DIR}\\") | ||
453 | target_link_libraries(ssl_get_shared_ciphers ${OPENSSL_LIBS}) | ||
454 | add_test(ssl_get_shared_ciphers ssl_get_shared_ciphers) | ||
455 | |||
442 | # ssl_versions | 456 | # ssl_versions |
443 | if(NOT BUILD_SHARED_LIBS) | 457 | if(NOT BUILD_SHARED_LIBS) |
444 | add_executable(ssl_versions ssl_versions.c) | 458 | add_executable(ssl_versions ssl_versions.c) |
@@ -492,6 +506,11 @@ if(NOT BUILD_SHARED_LIBS) | |||
492 | add_test(tlsexttest tlsexttest) | 506 | add_test(tlsexttest tlsexttest) |
493 | endif() | 507 | endif() |
494 | 508 | ||
509 | # tlslegacytest | ||
510 | add_executable(tlslegacytest tlslegacytest.c) | ||
511 | target_link_libraries(tlslegacytest ${OPENSSL_LIBS}) | ||
512 | add_test(tlslegacytest tlslegacytest) | ||
513 | |||
495 | # tlstest | 514 | # tlstest |
496 | set(TLSTEST_SRC tlstest.c) | 515 | set(TLSTEST_SRC tlstest.c) |
497 | check_function_exists(pipe2 HAVE_PIPE2) | 516 | check_function_exists(pipe2 HAVE_PIPE2) |
diff --git a/tests/Makefile.am b/tests/Makefile.am index 678027e..8ce338f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am | |||
@@ -132,10 +132,9 @@ check_PROGRAMS += cipherstest | |||
132 | cipherstest_SOURCES = cipherstest.c | 132 | cipherstest_SOURCES = cipherstest.c |
133 | 133 | ||
134 | # clienttest | 134 | # clienttest |
135 | # disabled | 135 | TESTS += clienttest |
136 | #TESTS += clienttest | 136 | check_PROGRAMS += clienttest |
137 | #check_PROGRAMS += clienttest | 137 | clienttest_SOURCES = clienttest.c |
138 | #clienttest_SOURCES = clienttest.c | ||
139 | 138 | ||
140 | # cmstest | 139 | # cmstest |
141 | TESTS += cmstest | 140 | TESTS += cmstest |
@@ -172,6 +171,12 @@ TESTS += dsatest | |||
172 | check_PROGRAMS += dsatest | 171 | check_PROGRAMS += dsatest |
173 | dsatest_SOURCES = dsatest.c | 172 | dsatest_SOURCES = dsatest.c |
174 | 173 | ||
174 | # dtlstest | ||
175 | TESTS += dtlstest.sh | ||
176 | check_PROGRAMS += dtlstest | ||
177 | dtlstest_SOURCES = dtlstest.c | ||
178 | EXTRA_DIST += dtlstest.sh | ||
179 | |||
175 | # ec_point_conversion | 180 | # ec_point_conversion |
176 | TESTS += ec_point_conversion | 181 | TESTS += ec_point_conversion |
177 | check_PROGRAMS += ec_point_conversion | 182 | check_PROGRAMS += ec_point_conversion |
@@ -410,6 +415,12 @@ TESTS += sm4test | |||
410 | check_PROGRAMS += sm4test | 415 | check_PROGRAMS += sm4test |
411 | sm4test_SOURCES = sm4test.c | 416 | sm4test_SOURCES = sm4test.c |
412 | 417 | ||
418 | # ssl_get_shared_ciphers | ||
419 | TESTS += ssl_get_shared_ciphers | ||
420 | ssl_get_shared_ciphers_CPPFLAGS = $(AM_CPPFLAGS) -DCERTSDIR=\"$(srcdir)\" | ||
421 | check_PROGRAMS += ssl_get_shared_ciphers | ||
422 | ssl_get_shared_ciphers_SOURCES = ssl_get_shared_ciphers.c | ||
423 | |||
413 | # ssl_methods | 424 | # ssl_methods |
414 | TESTS += ssl_methods | 425 | TESTS += ssl_methods |
415 | check_PROGRAMS += ssl_methods | 426 | check_PROGRAMS += ssl_methods |
@@ -450,6 +461,11 @@ TESTS += tlsexttest | |||
450 | check_PROGRAMS += tlsexttest | 461 | check_PROGRAMS += tlsexttest |
451 | tlsexttest_SOURCES = tlsexttest.c | 462 | tlsexttest_SOURCES = tlsexttest.c |
452 | 463 | ||
464 | # tlslegacytest | ||
465 | TESTS += tlslegacytest | ||
466 | check_PROGRAMS += tlslegacytest | ||
467 | tlslegacytest_SOURCES = tlslegacytest.c | ||
468 | |||
453 | # tlstest | 469 | # tlstest |
454 | TESTS += tlstest.sh | 470 | TESTS += tlstest.sh |
455 | check_PROGRAMS += tlstest | 471 | check_PROGRAMS += tlstest |
diff --git a/tests/dtlstest.sh b/tests/dtlstest.sh new file mode 100755 index 0000000..ef18cfc --- /dev/null +++ b/tests/dtlstest.sh | |||
@@ -0,0 +1,13 @@ | |||
1 | #!/bin/sh | ||
2 | set -e | ||
3 | |||
4 | dtlstest_bin=./dtlstest | ||
5 | if [ -e ./dtlstest.exe ]; then | ||
6 | dtlstest_bin=./dtlstest.exe | ||
7 | fi | ||
8 | |||
9 | if [ -z $srcdir ]; then | ||
10 | srcdir=. | ||
11 | fi | ||
12 | |||
13 | $dtlstest_bin $srcdir/server.pem $srcdir/server.pem $srcdir/ca.pem | ||