summaryrefslogtreecommitdiff
path: root/src/test/ssl/t/SSL/Server.pm
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-05-09 11:50:33 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2025-05-09 11:50:33 -0400
commit1ddb9e14eadf95802c835a3754af5621615ded30 (patch)
treea0924a6c900db0bb762d1216c0ec6da82b3469b9 /src/test/ssl/t/SSL/Server.pm
parent5261b40acb67fdb8ed1e5976ae99599f16864c93 (diff)
Centralize ssl tests' check for whether we're using LibreSSL.
Right now there's only one caller, so that this is merely an exercise in shoving code from one module to another, but there will shortly be another one. It seems better to avoid having two copies of this highly-subject-to-change test. Back-patch to v15, where we first introduced some tests that don't work with LibreSSL. Reported-by: Thomas Munro <thomas.munro@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://postgr.es/m/CA+hUKG+fLqyweHqFSBcErueUVT0vDuSNWui-ySz3+d_APmq7dw@mail.gmail.com Backpatch-through: 15
Diffstat (limited to 'src/test/ssl/t/SSL/Server.pm')
-rw-r--r--src/test/ssl/t/SSL/Server.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ssl/t/SSL/Server.pm b/src/test/ssl/t/SSL/Server.pm
index e3f8cbb451f..c7c894e209c 100644
--- a/src/test/ssl/t/SSL/Server.pm
+++ b/src/test/ssl/t/SSL/Server.pm
@@ -243,6 +243,23 @@ sub ssl_library
=pod
+=item $server->is_libressl()
+
+Detect whether the currently used SSL backend is LibreSSL.
+(Ideally we'd not need this hack, but presently we do.)
+
+=cut
+
+sub is_libressl
+{
+ my $self = shift;
+ my $backend = $self->{backend};
+
+ return $backend->library_is_libressl();
+}
+
+=pod
+
=item switch_server_cert(params)
Change the configuration to use the given set of certificate, key, ca and