pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [COMMITTERS] pgsql: Add API functions to libpq to interrogate SSL related stuff.
Date: Wed, 4 Feb 2015 09:35:17 +0200
Message-ID: <54D1CBB5.6030300@vmware.com> (raw)
In-Reply-To: <12315.1423009403@sss.pgh.pa.us>
References: <E1YIhk6-00032E-Jx@gemulon.postgresql.org>
	<12315.1423009403@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 02/04/2015 02:23 AM, Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@iki.fi> writes:
>> Add API functions to libpq to interrogate SSL related stuff.
>
> This patch is one large brick shy of a load: it creates exported libpq
> functions but fails to ensure they always exist.  That's why jacana is
> unhappy; though TBH I'm astonished that any non-ssl-enabled builds
> are passing.  Apparently missing library functions are less of a hard
> error on Linux than they ought to be.

Yeah, that's surprising. I don't see any option in ld man page to make 
it warn either.

This also shows that we don't have any regression tests for this 
function. It's trivial, so I'm not worried about that, but in general it 
would be good to have a regression tests suite specifically for libpq. 
There are probably many other things that are not exercised by psql.

> I think probably the exported functions need to be defined in fe-exec.c
> or fe-connect.c, with bodies along the lines of
>
> #ifdef USE_OPENSSL
>     call OpenSSL-specific function
> #else
>     return NULL
> #endif
>
> (or whatever's appropriate when no SSL support).  We do want these
> functions to exist even in non-SSL-enabled builds.

Sure. There are dummy versions of all the other SSL-related functions, I 
just missed PQsslAttributes. The OpenSSL-versions are in 
fe-secure-openssl.c, and the dummy ones are in fe-secure.c, within a 
"#ifndef USE_SSL" block.

Fixed now.

- Heikki



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (3+ messages)

Message-ID: <54D1CBB5.6030300@vmware.com>
Permalink:  ../54D1CBB5.6030300@vmware.com/
Also on:    postgresql.org/message-id/54D1CBB5.6030300@vmware.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: hlinnakangas@vmware.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
  Subject: Re: [COMMITTERS] pgsql: Add API functions to libpq to interrogate SSL related stuff.
  In-Reply-To: <54D1CBB5.6030300@vmware.com>
  References: <E1YIhk6-00032E-Jx@gemulon.postgresql.org> <12315.1423009403@sss.pgh.pa.us> <54D1CBB5.6030300@vmware.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox