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(-)