From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: self-made certs not quite right
Date: Tue, 2 Mar 2021 16:12:44 -0700
Message-ID: <4d4837c5-22db-27b8-2592-7fc7c482f02e@gmail.com> (raw)
I'm trying to follow instrux in V12:18.9.5 Creating Certificates. [1]
I'm stuck in my basement so all references to "/CN=FQN" have been set to
$(hostname), just the hostname, because $(domainname) returns "(none)"
which I presume is akin to null.
With my newly minted certs and keys using psql (to either $(hostname) or
localhost) I get the "SSL connection (protocol: TLSv1.3...) message, so
long as I have an empty ~/.postgresql directory. If I copy the
generated root.crt to ~/.postgresql (chown me.me; chmod 400) I get a
plain connection (no ssl).
With root.crt in ~/.postgresql, testing the jdbc connection from a
tomcat server generates this failure (again either localhost or $(hostname))
Blow out on db connection to jdbc:postgresql://localhost:5432/postgres;
SSL error: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target
org.postgresql.util.PSQLException: SSL error: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target
Is this a pkcs v. pem cat fight? Or is there enough here to tell which
step went south, or just start over?
[1] https://www.postgresql.org/docs/12/ssl-tcp.html
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-general@postgresql.org
Cc: robjsargent@gmail.com
Subject: Re: self-made certs not quite right
In-Reply-To: <4d4837c5-22db-27b8-2592-7fc7c482f02e@gmail.com>
References: <4d4837c5-22db-27b8-2592-7fc7c482f02e@gmail.com>
* 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