summaryrefslogtreecommitdiff
path: root/tests/LightyTest.pm
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2020-10-12 08:08:51 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2020-10-19 21:40:14 -0400
commita363383a922f1e9cee7a849377881c29c0659b36 (patch)
treec0f96a15c92da4f088e9b724700361d1e175ab2c /tests/LightyTest.pm
parent7553ef7f4411ae24a2d293319780aa05a06e4cd8 (diff)
downloadlighttpd-git-a363383a922f1e9cee7a849377881c29c0659b36.tar.gz
[tests] detect multiple SSL/TLS/crypto providers
Diffstat (limited to 'tests/LightyTest.pm')
-rw-r--r--tests/LightyTest.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/LightyTest.pm b/tests/LightyTest.pm
index 5b5d60af..a11c5d8a 100644
--- a/tests/LightyTest.pm
+++ b/tests/LightyTest.pm
@@ -457,4 +457,17 @@ sub has_feature {
return 0;
}
+sub has_crypto {
+ # quick-n-dirty crude parse of "lighttpd -V"
+ # (XXX: should be run on demand and only once per instance, then cached)
+ my ($self) = @_;
+ my $FH;
+ open($FH, "-|",$self->{LIGHTTPD_PATH}, "-V") || return 0;
+ while (<$FH>) {
+ return 1 if (/[+] (?i:OpenSSL|mbedTLS|GnuTLS|WolfSSL|Nettle) support/);
+ }
+ close $FH;
+ return 0;
+}
+
1;