Re: [HACKERS] new libpq SSL connection option

2009-01-07 Thread Magnus Hagander
Alex Hunsaker wrote: On Fri, Jan 2, 2009 at 03:13, Magnus Hagander mag...@hagander.net wrote: Andrew Chernow wrote: Yes, the homedir variable is used again later in the function. homedir could be invalid since pqGetHomeDirectory might not get called. Maybe something like below would do the

Re: [HACKERS] new libpq SSL connection option

2009-01-02 Thread Magnus Hagander
Andrew Chernow wrote: Magnus Hagander wrote: Alex Hunsaker wrote: On Sat, Dec 27, 2008 at 11:50, Andrew Chernow a...@esilo.com wrote: Why does pqGetHomeDirectory have to succeed to use conn-sslrootcert. Maybe this should be an OR of the two since sslrootcert is not dependent on homedir?

Re: [HACKERS] new libpq SSL connection option

2009-01-02 Thread Andrew Chernow
Also, it looks like we have the same problem with the private key, in client_cert_cb(), agreed? //Magnus Yeah, same issue in that function. I missed that. My grep'n was obviously brain dead. It almost feels like there should be some util functions like get_sslrootcert(conn, path_buf,

Re: [HACKERS] new libpq SSL connection option

2009-01-02 Thread Alex Hunsaker
On Fri, Jan 2, 2009 at 03:13, Magnus Hagander mag...@hagander.net wrote: Andrew Chernow wrote: Yes, the homedir variable is used again later in the function. homedir could be invalid since pqGetHomeDirectory might not get called. Maybe something like below would do the trick: How about

Re: [HACKERS] new libpq SSL connection option

2008-12-29 Thread Alex Hunsaker
On Sat, Dec 27, 2008 at 11:50, Andrew Chernow a...@esilo.com wrote: Why does pqGetHomeDirectory have to succeed to use conn-sslrootcert. Maybe this should be an OR of the two since sslrootcert is not dependent on homedir? around line 970 src/interfaces/libpq/fe-secure.c if (conn-sslrootcert

Re: [HACKERS] new libpq SSL connection option

2008-12-29 Thread Magnus Hagander
Alex Hunsaker wrote: On Sat, Dec 27, 2008 at 11:50, Andrew Chernow a...@esilo.com wrote: Why does pqGetHomeDirectory have to succeed to use conn-sslrootcert. Maybe this should be an OR of the two since sslrootcert is not dependent on homedir? around line 970 src/interfaces/libpq/fe-secure.c

Re: [HACKERS] new libpq SSL connection option

2008-12-29 Thread Andrew Chernow
Magnus Hagander wrote: Alex Hunsaker wrote: On Sat, Dec 27, 2008 at 11:50, Andrew Chernow a...@esilo.com wrote: Why does pqGetHomeDirectory have to succeed to use conn-sslrootcert. Maybe this should be an OR of the two since sslrootcert is not dependent on homedir? around line 970

Re: [HACKERS] new libpq SSL connection option

2008-12-27 Thread Andrew Chernow
Why does pqGetHomeDirectory have to succeed to use conn-sslrootcert. Maybe this should be an OR of the two since sslrootcert is not dependent on homedir? around line 970 src/interfaces/libpq/fe-secure.c if (conn-sslrootcert || pqGetHomeDirectory(homedir, sizeof(homedir))) -- Andrew Chernow

Re: [HACKERS] new libpq SSL connection option

2008-12-09 Thread Magnus Hagander
Alex Hunsaker wrote: On Fri, Dec 5, 2008 at 14:22, Andrew Chernow [EMAIL PROTECTED] wrote: Alex Hunsaker wrote: On Fri, Dec 5, 2008 at 13:58, Andrew Chernow [EMAIL PROTECTED] wrote: Who anyone be opposed to ssldir = path as a connection option? Currently, there is no way to change the

Re: [HACKERS] new libpq SSL connection option

2008-12-09 Thread Andrew Chernow
Magnus Hagander wrote: * Renamed PGROOTCERT to PGSSLROOTCERT +primaryenvarPGROOTCERT/envar/primary Looks like the old env name is still being used in the sgml docs. I like the flexibility this patch offers. -- Andrew Chernow eSilo, LLC every bit counts http://www.esilo.com/ --

Re: [HACKERS] new libpq SSL connection option

2008-12-09 Thread Magnus Hagander
Andrew Chernow wrote: Magnus Hagander wrote: * Renamed PGROOTCERT to PGSSLROOTCERT +primaryenvarPGROOTCERT/envar/primary Looks like the old env name is still being used in the sgml docs. Yes - I did say I hadn't updated the docs yet :-) //Magnus -- Sent via pgsql-hackers

Re: [HACKERS] new libpq SSL connection option

2008-12-09 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: I would also like to look this over completely - we only support loading the KEY from the smartcard, but you still have to manually copy the certificate to your machine. I don't know exactly how you're supposed to do this in OpenSSL - some googling

Re: [HACKERS] new libpq SSL connection option

2008-12-09 Thread Magnus Hagander
Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: I would also like to look this over completely - we only support loading the KEY from the smartcard, but you still have to manually copy the certificate to your machine. I don't know exactly how you're supposed to do this in OpenSSL -

[HACKERS] new libpq SSL connection option

2008-12-05 Thread Andrew Chernow
Who anyone be opposed to ssldir = path as a connection option? Currently, there is no way to change the homedir method ~/.postgresql ... or am I missing something? I am willing to supply a patch. -- Andrew Chernow eSilo, LLC every bit counts http://www.esilo.com/ -- Sent via pgsql-hackers

Re: [HACKERS] new libpq SSL connection option

2008-12-05 Thread Alex Hunsaker
On Fri, Dec 5, 2008 at 13:58, Andrew Chernow [EMAIL PROTECTED] wrote: Who anyone be opposed to ssldir = path as a connection option? Currently, there is no way to change the homedir method ~/.postgresql ... or am I missing something? I am willing to supply a patch. You mean something like the

Re: [HACKERS] new libpq SSL connection option

2008-12-05 Thread Andrew Chernow
Alex Hunsaker wrote: On Fri, Dec 5, 2008 at 13:58, Andrew Chernow [EMAIL PROTECTED] wrote: Who anyone be opposed to ssldir = path as a connection option? Currently, there is no way to change the homedir method ~/.postgresql ... or am I missing something? I am willing to supply a patch. You

Re: [HACKERS] new libpq SSL connection option

2008-12-05 Thread Alex Hunsaker
On Fri, Dec 5, 2008 at 14:22, Andrew Chernow [EMAIL PROTECTED] wrote: Alex Hunsaker wrote: On Fri, Dec 5, 2008 at 13:58, Andrew Chernow [EMAIL PROTECTED] wrote: Who anyone be opposed to ssldir = path as a connection option? Currently, there is no way to change the homedir method