Don't test SRP when it's disabled
authorRichard Levitte <levitte@openssl.org>
Wed, 4 Jan 2017 07:47:05 +0000 (08:47 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 4 Jan 2017 14:24:34 +0000 (15:24 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2172)

test/recipes/70-test_sslmessages.t

index 79c7eb1ea960d866723e28f9fb9b08e49ffe5347..1fff99ba53e74b4685d6730feb9d19a467dd1df0 100755 (executable)
@@ -363,18 +363,23 @@ SKIP: {
                    "NPN handshake test");
 }
 
-#Test 20: SRP extension
-#Note: We are not actually going to perform an SRP handshake (TLSProxy does not
-#support it). However it is sufficient for us to check that the SRP extension
-#gets added on the client side. There is no SRP extension generated on the
-#server side anyway.
-$proxy->clear();
-$proxy->clientflags("-no_tls1_3 -srpuser user -srppass pass:pass");
-$proxy->start();
-checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
-               checkhandshake::DEFAULT_EXTENSIONS
-               | checkhandshake::SRP_CLI_EXTENSION,
-               "SRP extension test");
+SKIP: {
+    skip "No SRP support in this OpenSSL build", 1
+        if disabled("srp");
+
+    #Test 20: SRP extension
+    #Note: We are not actually going to perform an SRP handshake (TLSProxy
+    #does not support it). However it is sufficient for us to check that the
+    #SRP extension gets added on the client side. There is no SRP extension
+    #generated on the server side anyway.
+    $proxy->clear();
+    $proxy->clientflags("-no_tls1_3 -srpuser user -srppass pass:pass");
+    $proxy->start();
+    checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
+                   checkhandshake::DEFAULT_EXTENSIONS
+                   | checkhandshake::SRP_CLI_EXTENSION,
+                   "SRP extension test");
+}
 
 #Test 21: EC handshake
 SKIP: {