diff options
author | tb <> | 2022-08-05 17:12:32 +0000 |
---|---|---|
committer | tb <> | 2022-08-05 17:12:32 +0000 |
commit | 29a681c37560876c136a94a13506866c4e126c87 (patch) | |
tree | 852d8ec283791b9ba329c6ce02119c49bf325ac6 | |
parent | 026b9e1323f520770df79024834517c63830ebb8 (diff) | |
download | openbsd-29a681c37560876c136a94a13506866c4e126c87.tar.gz openbsd-29a681c37560876c136a94a13506866c4e126c87.tar.bz2 openbsd-29a681c37560876c136a94a13506866c4e126c87.zip |
Use the FAIL macro instead of fprintf(stderr, "FAIL: ...\n");
-rw-r--r-- | src/regress/lib/libssl/tlsext/tlsexttest.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/regress/lib/libssl/tlsext/tlsexttest.c b/src/regress/lib/libssl/tlsext/tlsexttest.c index ac6799a721..84f7158dde 100644 --- a/src/regress/lib/libssl/tlsext/tlsexttest.c +++ b/src/regress/lib/libssl/tlsext/tlsexttest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tlsexttest.c,v 1.72 2022/08/05 17:08:02 tb Exp $ */ | 1 | /* $OpenBSD: tlsexttest.c,v 1.73 2022/08/05 17:12:32 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> |
4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> | 4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> |
@@ -1645,19 +1645,19 @@ test_tlsext_sigalgs_client(void) | |||
1645 | ssl->s3->hs.our_max_tls_version = TLS1_1_VERSION; | 1645 | ssl->s3->hs.our_max_tls_version = TLS1_1_VERSION; |
1646 | 1646 | ||
1647 | if (client_funcs->needs(ssl, SSL_TLSEXT_MSG_CH)) { | 1647 | if (client_funcs->needs(ssl, SSL_TLSEXT_MSG_CH)) { |
1648 | fprintf(stderr, "FAIL: client should not need sigalgs\n"); | 1648 | FAIL("client should not need sigalgs\n"); |
1649 | goto done; | 1649 | goto done; |
1650 | } | 1650 | } |
1651 | 1651 | ||
1652 | ssl->s3->hs.our_max_tls_version = TLS1_2_VERSION; | 1652 | ssl->s3->hs.our_max_tls_version = TLS1_2_VERSION; |
1653 | 1653 | ||
1654 | if (!client_funcs->needs(ssl, SSL_TLSEXT_MSG_CH)) { | 1654 | if (!client_funcs->needs(ssl, SSL_TLSEXT_MSG_CH)) { |
1655 | fprintf(stderr, "FAIL: client should need sigalgsn"); | 1655 | FAIL("client should need sigalgs\n"); |
1656 | goto done; | 1656 | goto done; |
1657 | } | 1657 | } |
1658 | 1658 | ||
1659 | if (!client_funcs->build(ssl, SSL_TLSEXT_MSG_CH, &cbb)) { | 1659 | if (!client_funcs->build(ssl, SSL_TLSEXT_MSG_CH, &cbb)) { |
1660 | fprintf(stderr, "FAIL: client failed to build sigalgsn"); | 1660 | FAIL("client failed to build sigalgs\n"); |
1661 | goto done; | 1661 | goto done; |
1662 | } | 1662 | } |
1663 | 1663 | ||
@@ -1665,13 +1665,13 @@ test_tlsext_sigalgs_client(void) | |||
1665 | errx(1, "failed to finish CBB"); | 1665 | errx(1, "failed to finish CBB"); |
1666 | 1666 | ||
1667 | if (dlen != sizeof(tlsext_sigalgs_client)) { | 1667 | if (dlen != sizeof(tlsext_sigalgs_client)) { |
1668 | fprintf(stderr, "FAIL: got client sigalgs length %zu, " | 1668 | FAIL("got client sigalgs length %zu, " |
1669 | "want length %zu\n", dlen, sizeof(tlsext_sigalgs_client)); | 1669 | "want length %zu\n", dlen, sizeof(tlsext_sigalgs_client)); |
1670 | goto done; | 1670 | goto done; |
1671 | } | 1671 | } |
1672 | 1672 | ||
1673 | if (memcmp(data, tlsext_sigalgs_client, dlen) != 0) { | 1673 | if (memcmp(data, tlsext_sigalgs_client, dlen) != 0) { |
1674 | fprintf(stderr, "FAIL: client SNI differs:\n"); | 1674 | FAIL("client SNI differs:\n"); |
1675 | fprintf(stderr, "received:\n"); | 1675 | fprintf(stderr, "received:\n"); |
1676 | hexdump(data, dlen); | 1676 | hexdump(data, dlen); |
1677 | fprintf(stderr, "test data:\n"); | 1677 | fprintf(stderr, "test data:\n"); |
@@ -1681,7 +1681,7 @@ test_tlsext_sigalgs_client(void) | |||
1681 | 1681 | ||
1682 | CBS_init(&cbs, tlsext_sigalgs_client, sizeof(tlsext_sigalgs_client)); | 1682 | CBS_init(&cbs, tlsext_sigalgs_client, sizeof(tlsext_sigalgs_client)); |
1683 | if (!server_funcs->parse(ssl, SSL_TLSEXT_MSG_CH, &cbs, &alert)) { | 1683 | if (!server_funcs->parse(ssl, SSL_TLSEXT_MSG_CH, &cbs, &alert)) { |
1684 | fprintf(stderr, "FAIL: failed to parse client SNI\n"); | 1684 | FAIL("failed to parse client SNI\n"); |
1685 | goto done; | 1685 | goto done; |
1686 | } | 1686 | } |
1687 | if (CBS_len(&cbs) != 0) { | 1687 | if (CBS_len(&cbs) != 0) { |
@@ -1730,12 +1730,12 @@ test_tlsext_sigalgs_server(void) | |||
1730 | errx(1, "failed to fetch sigalgs funcs"); | 1730 | errx(1, "failed to fetch sigalgs funcs"); |
1731 | 1731 | ||
1732 | if (server_funcs->needs(ssl, SSL_TLSEXT_MSG_SH)) { | 1732 | if (server_funcs->needs(ssl, SSL_TLSEXT_MSG_SH)) { |
1733 | fprintf(stderr, "FAIL: server should not need sigalgs\n"); | 1733 | FAIL("server should not need sigalgs\n"); |
1734 | goto done; | 1734 | goto done; |
1735 | } | 1735 | } |
1736 | 1736 | ||
1737 | if (server_funcs->build(ssl, SSL_TLSEXT_MSG_SH, &cbb)) { | 1737 | if (server_funcs->build(ssl, SSL_TLSEXT_MSG_SH, &cbb)) { |
1738 | fprintf(stderr, "FAIL: server should not build sigalgs\n"); | 1738 | FAIL("server should not build sigalgs\n"); |
1739 | goto done; | 1739 | goto done; |
1740 | } | 1740 | } |
1741 | 1741 | ||
@@ -1744,7 +1744,7 @@ test_tlsext_sigalgs_server(void) | |||
1744 | 1744 | ||
1745 | CBS_init(&cbs, tlsext_sigalgs_client, sizeof(tlsext_sigalgs_client)); | 1745 | CBS_init(&cbs, tlsext_sigalgs_client, sizeof(tlsext_sigalgs_client)); |
1746 | if (client_funcs->parse(ssl, SSL_TLSEXT_MSG_SH, &cbs, &alert)) { | 1746 | if (client_funcs->parse(ssl, SSL_TLSEXT_MSG_SH, &cbs, &alert)) { |
1747 | fprintf(stderr, "FAIL: server should not parse sigalgs\n"); | 1747 | FAIL("server should not parse sigalgs\n"); |
1748 | goto done; | 1748 | goto done; |
1749 | } | 1749 | } |
1750 | 1750 | ||