tests: make sure gnuserv-tls has SRP support before using it

Reported-by: fundawang on github
Fixes #10522
Closes #10524
This commit is contained in:
Daniel Stenberg 2023-02-15 15:04:07 +01:00
parent f1d09231ad
commit 2fdc1d816e
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 11 additions and 2 deletions

View 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);
}