Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g1pko-0002oB-Kr for pgsql-jdbc@arkaria.postgresql.org; Mon, 17 Sep 2018 09:23:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g1pkl-00059z-Bc for pgsql-jdbc@arkaria.postgresql.org; Mon, 17 Sep 2018 09:23:35 +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.89) (envelope-from ) id 1g1pkl-00059s-3j for pgsql-jdbc@lists.postgresql.org; Mon, 17 Sep 2018 09:23:35 +0000 Received: from mail.sonicle.com ([62.173.161.2]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g1pkc-0002WP-Eu for pgsql-jdbc@lists.postgresql.org; Mon, 17 Sep 2018 09:23:34 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.sonicle.com (Postfix) with ESMTP id EB3136308A8; Mon, 17 Sep 2018 11:23:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sonicle.com; h= content-type:content-type:mime-version:subject:subject :references:in-reply-to:message-id:from:from:date:date:received :received; s=dkim; t=1537176204; x=1538990605; bh=I0bbHZPIf/hC4n Wgk0xN8BBnQcJQ4sr3F4+veCt9phc=; b=fYxneR0gqQG7Zm7L+lc0f9i3gYcEPD 5Wx1uKWTLynSgplknwIHQXeC+shLHruDNDH6BUTfHzZPHzO0XqUMpvmr7wNRoDZM OpD6DzG9TeqR2n5LZwMpAP3H/VDs7wBowXtCpeLuteFJoq1NZfbkwzd28xrLajvt BnMlFT2/TaYXg= Received: from www ([127.0.0.1]) by localhost (mail.sonicle.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id KhlOs_iwsQwk; Mon, 17 Sep 2018 11:23:24 +0200 (CEST) Received: from www (www [192.168.222.200]) by www with SMTP (SubEthaSMTP 3.1.7) id JM630UN8; Mon, 17 Sep 2018 11:23:24 +0200 (CEST) Date: Mon, 17 Sep 2018 11:23:24 +0200 (CEST) From: Gabriele Bulfon To: Mark Rotteveel , Craig Ringer Cc: pgsql-jdbc@lists.postgresql.org Message-ID: <491225265.1372.1537176204835@www> In-Reply-To: References: <652759681.5047.1536841425886@www> Subject: Re: ssl connection issues MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1370_1461460121.1537176204835" Forwarded-From: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_1370_1461460121.1537176204835 Content-Type: multipart/alternative; boundary="----=_Part_1371_1071835204.1537176204835" ------=_Part_1371_1071835204.1537176204835 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable That may be a possibility, but given that I cannot upgrade at the moment, h= ow can I check this and maybe change the required cipher to match? =C2=A0 Gabriele Sonicle S.r.l.=C2=A0 :=C2=A0 http://www.sonicle.com Music:=C2=A0 http://www.gabrielebulfon.com Quantum Mechanics :=C2=A0 http://www.cdbaby.com/cd/gabrielebulfon ---------------------------------------------------------------------------= ------- Da: Mark Rotteveel A: Craig Ringer Cc: pgsql-jdbc@lists.postgresql.org Data: 17 settembre 2018 11.18.30 CEST Oggetto: Re: ssl connection issues On 2018-09-17 10:22, Craig Ringer wrote: On 14 September 2018 at 18:20, Dave Cramer wrote: On Thu, 13 Sep 2018 at 11:10, Craig Ringer wrote: On 13 September 2018 at 20:23, Gabriele Bulfon wrote: Hello, I recently configured Postgresql 9.0.9 with SSL only "on" and all its needed server certificates. I then created the client certificates and started working with them from a windows client. At first I used them with tools like Navicat, just specified the 3 certs files (key,crt and root.crt) in the ssl pane, worked fine. Then I tried with ODBC, placed the files in %APPDATA%/postgresql with correct names (postgresql.key, postgresql.crt, root.crt), created the connection and tested it, worked fine. Last I tried with jdbc, thinking it would have been so easy: I'm fighting for 2 days with lots of different issues. After some messing, I also finally discovered that, different from odbc, it would look for a pk8 file (why this difference?). AFAIK it's largely historical, and due to now-lifted limitations in JSSE. You should probably use sslfactory=3Dorg.postgresql.ssl.LibPQFactory and possibly specify explicit paths for the sslcert and sslkey parameters. This seems to be undocumented, unfortunately. the default is LibPQFactory and it is fairly well documented. https://jdbc.postgresql.org/documentation/head/connect.html#connection-para= meters [1] Nope, apparently the only problem is my reading ability. Sorry. That does make me wonder why Gabriele is having this issue though. Given the age of PostgreSQL 9.0, could it be a SSL/TLS version problem, given all the default restrictions to supported SSL/TLS versions and supported cipher suites in recent Java version? Mark ------=_Part_1371_1071835204.1537176204835 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
That may be a possibility, but given that I cannot u= pgrade at the moment, how can I check this and maybe change the required ci= pher to match?
 =
Gabrie= le

Sonic= le S.r.l. : http://www.sonicle.com



-----------------------------------------------------= -----------------------------

Da: Mark Rotteveel <mark@lawine= gevaar.nl>
A: Craig Ringer <craig@2ndquadrant.com>
Cc: = pgsql-jdbc@lists.postgresql.org
Data: 17 settembre 2018 11.18.30 CEST=
Oggetto: Re: ssl connection issues

On 2018-09-17 10:22, Craig Ringer wrote:
> On 1= 4 September 2018 at 18:20, Dave Cramer <pg@fastcrypt.com> wrote:
>
>> On Thu, 13 Sep 2018 at 11:10, Craig Ringer <craig@2= ndquadrant.com>
>> wrote:
>>
>> On 13 = September 2018 at 20:23, Gabriele Bulfon <gbulfon@sonicle.com>
&= gt;> wrote:
>>
>> Hello,
>>
>= > I recently configured Postgresql 9.0.9 with SSL only "on" and all
>> its needed server certificates.
>> I then created the = client certificates and started working with them
>> from a wind= ows client.
>>
>> At first I used them with tools li= ke Navicat, just specified the 3
>> certs files (key,crt and roo= t.crt) in the ssl pane, worked fine.
>>
>> Then I tr= ied with ODBC, placed the files in %APPDATA%/postgresql
>> with = correct names (postgresql.key, postgresql.crt, root.crt),
>> cre= ated the connection and tested it, worked fine.
>>
>>= ; Last I tried with jdbc, thinking it would have been so easy: I'm
>= ;> fighting for 2 days with lots of different issues.
>> Afte= r some messing, I also finally discovered that, different from
>>= ; odbc, it would look for a pk8 file (why this difference?).
>> =
>> AFAIK it's largely historical, and due to now-lifted limitat= ions in
>> JSSE.
>>
>> You should probabl= y use sslfactory=3Dorg.postgresql.ssl.LibPQFactory
>> and possib= ly specify explicit paths for the sslcert and sslkey
>> paramete= rs.
>>
>> This seems to be undocumented, unfortunate= ly.
>
> the default is LibPQFactory and it is fairly well = documented.
>
> https://jdbc.postgresql.org/documentation/= head/connect.html#connection-parameters
> [1]
>
> = Nope, apparently the only problem is my reading ability. Sorry.
> <= br />> That does make me wonder why Gabriele is having this issue though= .

Given the age of PostgreSQL 9.0, could it be a SSL/TLS version= problem,
given all the default restrictions to supported SSL/TLS ver= sions and
supported cipher suites in recent Java version?

= Mark



------=_Part_1371_1071835204.1537176204835-- ------=_Part_1370_1461460121.1537176204835--