Re: PQgetssl() and alternative SSL implementations

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PQgetssl() and alternative SSL implementations
Date: 2015-02-03 17:58:28
Message-ID: 54D10C44.7040607@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/28/2015 08:05 PM, Tom Lane wrote:
> Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> writes:
>> Right, that was the idea. I wanted it to include the word "OpenSSL", to
>> make it clear in the callers that it's specific to OpenSSL. And SSL,
>> because that's the name of the struct. I agree it looks silly, though.
>> One idea is to have two separate arguments: the implementation name, and
>> the struct name. PQgetSSLstruct(&ssl, "OpenSSL", "SSL") would look less
>> silly.
>
> That's probably overkill. Why not establish a convention that the "main"
> API struct for the library doesn't have to be named? So it's just
> PQgetSSLstruct(&ssl, "OpenSSL"), and you only need strange naming if
> you're dealing with a library that actually has more than one API object
> that needs to be fetched this way. (That set is likely empty...)

Works for me. Committed that way.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2015-02-03 17:58:30 pgsql: Add API functions to libpq to interrogate SSL related stuff.
Previous Message Tom Lane 2015-02-03 16:53:06 Re: Release note bloat is getting out of hand