[HACKERS] SSL and USER_CERT_FILE patch

2008-05-15 Thread pgsql
I have submitted a patch that does two things: (1) fixes a bug in the client SSL code that never appended the home directory to the root revocation list. and (2) adds 4 new fields to the connect string: sslkey=fullepath_to_file sslcert=fullpath_to_cert ssltrustcrt=fullpath_to_trusted_cert_file ssl

Re: [HACKERS] SSL and USER_CERT_FILE

2008-05-15 Thread pgsql
> [EMAIL PROTECTED] wrote: >> > [EMAIL PROTECTED] writes: >> >> Maybe we need to go even further and add it to the PQconnect API >> >> sslkey=filename and sslcrt=filename in addition to sslmode? >> > >> > If there's a case to be made for this at all, it should be handled >> > the same way as all ot

Re: [HACKERS] SSL and USER_CERT_FILE

2008-05-15 Thread Magnus Hagander
[EMAIL PROTECTED] wrote: > > [EMAIL PROTECTED] writes: > >> Maybe we need to go even further and add it to the PQconnect API > >> sslkey=filename and sslcrt=filename in addition to sslmode? > > > > If there's a case to be made for this at all, it should be handled > > the same way as all other libp

Re: [HACKERS] SSL and USER_CERT_FILE round 2

2008-05-15 Thread Andrew Dunstan
[EMAIL PROTECTED] wrote: I think if you're going to provide for these then you should also provide for the CA cert and CRL. Otherwise, it seems sensible. I thought about that, but the root and crl are for the server, and that makes sense that the keys would be in the server directo

Re: [HACKERS] SSL and USER_CERT_FILE round 2

2008-05-15 Thread pgsql
> > > [EMAIL PROTECTED] wrote: >> Adding "sslkey" and "sslcert" to the PQconnectdb connection string. >> >> After some discussion, I think it is more appropriate to add the >> key/cert >> file for SSL into the connect string. For example: >> >> PQconnectdb("host=foo dbname=bar sslmode=require >> ss

Re: [HACKERS] SSL and USER_CERT_FILE round 2

2008-05-15 Thread Andrew Dunstan
[EMAIL PROTECTED] wrote: Adding "sslkey" and "sslcert" to the PQconnectdb connection string. After some discussion, I think it is more appropriate to add the key/cert file for SSL into the connect string. For example: PQconnectdb("host=foo dbname=bar sslmode=require sslkey=/opt/myapp/share/ke

[HACKERS] SSL and USER_CERT_FILE round 2

2008-05-15 Thread pgsql
Adding "sslkey" and "sslcert" to the PQconnectdb connection string. After some discussion, I think it is more appropriate to add the key/cert file for SSL into the connect string. For example: PQconnectdb("host=foo dbname=bar sslmode=require sslkey=/opt/myapp/share/keys/client.key sslcert=/opt/my

Re: [HACKERS] SSL and USER_CERT_FILE

2008-05-15 Thread pgsql
> > On May 15, 2008, at 6:31 AM, [EMAIL PROTECTED] wrote: > >>> Mark Woodward wrote: I am using PostgreSQL's SSL support and the conventions for the key and certifications don't make sense from the client perspective. Especially under Windows. I am proposing a few

Re: [HACKERS] SSL and USER_CERT_FILE

2008-05-15 Thread pgsql
> [EMAIL PROTECTED] writes: >> Maybe we need to go even further and add it to the PQconnect API >> sslkey=filename and sslcrt=filename in addition to sslmode? > > If there's a case to be made for this at all, it should be handled the > same way as all other libpq connection parameters. > >

Re: [HACKERS] SSL and USER_CERT_FILE

2008-05-15 Thread Steve Atkins
On May 15, 2008, at 6:31 AM, [EMAIL PROTECTED] wrote: Mark Woodward wrote: I am using PostgreSQL's SSL support and the conventions for the key and certifications don't make sense from the client perspective. Especially under Windows. I am proposing a few simple changes: Adding two API vo

Re: [HACKERS] SSL and USER_CERT_FILE

2008-05-15 Thread Tom Lane
[EMAIL PROTECTED] writes: > Maybe we need to go even further and add it to the PQconnect API > sslkey=filename and sslcrt=filename in addition to sslmode? If there's a case to be made for this at all, it should be handled the same way as all other libpq connection parameters.

Re: [HACKERS] SSL and USER_CERT_FILE

2008-05-15 Thread pgsql
> Mark Woodward wrote: >> I am using PostgreSQL's SSL support and the conventions for the key and >> certifications don't make sense from the client perspective. Especially >> under Windows. >> >> I am proposing a few simple changes: >> >> Adding two API >> void PQsetSSLUserCertFileName(char *filen

Re: [HACKERS] SSL and USER_CERT_FILE

2008-05-15 Thread Andrew Dunstan
Mark Woodward wrote: I am using PostgreSQL's SSL support and the conventions for the key and certifications don't make sense from the client perspective. Especially under Windows. I am proposing a few simple changes: Adding two API void PQsetSSLUserCertFileName(char *filename) { user_crt_

[HACKERS] SSL and USER_CERT_FILE

2008-05-15 Thread Mark Woodward
I am using PostgreSQL's SSL support and the conventions for the key and certifications don't make sense from the client perspective. Especially under Windows. I am proposing a few simple changes: Adding two API void PQsetSSLUserCertFileName(char *filename) { user_crt_filename = strdup(filenam