Re: PQinitSSL broken in some use casesf - Mailing list pgsql-hackers

From Andrew Chernow
Subject Re: PQinitSSL broken in some use casesf
Date
Msg-id 4995BD05.5080900@esilo.com
Whole thread Raw
In response to Re: PQinitSSL broken in some use casesf  (Andrew Chernow <ac@esilo.com>)
Responses Re: PQinitSSL broken in some use casesf
List pgsql-hackers
Andrew Chernow wrote:
> Robert Haas wrote:
>> On Fri, Feb 13, 2009 at 12:06 PM, Andrew Chernow <ac@esilo.com> wrote:
>>> Patch attached.
>>>
>>> One thing I noticed is the ssl_open_connections variable is ref counting
>>> connections when pq_initssllib is true.  But, it now only affects crypto
>>> library init and cleanup calls.  Point is, ref counting is only 
>>> needed if
>>> pq_initcryptolib is true and it should be renamed to
>>> crypto_open_connections.  I didn't do this in the patch.  Its the 
>>> same old
>>> name and the counter is incremented if pq_initssllib or 
>>> pq_initcryptolib is
>>> true.  Please advise.
>>
>> I'll review this in more detail when I have a chance, but it certainly
>> won't be committable without doc changes, and it's probably best if
>> you write those and include them in the patch.
>>

One problem with this patch is that a libpq app using PQinitSSL(0) is 
under the assumption that this shuts off ssl init and crypto init.  That 
app might be doing its own crypto init which would be overwritten by 
libpq because the app is unaware of PQinitCrypto (if and when it 
eventually links with 8.4 libpq).  This feels like a very uncommon 
situation, but a possible gotcha.

-- 
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/


pgsql-hackers by date:

Previous
From: Andrew Chernow
Date:
Subject: Re: PQinitSSL broken in some use casesf
Next
From: Andrew Chernow
Date:
Subject: Re: PQinitSSL broken in some use casesf