Re: Debian readline/libedit breakage - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Debian readline/libedit breakage
Date
Msg-id AANLkTinFM1Sa5S=Fm2Yhi_avA8iFN-i7Ld2=XhWQ-d2q@mail.gmail.com
Whole thread Raw
In response to Re: Debian readline/libedit breakage  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Feb 18, 2011 at 16:51, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> On 02/17/2011 04:09 PM, Martijn van Oosterhout wrote:
>>> This is supported. Where it goes wonky is that this also has to work
>>> when the connection is via SSL. So libpq provides a function to return
>>> (via a void*) a pointer to the OpenSSL structure so that can be used to
>>> communicate with the server.
>
>> Ugh. Maybe not the best design decision we've ever made.
>
> libpq-fe.h is pretty clear on this matter:
>
> /* Get the OpenSSL structure associated with a connection. Returns NULL for
>  * unencrypted connections or if any other TLS library is in use. */
> extern void *PQgetssl(PGconn *conn);
>
> We are under no compulsion to emulate OpenSSL if we switch to another
> library.  The design intent is that we'd provide a separate function
> (PQgetnss?) and callers that know how to use that library would call
> that function.  If they don't, it's not our problem.

Yeah, the only issue there is that it should perhaps have been called
PQgetopenssl(). We did that right for PQinitOpenSSL(). But then not
for PQinitSSL(). So we aren't exactly consistent..

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Debian readline/libedit breakage
Next
From: Simon Riggs
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Make a hard state change from catchup to streaming mode.