Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XoOjL-00005H-Df for pgsql-odbc@arkaria.postgresql.org; Wed, 12 Nov 2014 03:36:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XoOjJ-0003JA-Vr for pgsql-odbc@arkaria.postgresql.org; Wed, 12 Nov 2014 03:36:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XoOjJ-0003J3-36 for pgsql-odbc@postgresql.org; Wed, 12 Nov 2014 03:36:25 +0000 Received: from sd.tpf.co.jp ([210.161.239.34]) by magus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XoOjB-0005i9-Mv for pgsql-odbc@postgresql.org; Wed, 12 Nov 2014 03:36:22 +0000 Received: (qmail 1285 invoked by uid 502); 12 Nov 2014 03:36:12 -0000 Received: from unknown (HELO ?127.0.0.1?) (100.126.1.62) by sd2.tpf-fw-c.co.jp with SMTP; 12 Nov 2014 03:36:12 -0000 Message-ID: <5462D5AA.2040602@tpf.co.jp> Date: Wed, 12 Nov 2014 12:36:10 +0900 From: "Inoue, Hiroshi" User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Ed Hutchinson , Adrian Klaver CC: pgsql-odbc@postgresql.org Subject: Re: Connection string parameter "sslrootcert" does not work References: <546226D7.5000505@aklaver.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------040208020703030505060905" X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org This is a multi-part message in MIME format. --------------040208020703030505060905 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit (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 --------------040208020703030505060905 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
(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

--------------040208020703030505060905--