Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Hackers > SSL and USER_CE...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 9 Topic 9370 of 10966
Post > Topic >>

SSL and USER_CERT_FILE

by pgsql@[EMAIL PROTECTED] ("Mark Woodward") May 15, 2008 at 08:47 AM

I am using PostgreSQL's SSL sup****t 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(filename);
}
PQsetSSLUserKeyFileName(char *filename)
{
    user_key_filename = strdup(filename);
}

Adding two static vars in fe-secure.c

char *user_key_filename=NULL;
char *user_crt_filename=NULL;

In client_cert_cb(...)

Add:
if(user_crt_filename)
    strncpy(fnbuf, sizeof(fnbuf), user_crt_filename);
else
    snprintf(fnbuf, sizeof(fnbuf), "%s/%s", homedir, USER_CERT_FILE);

and:

if(user_key_filename)
    strncpy(fnbuf, sizeof(fnbuf), user_key_filename);
else
    snprintf(fnbuf, sizeof(fnbuf), "%s/%s", homedir, USER_KEY_FILE);


The purpose of these changes is to make it easier to configure SSL in an
application which uses libpq.

Any comments?

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




 9 Posts in Topic:
SSL and USER_CERT_FILE
pgsql@[EMAIL PROTECTED]   2008-05-15 08:47:32 
Re: SSL and USER_CERT_FILE
andrew@[EMAIL PROTECTED]   2008-05-15 09:52:29 
Re: SSL and USER_CERT_FILE
pgsql@[EMAIL PROTECTED]   2008-05-15 09:31:10 
Re: SSL and USER_CERT_FILE
tgl@[EMAIL PROTECTED] (T  2008-05-15 10:12:52 
Re: SSL and USER_CERT_FILE
steve@[EMAIL PROTECTED]   2008-05-15 07:17:28 
Re: SSL and USER_CERT_FILE
pgsql@[EMAIL PROTECTED]   2008-05-15 09:49:58 
Re: SSL and USER_CERT_FILE
pgsql@[EMAIL PROTECTED]   2008-05-15 09:53:13 
Re: SSL and USER_CERT_FILE
magnus@[EMAIL PROTECTED]   2008-05-15 20:10:33 
Re: SSL and USER_CERT_FILE
pgsql@[EMAIL PROTECTED]   2008-05-15 13:44:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 13:49:34 CST 2008.