]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: make sure gnuserv-tls has SRP support before using it
authorDaniel Stenberg <daniel@haxx.se>
Wed, 15 Feb 2023 14:04:07 +0000 (15:04 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 15 Feb 2023 22:42:42 +0000 (23:42 +0100)
Reported-by: fundawang on github
Fixes #10522
Closes #10524

tests/runtests.pl
tests/sshhelp.pm

index 5cd87897a393c8045485f8dd88fca7cd7498bf1b..1510527e3c9e55c48e20e318225ec2a2bb73a497 100755 (executable)
@@ -5382,7 +5382,7 @@ sub startservers {
         elsif($what eq "httptls") {
             if(!$httptlssrv) {
                 # for now, we can't run http TLS-EXT tests without gnutls-serv
-                return "no gnutls-serv";
+                return "no gnutls-serv (with SRP support)";
             }
             if($torture && $run{'httptls'} &&
                !responsive_httptls_server($verbose, "IPv4")) {
index 2a25ca734c6be6a87042a6f8259585f412009768..6cba41d9efb37857845fc5e870e80fbead019cda 100644 (file)
@@ -408,7 +408,16 @@ sub find_sshkeygen {
 # Find httptlssrv (gnutls-serv) and return canonical filename
 #
 sub find_httptlssrv {
-    return find_exe_file_hpath($httptlssrvexe);
+    my $p = find_exe_file_hpath($httptlssrvexe);
+    my @o = `$p -l`;
+    my $found;
+    for(@o) {
+        if(/Key exchange: SRP/) {
+            $found = 1;
+            last;
+        }
+    }
+    return $p if($found);
 }