aboutsummaryrefslogtreecommitdiff
path: root/src/sp/transport/tls
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-03 16:26:19 -0800
committerGarrett D'Amore <garrett@damore.org>2024-11-03 16:50:04 -0800
commitc2e396d5f9b0151b3564073e9f439fa492e735f6 (patch)
treeee699f2b76a9d0e6995a475cadc3812393fa08f7 /src/sp/transport/tls
parente7802b729a5b837df9bcac80b94196d015c2b29f (diff)
downloadnng-c2e396d5f9b0151b3564073e9f439fa492e735f6.tar.gz
nng-c2e396d5f9b0151b3564073e9f439fa492e735f6.tar.bz2
nng-c2e396d5f9b0151b3564073e9f439fa492e735f6.zip
Introduce NUTS_SKIP and use it in a few tests.
This lets us see that we are skipping tests due to lack of support, and makes it a little clearer to an observer.
Diffstat (limited to 'src/sp/transport/tls')
-rw-r--r--src/sp/transport/tls/tls_tran_test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sp/transport/tls/tls_tran_test.c b/src/sp/transport/tls/tls_tran_test.c
index 1965bdce..f186c3d3 100644
--- a/src/sp/transport/tls/tls_tran_test.c
+++ b/src/sp/transport/tls/tls_tran_test.c
@@ -312,6 +312,7 @@ test_tls_recv_max(void)
void
test_tls_psk(void)
{
+#ifdef NNG_SUPP_TLS_PSK
char msg[256];
char buf[256];
nng_socket s0;
@@ -348,6 +349,9 @@ test_tls_psk(void)
NUTS_CLOSE(s1);
nng_tls_config_free(c0);
nng_tls_config_free(c1);
+#else
+ NUTS_SKIP("no PSK support");
+#endif
}
NUTS_TESTS = {
@@ -360,8 +364,6 @@ NUTS_TESTS = {
{ "tls no delay option", test_tls_no_delay_option },
{ "tls keep alive option", test_tls_keep_alive_option },
{ "tls recv max", test_tls_recv_max },
-#ifdef NNG_SUPP_TLS_PSK
{ "tls pre-shared key", test_tls_psk },
-#endif
{ NULL, NULL },
};