diff options
author | inoguchi <> | 2021-05-03 23:42:04 +0000 |
---|---|---|
committer | inoguchi <> | 2021-05-03 23:42:04 +0000 |
commit | c49b8b934d8358a98c780d1f80aa9de720b7827e (patch) | |
tree | dd42fc2f019ffd68c9302da6e3e502c50be409fd /src | |
parent | 6ed4ddcd23080129c82c1eae57a455601fa53f93 (diff) | |
download | openbsd-c49b8b934d8358a98c780d1f80aa9de720b7827e.tar.gz openbsd-c49b8b934d8358a98c780d1f80aa9de720b7827e.tar.bz2 openbsd-c49b8b934d8358a98c780d1f80aa9de720b7827e.zip |
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 'src')
-rw-r--r-- | src/regress/lib/libssl/unit/Makefile | 4 | ||||
-rw-r--r-- | src/regress/lib/libssl/unit/ssl_get_shared_ciphers.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/regress/lib/libssl/unit/Makefile b/src/regress/lib/libssl/unit/Makefile index 1a783b4a3b..a1935bbd88 100644 --- a/src/regress/lib/libssl/unit/Makefile +++ b/src/regress/lib/libssl/unit/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.11 2021/01/10 07:30:50 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.12 2021/05/03 23:42:04 inoguchi Exp $ |
2 | 2 | ||
3 | TEST_CASES+= cipher_list | 3 | TEST_CASES+= cipher_list |
4 | TEST_CASES+= ssl_get_shared_ciphers | 4 | TEST_CASES+= ssl_get_shared_ciphers |
@@ -12,7 +12,7 @@ REGRESS_TARGETS= all_tests | |||
12 | WARNINGS= Yes | 12 | WARNINGS= Yes |
13 | LDLIBS= ${SSL_INT} -lcrypto | 13 | LDLIBS= ${SSL_INT} -lcrypto |
14 | CFLAGS+= -DLIBRESSL_INTERNAL -Wall -Wundef -Werror | 14 | CFLAGS+= -DLIBRESSL_INTERNAL -Wall -Wundef -Werror |
15 | CFLAGS+= -DCURDIR=\"${.CURDIR}\" | 15 | CFLAGS+= -DCERTSDIR=\"${.CURDIR}/../certs\" |
16 | CFLAGS+= -I${.CURDIR}/../../../../lib/libssl | 16 | CFLAGS+= -I${.CURDIR}/../../../../lib/libssl |
17 | 17 | ||
18 | CLEANFILES+= ${TEST_CASES} | 18 | CLEANFILES+= ${TEST_CASES} |
diff --git a/src/regress/lib/libssl/unit/ssl_get_shared_ciphers.c b/src/regress/lib/libssl/unit/ssl_get_shared_ciphers.c index 7bffba2fa4..d53aff54f0 100644 --- a/src/regress/lib/libssl/unit/ssl_get_shared_ciphers.c +++ b/src/regress/lib/libssl/unit/ssl_get_shared_ciphers.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_get_shared_ciphers.c,v 1.8 2021/01/21 05:02:25 tb Exp $ */ | 1 | /* $OpenBSD: ssl_get_shared_ciphers.c,v 1.9 2021/05/03 23:42:04 inoguchi Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2021 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2021 Theo Buehler <tb@openbsd.org> |
4 | * | 4 | * |
@@ -353,7 +353,7 @@ handshake(SSL *client_ssl, SSL *server_ssl, const char *description) | |||
353 | } | 353 | } |
354 | 354 | ||
355 | static int | 355 | static int |
356 | shutdown(SSL *client_ssl, SSL *server_ssl, const char *description) | 356 | shutdown_all(SSL *client_ssl, SSL *server_ssl, const char *description) |
357 | { | 357 | { |
358 | int loops = 0, client_ret = 0, server_ret = 0; | 358 | int loops = 0, client_ret = 0, server_ret = 0; |
359 | 359 | ||
@@ -442,7 +442,7 @@ test_get_shared_ciphers(const struct ssl_shared_ciphers_test_data *test) | |||
442 | goto err; | 442 | goto err; |
443 | } | 443 | } |
444 | 444 | ||
445 | if (!shutdown(client_ssl, server_ssl, test->description)) | 445 | if (!shutdown_all(client_ssl, server_ssl, test->description)) |
446 | goto err; | 446 | goto err; |
447 | 447 | ||
448 | failed = check_shared_ciphers(test, buf); | 448 | failed = check_shared_ciphers(test, buf); |
@@ -462,7 +462,7 @@ main(int argc, char **argv) | |||
462 | size_t i; | 462 | size_t i; |
463 | int failed = 0; | 463 | int failed = 0; |
464 | 464 | ||
465 | if (asprintf(&server_cert, "%s/../certs/server.pem", CURDIR) == -1) { | 465 | if (asprintf(&server_cert, "%s/server.pem", CERTSDIR) == -1) { |
466 | fprintf(stderr, "asprintf server_cert failed\n"); | 466 | fprintf(stderr, "asprintf server_cert failed\n"); |
467 | failed = 1; | 467 | failed = 1; |
468 | goto err; | 468 | goto err; |