Re: libpq ssl -> clear fallback looses error messages

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq ssl -> clear fallback looses error messages
Date: 2008-10-10 23:44:01
Message-ID: 48EFE8C1.1050004@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> I noticed while working on general fixes for the certificate handling
>> that if we have a connection being attempted with sslmode=prefer (which
>> happens to be our default), we will loose error messages.
>
> Yeah, this came up awhile ago. I don't see any easy solution that
> isn't just moving the bad cases around ... although maybe moving them
> away from the default/common cases could be a good thing anyway.

I think it would.

>> Basically, if we fail the SSL connection, we will throw away the error
>> message and try a cleartext connection.
>
> Maybe the answer is to not throw away the first error message? But
> presenting both messages could be confusing too.

Do we have the infrastructure to report more than one error? I thought
we didn't...

//Magnus

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-10-10 23:50:24 Re: Contrib, schema, and load_module
Previous Message Tom Lane 2008-10-10 23:41:21 Re: libpq ssl -> clear fallback looses error messages