Hi.
At Thu, 2 Dec 2021 11:31:26 +0800, Yi Sun <[email protected]> wrote in
> Hi Kyotaro
>
> From the description, seems ~/.postgresql/root.crl is store client
> revoked certificate
No. Revocation is checked on the peer. There's no point for a server
to check for revocation of its own certificate, and actually that
doesn't happen. Revocation of a client certificate is checked on
server side referencing server.crl. Revocation of a server certificate
is checked on client side referencing postgresql.crl. For example,
some web browsers make use of CRL of web *servers*, which is
automatically maintained in background.
You will see it work if you duped the server.crl as
~/.postgresql/root.crl on the client. (I spelled this wrongly in the
previous message..)
> https://www.postgresql.org/docs/11/libpq-ssl.html
> ~/.postgresql/root.crl certificates revoked by certificate authorities server
> certificate must not be on this list
> Just don't know why server parameter ssl_crl_file parameter configured but
> don't take affect
As explained above, it is because the CRL specified by ssl_crl_file
can only be used to verify client certificates.
> https://www.postgresql.org/docs/11/runtime-config-connection.html#GUC-SSL-CRL-FILE
>
> ssl_crl_file (string)
>
> Specifies the name of the file containing the SSL server certificate
> revocation list (CRL). Relative paths are relative to the data directory.
> This parameter can only be set in the postgresql.conf file or on the server
> command line. The default is empty, meaning no CRL file is loaded.
Ah, the "server" in "SSL server certificate revocation list" looks
like a noise word, rather misleading, or plain wrong, I'm not sure
which one it actually is.
Anyway I propose change the rephrase as "SSL client certification
revocation list" as attached.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index ab617c7b86..4ac617615c 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -1248,7 +1248,7 @@ include_dir 'conf.d'
</term>
<listitem>
<para>
- Specifies the name of the file containing the SSL server certificate
+ Specifies the name of the file containing the SSL client certificate
revocation list (CRL).
Relative paths are relative to the data directory.
This parameter can only be set in the <filename>postgresql.conf</filename>
@@ -1267,7 +1267,7 @@ include_dir 'conf.d'
</term>
<listitem>
<para>
- Specifies the name of the directory containing the SSL server
+ Specifies the name of the directory containing the SSL client
certificate revocation list (CRL). Relative paths are relative to the
data directory. This parameter can only be set in
the <filename>postgresql.conf</filename> file or on the server command
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index c17d33a54f..eb3a0c6b55 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -1742,11 +1742,10 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
<term><literal>sslcrl</literal></term>
<listitem>
<para>
- This parameter specifies the file name of the SSL certificate
+ This parameter specifies the file name of the SSL server certificate
revocation list (CRL). Certificates listed in this file, if it
- exists, will be rejected while attempting to authenticate the
- server's certificate. If neither
- <xref linkend='libpq-connect-sslcrl'/> nor
+ exists, will be rejected while attempting to authenticate the server's
+ certificate. If neither <xref linkend='libpq-connect-sslcrl'/> nor
<xref linkend='libpq-connect-sslcrldir'/> is set, this setting is
taken as
<filename>~/.postgresql/root.crl</filename>.
@@ -1758,9 +1757,9 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
<term><literal>sslcrldir</literal></term>
<listitem>
<para>
- This parameter specifies the directory name of the SSL certificate
- revocation list (CRL). Certificates listed in the files in this
- directory, if it exists, will be rejected while attempting to
+ This parameter specifies the directory name of the SSL server
+ certificate revocation list (CRL). Certificates listed in the files
+ in this directory, if it exists, will be rejected while attempting to
authenticate the server's certificate.
</para>