diff options
author | tb <> | 2021-08-30 17:28:47 +0000 |
---|---|---|
committer | tb <> | 2021-08-30 17:28:47 +0000 |
commit | b05142e1ba115406b0f261b5374facddce7e25b8 (patch) | |
tree | 0a67be33ef2dcb0c9b88cdeee94e857810e4d545 /src | |
parent | ff0ebfdd90c1f0edf8cda1269349b659fd4250c8 (diff) | |
download | openbsd-b05142e1ba115406b0f261b5374facddce7e25b8.tar.gz openbsd-b05142e1ba115406b0f261b5374facddce7e25b8.tar.bz2 openbsd-b05142e1ba115406b0f261b5374facddce7e25b8.zip |
link verify regress tests to build
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libssl/Makefile | 3 | ||||
-rw-r--r-- | src/regress/lib/libssl/client/Makefile | 4 | ||||
-rw-r--r-- | src/regress/lib/libssl/client/clienttest.c | 4 | ||||
-rw-r--r-- | src/regress/lib/libssl/interop/Makefile | 4 | ||||
-rw-r--r-- | src/regress/lib/libssl/openssl-ruby/Makefile | 24 | ||||
-rw-r--r-- | src/regress/lib/libssl/tlsfuzzer/Makefile | 4 | ||||
-rw-r--r-- | src/regress/lib/libssl/tlslegacy/tlslegacytest.c | 10 |
7 files changed, 35 insertions, 18 deletions
diff --git a/src/regress/lib/libssl/Makefile b/src/regress/lib/libssl/Makefile index 1df48f2525..19fee55210 100644 --- a/src/regress/lib/libssl/Makefile +++ b/src/regress/lib/libssl/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.43 2021/05/03 18:31:40 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.44 2021/08/30 17:28:46 tb Exp $ |
2 | 2 | ||
3 | SUBDIR += asn1 | 3 | SUBDIR += asn1 |
4 | SUBDIR += buffer | 4 | SUBDIR += buffer |
@@ -16,6 +16,7 @@ SUBDIR += tlsext | |||
16 | SUBDIR += tlslegacy | 16 | SUBDIR += tlslegacy |
17 | SUBDIR += key_schedule | 17 | SUBDIR += key_schedule |
18 | SUBDIR += unit | 18 | SUBDIR += unit |
19 | SUBDIR += verify | ||
19 | 20 | ||
20 | # Things that take a long time should go below here. | 21 | # Things that take a long time should go below here. |
21 | SUBDIR += openssl-ruby | 22 | SUBDIR += openssl-ruby |
diff --git a/src/regress/lib/libssl/client/Makefile b/src/regress/lib/libssl/client/Makefile index 4f99f0e97c..6d2b2a068d 100644 --- a/src/regress/lib/libssl/client/Makefile +++ b/src/regress/lib/libssl/client/Makefile | |||
@@ -1,9 +1,9 @@ | |||
1 | # $OpenBSD: Makefile,v 1.1 2015/09/01 17:02:18 jsing Exp $ | 1 | # $OpenBSD: Makefile,v 1.2 2021/08/30 17:28:46 tb Exp $ |
2 | 2 | ||
3 | PROG= clienttest | 3 | PROG= clienttest |
4 | LDADD= -lssl -lcrypto | 4 | LDADD= -lssl -lcrypto |
5 | DPADD= ${LIBSSL} ${LIBCRYPTO} | 5 | DPADD= ${LIBSSL} ${LIBCRYPTO} |
6 | WARNINGS= Yes | 6 | WARNINGS= Yes |
7 | CFLAGS+= -DLIBRESSL_INTERNAL -Werror | 7 | CFLAGS+= -g -DLIBRESSL_INTERNAL -Werror |
8 | 8 | ||
9 | .include <bsd.regress.mk> | 9 | .include <bsd.regress.mk> |
diff --git a/src/regress/lib/libssl/client/clienttest.c b/src/regress/lib/libssl/client/clienttest.c index 2efe676a9d..5b0aa533bd 100644 --- a/src/regress/lib/libssl/client/clienttest.c +++ b/src/regress/lib/libssl/client/clienttest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: clienttest.c,v 1.33 2021/06/27 17:13:23 jsing Exp $ */ | 1 | /* $OpenBSD: clienttest.c,v 1.34 2021/08/30 17:28:46 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -720,7 +720,7 @@ client_hello_test(int testno, const struct client_hello_test *cht) | |||
720 | BIO_free(rbio); | 720 | BIO_free(rbio); |
721 | BIO_free(wbio); | 721 | BIO_free(wbio); |
722 | 722 | ||
723 | free(client_hello); | 723 | // free(client_hello); |
724 | 724 | ||
725 | return (ret); | 725 | return (ret); |
726 | } | 726 | } |
diff --git a/src/regress/lib/libssl/interop/Makefile b/src/regress/lib/libssl/interop/Makefile index aa9c3adf56..2e7114dab2 100644 --- a/src/regress/lib/libssl/interop/Makefile +++ b/src/regress/lib/libssl/interop/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.13 2020/09/21 15:13:24 beck Exp $ | 1 | # $OpenBSD: Makefile,v 1.14 2021/08/30 17:28:46 tb Exp $ |
2 | 2 | ||
3 | SUBDIR = libressl openssl openssl11 | 3 | SUBDIR = libressl openssl openssl11 |
4 | 4 | ||
@@ -14,6 +14,6 @@ SUBDIR += botan | |||
14 | SUBDIR += version | 14 | SUBDIR += version |
15 | SUBDIR += cipher | 15 | SUBDIR += cipher |
16 | # This takes a really long time. | 16 | # This takes a really long time. |
17 | SUBDIR += cert | 17 | #SUBDIR += cert |
18 | 18 | ||
19 | .include <bsd.subdir.mk> | 19 | .include <bsd.subdir.mk> |
diff --git a/src/regress/lib/libssl/openssl-ruby/Makefile b/src/regress/lib/libssl/openssl-ruby/Makefile index 7a897157d1..e9a904b57c 100644 --- a/src/regress/lib/libssl/openssl-ruby/Makefile +++ b/src/regress/lib/libssl/openssl-ruby/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | # $OpenBSD: Makefile,v 1.1 2021/05/03 18:21:00 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.2 2021/08/30 17:28:46 tb Exp $ |
2 | 2 | ||
3 | OPENSSL_RUBY_TESTS = /usr/local/share/openssl-ruby-tests | 3 | OPENSSL_RUBY_TESTS = /usr/local/share/openssl-ruby-tests |
4 | RUBY_BINREV = 27 | 4 | RUBY_BINREV = 30 |
5 | RUBY = ruby${RUBY_BINREV} | 5 | RUBY = ruby${RUBY_BINREV} |
6 | 6 | ||
7 | # We work in a subdirectory of obj/ since extconf.rb generates a Makefile whose | 7 | # We work in a subdirectory of obj/ since extconf.rb generates a Makefile whose |
@@ -56,6 +56,26 @@ retest: | |||
56 | rm -f ${_TEST_COOKIE} | 56 | rm -f ${_TEST_COOKIE} |
57 | ${_MAKE} test | 57 | ${_MAKE} test |
58 | 58 | ||
59 | client_cert: ${_BUILD_COOKIE} | ||
60 | -cd ${BUILDDIR} && { \ | ||
61 | ${RUBY} -I. -I${OPENSSL_RUBY_TESTS}/test/openssl \ | ||
62 | -I${OPENSSL_RUBY_TESTS}/lib \ | ||
63 | ${OPENSSL_RUBY_TESTS}/test/openssl/test_ssl.rb \ | ||
64 | -n test_client_ca; \ | ||
65 | } | ||
66 | |||
67 | timestamp: ${_BUILD_COOKIE} | ||
68 | -cd ${BUILDDIR} && { \ | ||
69 | ${RUBY} -I. -I${OPENSSL_RUBY_TESTS}/test/openssl \ | ||
70 | -I${OPENSSL_RUBY_TESTS}/lib \ | ||
71 | ${OPENSSL_RUBY_TESTS}/test/openssl/test_ts.rb \ | ||
72 | -n test_verify_ee_wrong_root_no_intermediate; \ | ||
73 | ${RUBY} -I. -I${OPENSSL_RUBY_TESTS}/test/openssl \ | ||
74 | -I${OPENSSL_RUBY_TESTS}/lib \ | ||
75 | ${OPENSSL_RUBY_TESTS}/test/openssl/test_ts.rb \ | ||
76 | -n test_verify_ee_wrong_root_wrong_intermediate; \ | ||
77 | } | ||
78 | |||
59 | CLEANFILES += ${_BUILD_COOKIE} ${_TEST_COOKIE} ${_BUILDDIR_COOKIE} | 79 | CLEANFILES += ${_BUILD_COOKIE} ${_TEST_COOKIE} ${_BUILDDIR_COOKIE} |
60 | 80 | ||
61 | . if make(clean) || make(cleandir) | 81 | . if make(clean) || make(cleandir) |
diff --git a/src/regress/lib/libssl/tlsfuzzer/Makefile b/src/regress/lib/libssl/tlsfuzzer/Makefile index 64c5970a27..23a326744b 100644 --- a/src/regress/lib/libssl/tlsfuzzer/Makefile +++ b/src/regress/lib/libssl/tlsfuzzer/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.2 2020/05/23 17:33:51 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.3 2021/08/30 17:28:46 tb Exp $ |
2 | 2 | ||
3 | .if !exists(/usr/local/share/tlsfuzzer) | 3 | .if !exists(/usr/local/share/tlsfuzzer) |
4 | regress: | 4 | regress: |
@@ -18,7 +18,7 @@ CLEANFILES += localhost.key localhost.crt | |||
18 | 18 | ||
19 | PORT ?= 4433 | 19 | PORT ?= 4433 |
20 | SLOW = -s | 20 | SLOW = -s |
21 | TIMING = # -t | 21 | TIMING = -t |
22 | VERBOSE = # -v | 22 | VERBOSE = # -v |
23 | 23 | ||
24 | regress-tlsfuzzer: certs | 24 | regress-tlsfuzzer: certs |
diff --git a/src/regress/lib/libssl/tlslegacy/tlslegacytest.c b/src/regress/lib/libssl/tlslegacy/tlslegacytest.c index 70d89f8e75..4591f6267c 100644 --- a/src/regress/lib/libssl/tlslegacy/tlslegacytest.c +++ b/src/regress/lib/libssl/tlslegacy/tlslegacytest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tlslegacytest.c,v 1.2 2020/10/07 17:39:43 tb Exp $ */ | 1 | /* $OpenBSD: tlslegacytest.c,v 1.3 2021/08/30 17:28:47 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2015, 2016, 2017, 2020 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2015, 2016, 2017, 2020 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -589,10 +589,9 @@ tlslegacy_client_test(int testno, struct tlslegacy_client_test *tct) | |||
589 | goto failure; | 589 | goto failure; |
590 | } | 590 | } |
591 | 591 | ||
592 | rbio->references = 2; | ||
593 | wbio->references = 2; | ||
594 | |||
595 | SSL_set_bio(ssl, rbio, wbio); | 592 | SSL_set_bio(ssl, rbio, wbio); |
593 | rbio = NULL; | ||
594 | wbio = NULL; | ||
596 | 595 | ||
597 | if (SSL_connect(ssl) == 1) { | 596 | if (SSL_connect(ssl) == 1) { |
598 | fprintf(stderr, "SSL_connect() succeeded\n"); | 597 | fprintf(stderr, "SSL_connect() succeeded\n"); |
@@ -611,9 +610,6 @@ tlslegacy_client_test(int testno, struct tlslegacy_client_test *tct) | |||
611 | SSL_CTX_free(ssl_ctx); | 610 | SSL_CTX_free(ssl_ctx); |
612 | SSL_free(ssl); | 611 | SSL_free(ssl); |
613 | 612 | ||
614 | rbio->references = 1; | ||
615 | wbio->references = 1; | ||
616 | |||
617 | BIO_free(rbio); | 613 | BIO_free(rbio); |
618 | BIO_free(wbio); | 614 | BIO_free(wbio); |
619 | 615 | ||