|From:||Andrew Dunstan <andrew(at)dunslane(dot)net>|
|To:||Daniel Gustafsson <daniel(at)yesql(dot)se>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>|
|Cc:||PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>|
|Subject:||Re: Refactor SSL test framework to support multiple TLS libraries|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
On 3/24/21 7:49 PM, Daniel Gustafsson wrote:
>> On 25 Mar 2021, at 00:26, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>> On 2021-Mar-25, Daniel Gustafsson wrote:
>>> Attached is a v2 which addresses the comments raised on the main NSS thread, as
>>> well as introduces named parameters for the server cert function to make the
>>> test code easier to read.
>> I don't like this patch. I think your SSL::Server::OpenSSL and
>> SSL::Server::NSS packages should be doing "use parent SSL::Server";
>> having SSL::Server grow a line to "use" its subclass
>> SSL::Server::OpenSSL and import its get_new_openssl_backend() method
>> seems to go against the grain.
> I'm far from skilled at Perl module inheritance but that makes sense, I'll take
> a stab at that after some sleep and coffee.
The thing is that SSLServer isn't currently constructed in an OO
fashion. Typically, OO modules in perl don't export anything, and all
access is via the class (for the constructor or static methods) or
instances, as in
my $instance = MyClass->new();
In such a module you should not see lines using Exporter or defining
So probably the first step in this process would be to recast SSLServer
as an OO type module, without subclassing it, and then create a subclass
along the lines Alvarro suggests.
If this is all strange to you, I can help a bit.
Incidentally, I'm not sure why we need to break SSLServer into
SSL::Server - are we expecting to create other children of the SSL
|Next Message||David Steele||2021-03-25 13:32:05||Re: pg_rewind copies|
|Previous Message||Fujii Masao||2021-03-25 13:14:51||Re: Is it useful to record whether plans are generic or custom?|