Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTwRB-0004HN-N6 for pgsql-odbc@arkaria.postgresql.org; Wed, 18 Jan 2017 20:02:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cTwRB-0005xG-6f for pgsql-odbc@arkaria.postgresql.org; Wed, 18 Jan 2017 20:02:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cTwRA-0005w9-Nq for pgsql-odbc@postgresql.org; Wed, 18 Jan 2017 20:02:28 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cTwR2-0007mF-Il for pgsql-odbc@postgresql.org; Wed, 18 Jan 2017 20:02:28 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id B122B207F9; Wed, 18 Jan 2017 15:02:18 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Wed, 18 Jan 2017 15:02:18 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=Z653/hyhiwv9C6i Yk/yZG/ujEAc=; b=Kkx4hWelhFcFaiOT7GECpF0sGej9v1oHjBrPenE8JiDf/BK j5nB8GFhlbw00MRh/qfjtxZUbqQbqI91TUrepeBMIgwlW2V7oBc4jZvuuY79+HVW 05nO0K7Ro73dZ/Ufq0Plu2LstplP3bXUbPzHUutEaXjYfGPuSlvLo13odqzc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= smtpout; bh=Z653/hyhiwv9C6iYk/yZG/ujEAc=; b=Nf2vtNFligYLK67s2sXi G4yy7oCDAboyOYBdq3s4pAZ5E+85VCpIHZj2/H3R8ddXgmym2hLoeGLq0RA4Dk0A NmL0KHLEk6Da60Cob8yj5LrUsYG0gvg0qgcAljW7beOqOQ3RDrpLrIIqFF5ekIBV ZE1Bt3hn5DkLFpFmJVU8y+M= X-ME-Sender: X-Sasl-enc: ZTQu+WGZR7ra6B5TfmkKLjIUztJaensFUbOHb+ZhZPE4 1484769736 Received: from killi.site (c-73-225-242-52.hsd1.wa.comcast.net [73.225.242.52]) by mail.messagingengine.com (Postfix) with ESMTPA id 8E8212475E; Wed, 18 Jan 2017 15:02:14 -0500 (EST) Subject: Re: Fwd: Connection string parameter sslrootcert does not work To: Apurva Paralkar , pgsql-odbc@postgresql.org References: From: Adrian Klaver Message-ID: <2c7d9d2e-065b-d00d-d3e3-cb163fa83323@aklaver.com> Date: Wed, 18 Jan 2017 12:01:52 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.7 (--) 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 On 01/18/2017 11:29 AM, Apurva Paralkar wrote: > Hi,____ > > __ __ > > I'm trying to programmatically connect to an RDS Postgres instance with > SSL enabled, using the psqlodbc driver (Version: > postgresql94-odbc-09.03.0400-1PGDG.rhel6.x86_64.rpm). I’m having trouble > with the sslrootcert parameter.____ > > > ____ > > To enable SSL for a Postgres connection, I appended the following > parameters to the connection string:____ > > sslmode=verify-ca;sslrootcert= client>____ > > The root certificate exists as a .pem file.____ > > > ____ > > In addition, I also enabled the debug and comm logs:____ > > debug=1;commlog=1____ > > > ____ > > The resulting logs showed the following error:____ > > …____ > > 00028427: 2017-01-17T21:16:57 [SERVER ]I: Going to connect to > ODBC connection string: Driver={PostgreSQL > Unicode(x64)};Server=;Port=-;Database=;UseDeclareFetch=1;Fetch=10000;Uid=;Pwd=****;sslmode=verify-ca;sslrootcert= of root.pem file on the client>;debug=1;commlog=1____ > > 00028427: 2017-01-17T21:16:57 [SERVER ]E: RetCode: SQL_ERROR > SqlState: 08001 NativeError: 101 Message: [unixODBC]root certificate > file "/home//.postgresql/root.crt" does not exist____ > > Either provide the file or change sslmode to disable server certificate > verification. [122502] ODBC general error.____ > > 00028427: 2017-01-17T21:16:57 [SERVER ]E: Failed to connect > [122506] Network error has occurred____ > > …____ > > > ____ > > Does this mean the driver cannot recognize the sslrootcert parameter > being passed to it? Why does it still refer to the default location of > the root certificate? I even tried putting the root certificate in the > default location, but it still failed with the same error above.____ > > __ __ > > I was looking up this issue and found a similar thread that was open 3 > years ago: > https://www.postgresql.org/message-id/5462D5AA.2040602%40tpf.co.jp > ._ _The > contributor there had mentioned that there was no option to specify path > name. Is that still the case? In the above did you see the suggestion to use the env variable PGSSLROOTCERT? > > I found another thread which talked about adding support for the > sslxxxxxx > parameters: https://www.postgresql.org/message-id/CAB7nPqSF%2BVLH5TB0rDPF2UaMhjoBCJSJNCeL9NYh6WqEuPUL7w%40mail.gmail.com > > __ __ > > Is there an update on this? > > > Thanks,____ > > Apurva____ > > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc