summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Monnerat <patrick@monnerat.net>2023-01-05 17:26:50 +0100
committerDaniel Stenberg <daniel@haxx.se>2023-01-05 23:49:10 +0100
commitf22cd67b7d3ad6646e3e6ae3aea7c3b9cbe8261c (patch)
tree1c7c32333eb55aa4595fad6f4a406f71f0b29cbf
parentf92aae86c6796ec77d12dbed4706a46d697f0842 (diff)
downloadcurl-f22cd67b7d3ad6646e3e6ae3aea7c3b9cbe8261c.tar.gz
runtests: fix detection of TLS backends
Built-in TLS backends are detected at test time by scanning for their names in the version string line returned by the cli tool: as this line may also list the libssh configuration that mentions its own backend, the curl backend may be wrongly determined. In example, if the version line contains "libssh/0.10.4/openssl/zlib", OpenSSL is detected as a curl-configured backend even if not. This fix requires the backend names to appear as full words preceded by spacing in the version line to be recognized as curl TLS backends. Closes #10236
-rwxr-xr-xtests/runtests.pl22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 67e42b77e..71644ad18 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -3128,45 +3128,45 @@ sub checksystem {
$has_win32 = 1;
$has_mingw = 1 if ($curl =~ /-pc-mingw32/);
}
- if ($libcurl =~ /(winssl|schannel)/i) {
+ if ($libcurl =~ /\s(winssl|schannel)\b/i) {
$has_schannel=1;
$has_sslpinning=1;
}
- elsif ($libcurl =~ /openssl/i) {
+ elsif ($libcurl =~ /\sopenssl\b/i) {
$has_openssl=1;
$has_sslpinning=1;
}
- elsif ($libcurl =~ /gnutls/i) {
+ elsif ($libcurl =~ /\sgnutls\b/i) {
$has_gnutls=1;
$has_sslpinning=1;
}
- elsif ($libcurl =~ /rustls-ffi/i) {
+ elsif ($libcurl =~ /\srustls-ffi\b/i) {
$has_rustls=1;
}
- elsif ($libcurl =~ /nss/i) {
+ elsif ($libcurl =~ /\snss\b/i) {
$has_nss=1;
$has_sslpinning=1;
}
- elsif ($libcurl =~ /wolfssl/i) {
+ elsif ($libcurl =~ /\swolfssl\b/i) {
$has_wolfssl=1;
$has_sslpinning=1;
}
- elsif ($libcurl =~ /bearssl/i) {
+ elsif ($libcurl =~ /\sbearssl\b/i) {
$has_bearssl=1;
}
- elsif ($libcurl =~ /securetransport/i) {
+ elsif ($libcurl =~ /\ssecuretransport\b/i) {
$has_sectransp=1;
$has_sslpinning=1;
}
- elsif ($libcurl =~ /BoringSSL/i) {
+ elsif ($libcurl =~ /\sBoringSSL\b/i) {
$has_boringssl=1;
$has_sslpinning=1;
}
- elsif ($libcurl =~ /libressl/i) {
+ elsif ($libcurl =~ /\slibressl\b/i) {
$has_libressl=1;
$has_sslpinning=1;
}
- elsif ($libcurl =~ /mbedTLS/i) {
+ elsif ($libcurl =~ /\smbedTLS\b/i) {
$has_mbedtls=1;
$has_sslpinning=1;
}