diff options
author | Kinichiro Inoguchi <inoguchi@cvs.openbsd.org> | 2021-05-03 23:42:05 +0000 |
---|---|---|
committer | Kinichiro Inoguchi <inoguchi@cvs.openbsd.org> | 2021-05-03 23:42:05 +0000 |
commit | f8e75285ebbea520930de1e0250cb74bcd4cbea3 (patch) | |
tree | 62def7955490a39af2c330453c86f79952dd69e5 /regress/lib | |
parent | 3470ec0f0649a069e7813e32f97cf7e8aa4654f8 (diff) |
Modify regress ssl_get_shared_ciphers for portable
- Split out the intermediate path (../certs/) to Makefile
- Change 'shutdown' to 'shutdown_all'
ok tb@
Diffstat (limited to 'regress/lib')
-rw-r--r-- | regress/lib/libssl/unit/Makefile | 4 | ||||
-rw-r--r-- | regress/lib/libssl/unit/ssl_get_shared_ciphers.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/regress/lib/libssl/unit/Makefile b/regress/lib/libssl/unit/Makefile index 1a783b4a3b6..a1935bbd88a 100644 --- a/regress/lib/libssl/unit/Makefile +++ b/regress/lib/libssl/unit/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.11 2021/01/10 07:30:50 tb Exp $ +# $OpenBSD: Makefile,v 1.12 2021/05/03 23:42:04 inoguchi Exp $ TEST_CASES+= cipher_list TEST_CASES+= ssl_get_shared_ciphers @@ -12,7 +12,7 @@ REGRESS_TARGETS= all_tests WARNINGS= Yes LDLIBS= ${SSL_INT} -lcrypto CFLAGS+= -DLIBRESSL_INTERNAL -Wall -Wundef -Werror -CFLAGS+= -DCURDIR=\"${.CURDIR}\" +CFLAGS+= -DCERTSDIR=\"${.CURDIR}/../certs\" CFLAGS+= -I${.CURDIR}/../../../../lib/libssl CLEANFILES+= ${TEST_CASES} diff --git a/regress/lib/libssl/unit/ssl_get_shared_ciphers.c b/regress/lib/libssl/unit/ssl_get_shared_ciphers.c index 7bffba2fa42..d53aff54f01 100644 --- a/regress/lib/libssl/unit/ssl_get_shared_ciphers.c +++ b/regress/lib/libssl/unit/ssl_get_shared_ciphers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_get_shared_ciphers.c,v 1.8 2021/01/21 05:02:25 tb Exp $ */ +/* $OpenBSD: ssl_get_shared_ciphers.c,v 1.9 2021/05/03 23:42:04 inoguchi Exp $ */ /* * Copyright (c) 2021 Theo Buehler <tb@openbsd.org> * @@ -353,7 +353,7 @@ handshake(SSL *client_ssl, SSL *server_ssl, const char *description) } static int -shutdown(SSL *client_ssl, SSL *server_ssl, const char *description) +shutdown_all(SSL *client_ssl, SSL *server_ssl, const char *description) { int loops = 0, client_ret = 0, server_ret = 0; @@ -442,7 +442,7 @@ test_get_shared_ciphers(const struct ssl_shared_ciphers_test_data *test) goto err; } - if (!shutdown(client_ssl, server_ssl, test->description)) + if (!shutdown_all(client_ssl, server_ssl, test->description)) goto err; failed = check_shared_ciphers(test, buf); @@ -462,7 +462,7 @@ main(int argc, char **argv) size_t i; int failed = 0; - if (asprintf(&server_cert, "%s/../certs/server.pem", CURDIR) == -1) { + if (asprintf(&server_cert, "%s/server.pem", CERTSDIR) == -1) { fprintf(stderr, "asprintf server_cert failed\n"); failed = 1; goto err; |