From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Shankar Bhaskaran <mailshankarb@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Certficates
Date: Mon, 10 Aug 2020 16:15:03 -0400
Message-ID: <3252574.1597090503@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwYDki45zqNWSgnn33BP_d-L_6sNsPkDmcXZxy4nrvYGLw@mail.gmail.com>
References: <CA+DMY5RMecBdKhj9VWy6aZcd7EB=jPcHekkVgbiG8mn06T6oSQ@mail.gmail.com>
<CAKFQuwYDki45zqNWSgnn33BP_d-L_6sNsPkDmcXZxy4nrvYGLw@mail.gmail.com>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Mon, Aug 10, 2020 at 10:54 AM Shankar Bhaskaran <mailshankarb@gmail.com>
> wrote:
>> How does psql import the server certificate?
> It works by default because both the server and client are usually
> installed from the same source and the same default certificate files are
> provided to each.
Actually I suspect the answer is "it works because the default behavior
is to just encrypt the connection, not to try to verify the server
certificate". If you want it to fail when it doesn't recognize the server
cert, you need sslmode=verify-ca or sslosslmode=verify-full in your
connection string. See sslmode here:
https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
regards, tom lane
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: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, mailshankarb@gmail.com
Subject: Re: Certficates
In-Reply-To: <3252574.1597090503@sss.pgh.pa.us>
References: <CA+DMY5RMecBdKhj9VWy6aZcd7EB=jPcHekkVgbiG8mn06T6oSQ@mail.gmail.com> <CAKFQuwYDki45zqNWSgnn33BP_d-L_6sNsPkDmcXZxy4nrvYGLw@mail.gmail.com> <3252574.1597090503@sss.pgh.pa.us>
* 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