Skip tests using KTLS RX if KTLS RX is not supported.
authorJohn Baldwin <jhb@FreeBSD.org>
Wed, 29 Jul 2020 22:08:25 +0000 (15:08 -0700)
committerMatt Caswell <matt@openssl.org>
Mon, 31 Aug 2020 08:34:19 +0000 (09:34 +0100)
This skips tests using KTLS RX when run on systems that only support
KTLS TX.

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12111)

test/sslapitest.c

index 0914ac559cc4d2416549b554b31e24b2fe15cca7..4ad8c450c199de993cc4e59a7bc49cf391ebfc84 100644 (file)
@@ -1203,6 +1203,11 @@ static int test_ktls(int test)
     sis_ktls_tx = (test & 4) != 0;
     sis_ktls_rx = (test & 8) != 0;
 
+#if defined(OPENSSL_NO_KTLS_RX)
+    if (cis_ktls_rx || sis_ktls_rx)
+        return 1;
+#endif
+
     testresult = 1;
 #ifdef OPENSSL_KTLS_AES_GCM_128
     testresult &= execute_test_ktls(cis_ktls_tx, cis_ktls_rx, sis_ktls_tx,