pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gabriele Bulfon <gabriele.bulfon@sonicle.com>
To: zloster <more@edno.moe>
To: Dave Cramer <pg@fastcrypt.com>
Cc: Alexander Kjäll <alexander.kjall@gmail.com>
Cc: pgsql-jdbc@lists.postgresql.org
Subject: Re: ssl connection issues
Date: Thu, 20 Sep 2018 09:40:00 +0200 (CEST)
Message-ID: <2058261496.3175.1537429200690@www> (raw)
In-Reply-To: <652173d1-71e1-68c1-54f5-958dc7a845e8@edno.moe>
References: <652759681.5047.1536841425886@www>
	<CAMsr+YGPkivLkDFdbUSuAxLnM3W2+Qu+bfcij1DB8kWZMVqUaw@mail.gmail.com>
	<CADK3HHJBkGxLxn3UhRG7NVutce2wzywBJU5_+snJwUQo-P0m6w@mail.gmail.com>
	<CAMsr+YEHpCHS9z==7NtAzJURc3rahUrNqXUq7CUSS8imeZjKCA@mail.gmail.com>
	<b91179a952d6b6d1c5df1c0100286b40@lawinegevaar.nl>
	<491225265.1372.1537176204835@www>
	<b37561e7ae8a4b2a9798b495dd36caa9@lawinegevaar.nl>
	<90731313-9cd6-c020-9270-c9ef5d380390@gmail.com>
	<CADK3HHJtkC=YeRfOKApZBJyF-O8q5wG=JYU4901uy-kj9WNGeA@mail.gmail.com>
	<1954323705.1855.1537278167094@www>
	<CADK3HH+w+VzE1noskQk74kR0FM=sS01DpCwtmirM4yK_nvuPRQ@mail.gmail.com>
	<441859077.1912.1537279378378@www>
	<CADK3HHLfPv5Znr_Pn0sciqadoZ5kYGLCRVKbz2ggi+MfW2PDMg@mail.gmail.com>
	<742803153.2017.1537284186298@www>
	<CADK3HHK=UmPUO+uEMmQgux7Nn254A5oZ6ZsFsDz=K7zh9weMOw@mail.gmail.com>
	<652173d1-71e1-68c1-54f5-958dc7a845e8@edno.moe>

Thanks, I tried enabling all the client debug infos, but didn't get much from them.
I will try to create certs from scratch, using the openssl tool instead of easy-rsa, and see if something changes.
 
Gabriele
-= Sent using Webtop 5 =-
Gabriele Bulfon - Sonicle S.r.l.
Tel +39 028246016 - Fax +39 028243880
Strada 6, Palazzo A13 - 20090 - Assago Milanofiori - MI
http://www.sonicle.com
Da:
zloster
A:
Dave Cramer
Gabriele Bulfon
Cc:
Alexander Kjäll
pgsql-jdbc@lists.postgresql.org
Data:
19 settembre 2018 9.21.03 CEST
Oggetto:
Re: ssl connection issues
On 18.09.2018 18:27, Dave Cramer wrote:
On Tue, 18 Sep 2018 at 11:23, Gabriele Bulfon
gbulfon@sonicle.com
wrote:
The only server cert known to me that is needed to the client is the root.crt (the ca cert) of the server used to sign the client cert.
These three files are all that is needed to the odbc driver, to the native navicat dll connection, and to any other certs-based ssl connection such as openvpn.
Actually the jdbc code is not complaining about the certs (if I remove any of them it will complain), something is going wrong during the ssl handshake that I cannot understand.
 
Is there any way to log more stuff on the server postgres.log about the ssl handshake?
 
I'm sure there is but I don't know how. The server is not my domain.
 
Try connecting with psql. If you can connect with that then JDBC should be able to connect. 
 
Dave Cramer
davec@postgresintl.com
www.postgresintl.com
Hi to all,
IMO it will be better to inspect the SSL/TLS handshake at the client - the machine that is initiating the connection to the PostgreSQL server through the JDBC driver.
Here are some links with the basic stuff about debugging the SSL/TLS connections with the JVM:
https://blogs.oracle.com/java-platform-group/diagnosing-tls,-ssl,-and-https
- this is an introduction document. It points to the following two pages. The first is describing what debug tools are available and the second shows how to read the debug output:
https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html#Debug
https://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/ReadDebug.html
https://access.redhat.com/solutions/973783
- same as the above but in Q&A style
I've used the debug output once - I've needed to investigate why communication with test HTTPS endpoint is working from a browser but not from a Java 8 program. After nearly one day of looking at the connection logs the problem turned out to be in the certificate chain - the browser was happy with the intermediate certificates, but the JVM was not.
Best regards,
zloster

view thread (22+ messages)  latest in thread

Message-ID: <2058261496.3175.1537429200690@www>
Permalink:  ../2058261496.3175.1537429200690@www/
Also on:    postgresql.org/message-id/2058261496.3175.1537429200690@www

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: gabriele.bulfon@sonicle.com, more@edno.moe, pg@fastcrypt.com, alexander.kjall@gmail.com
  Subject: Re: ssl connection issues
  In-Reply-To: <2058261496.3175.1537429200690@www>
  References: <652759681.5047.1536841425886@www> <CAMsr+YGPkivLkDFdbUSuAxLnM3W2+Qu+bfcij1DB8kWZMVqUaw@mail.gmail.com> <CADK3HHJBkGxLxn3UhRG7NVutce2wzywBJU5_+snJwUQo-P0m6w@mail.gmail.com> <CAMsr+YEHpCHS9z==7NtAzJURc3rahUrNqXUq7CUSS8imeZjKCA@mail.gmail.com> <b91179a952d6b6d1c5df1c0100286b40@lawinegevaar.nl> <491225265.1372.1537176204835@www> <b37561e7ae8a4b2a9798b495dd36caa9@lawinegevaar.nl> <90731313-9cd6-c020-9270-c9ef5d380390@gmail.com> <CADK3HHJtkC=YeRfOKApZBJyF-O8q5wG=JYU4901uy-kj9WNGeA@mail.gmail.com> <1954323705.1855.1537278167094@www> <CADK3HH+w+VzE1noskQk74kR0FM=sS01DpCwtmirM4yK_nvuPRQ@mail.gmail.com> <441859077.1912.1537279378378@www> <CADK3HHLfPv5Znr_Pn0sciqadoZ5kYGLCRVKbz2ggi+MfW2PDMg@mail.gmail.com> <742803153.2017.1537284186298@www> <CADK3HHK=UmPUO+uEMmQgux7Nn254A5oZ6ZsFsDz=K7zh9weMOw@mail.gmail.com> <652173d1-71e1-68c1-54f5-958dc7a845e8@edno.moe> <2058261496.3175.1537429200690@www>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox