From: inoguchi Date: Mon, 3 May 2021 23:42:04 +0000 (+0000) Subject: Modify regress ssl_get_shared_ciphers for portable X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0123979b79b22118ce557e35a8632f161f0937d6;p=openbsd Modify regress ssl_get_shared_ciphers for portable - Split out the intermediate path (../certs/) to Makefile - Change 'shutdown' to 'shutdown_all' ok tb@ --- 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 * @@ -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;