Re: Connection string parameter "sslrootcert" does not work - Mailing list pgsql-odbc

From Inoue, Hiroshi
Subject Re: Connection string parameter "sslrootcert" does not work
Date
Msg-id 5462D5AA.2040602@tpf.co.jp
Whole thread Raw
In response to Re: Connection string parameter "sslrootcert" does not work  (Ed Hutchinson <edhutch1963@gmail.com>)
List pgsql-odbc
(2014/11/12 2:52), Ed Hutchinson wrote:
Thanks, Adrian.


Sorry, I should have provided more details. 

1) Using this connection string on Windows:
DRIVER={PostgreSQL Unicode};DATABASE=dbedhTest;SERVER=edhpostgresql.cn4dj2uqcnwe.us-west-1.rds.amazonaws.com;UID=MyUser;PWD=********;PORT=5432;BOOLSASCHAR=0;LFCONVERSION=0;UseDeclareFetch=1;sslmode=verify-full;sslrootcert=D:\\temp\\rds-ssl-ca-cert.pem

I get back:
root certificate file \"C:\\Users\\edhutch\\AppData\\Roaming/postgresql/root.crt\" does not exist\nEither provide the file or change sslmode to disable server certificate verification.

2) Using this connection string on Windows:
DRIVER={PostgreSQL Unicode};DATABASE=dbedhTest;SERVER=edhpostgresql.cn4dj2uqcnwe.us-west-1.rds.amazonaws.com;UID=MyUser;PWD=********;PORT=5432;BOOLSASCHAR=0;LFCONVERSION=0;UseDeclareFetch=1;sslmode=verify-full;sslrootcert=D:/temp/rds-ssl-ca-cert.pem

I get back the same error:
root certificate file \"C:\\Users\\edhutch\\AppData\\Roaming/postgresql/root.crt\" does not exist\nEither provide the file or change sslmode to disable server certificate verification.

3) Using this connection string on Mac OS X:
DRIVER={PostgreSQL Unicode};DATABASE=dbedhTest;SERVER=edhpostgresql.cn4dj2uqcnwe.us-west-1.rds.amazonaws.com;UID=MyUser;PWD=********;PORT=5432;BOOLSASCHAR=0;LFCONVERSION=0;UseDeclareFetch=1;sslmode=verify-full;sslrootcert=/Users/edhutch/temp/rds-ssl-ca-cert.pem

I get back:
root certificate file \"/Users/edhutch/.postgresql/root.crt\" does not exist\nEither provide the file or change sslmode to disable server certificate verification.

When I rename the pem file to root.crt and place it in the default location that the driver expects, the connection goes through fine.

Currently there's no option to specify path name.
One way is to set an environment variable PGSSLROOTCERT.

regards,
Hiroshi Inoue
 
--
I am using the free version of SPAMfighter.
SPAMfighter has removed 12912 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len
 
Do you have a slow PC? Try a Free scan http://www.spamfighter.com/SLOW-PCfighter?cid=sigen

pgsql-odbc by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Connection string parameter "sslrootcert" does not work
Next
From: "Inoue, Hiroshi"
Date:
Subject: Re: Bug? {? = CALL insert_page_segment (?, ?)}