From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: SSL TAP test backend library independence refactoring
Date: Sat, 26 Mar 2022 21:06:01 +0000
Message-ID: <E1nYDbk-001VyX-BG@gemulon.postgresql.org> (raw)
SSL TAP test backend library independence refactoring
The SSL TAP tests were tightly coupled to the OpenSSL implementation,
making it hard to add support for additional SSL/TLS backends. This
refactoring makes the test avoid depending on specific implementations
The SSLServer Perl module is renamed SSL::Server, which in turn use
SSL::Backend::X where X is the backend pointed to by with_ssl. Each
backend will implement its own module responsible for setting up keys,
certs and to resolve sslkey values to their implementation specific
value (file paths or vault nicknames etc). Further, switch_server_cert
now takes a set of named parameters rather than a fixed set which used
defaults. The modules also come with POD documentation.
There are a few testcases which still use OpenSSL specifics, but it's
not entirely clear how to abstract those until we have another library
implemented.
Original patch by me, with lots of rework by Andrew Dunstan to turn it
into better Perl.
Discussion: https://postgr.es/m/AA18A362-CA65-4F9A-AF61-76AE318FE97C@yesql.se
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4a7e964fc67a541b6ea1b72729ad3f8e632d003c
Modified Files
--------------
src/test/ssl/t/001_ssltests.pl | 143 ++++++--------
src/test/ssl/t/002_scram.pl | 17 +-
src/test/ssl/t/003_sslinfo.pl | 28 ++-
src/test/ssl/t/SSL/Backend/OpenSSL.pm | 226 ++++++++++++++++++++++
src/test/ssl/t/SSL/Server.pm | 353 ++++++++++++++++++++++++++++++++++
src/test/ssl/t/SSLServer.pm | 219 ---------------------
6 files changed, 664 insertions(+), 322 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: dgustafsson@postgresql.org
Subject: Re: pgsql: SSL TAP test backend library independence refactoring
In-Reply-To: <E1nYDbk-001VyX-BG@gemulon.postgresql.org>
References: <E1nYDbk-001VyX-BG@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox