Allow specifying CRL directory

Enterprise / PostgreSQL - Peter Eisentraut [eisentraut.org] - 18 February 2021 06:59 UTC

Add another method to specify CRLs, hashed directory method, for both server and client side. This offers a means for server or libpq to load only CRLs that are required to verify a certificate. The CRL directory is specifed by separate GUC variables or connection options ssl_crl_dir and sslcrldir, alongside the existing ssl_crl_file and sslcrl, so both methods can be used at the same time.

Author: Kyotaro Horiguchi Discussion: https://www.postgresql.org/message-id/flat/20200731.173911.904649928639357911.horikyota.ntt@gmail.com

f5465fade9 Allow specifying CRL directory
contrib/postgres_fdw/expected/postgres_fdw.out | 2 +-
doc/src/sgml/config.sgml | 36 ++++++++++++++++++++++++-
doc/src/sgml/libpq.sgml | 28 ++++++++++++++++++-
src/backend/libpq/be-secure-openssl.c | 26 +++++++++++++++---
src/backend/libpq/be-secure.c | 1 +
src/backend/utils/misc/guc.c | 10 +++++++
src/backend/utils/misc/postgresql.conf.sample | 1 +
src/include/libpq/libpq.h | 1 +
src/interfaces/libpq/fe-connect.c | 6 +++++
src/interfaces/libpq/fe-secure-openssl.c | 24 ++++++++++++-----
src/interfaces/libpq/libpq-int.h | 1 +
src/test/ssl/Makefile | 24 ++++++++++++++++-
src/test/ssl/ssl/client-crldir/9bb9e3c3.r0 | 11 ++++++++
src/test/ssl/ssl/root+client-crldir/9bb9e3c3.r0 | 11 ++++++++
src/test/ssl/ssl/root+client-crldir/a3d11bff.r0 | 11 ++++++++
src/test/ssl/ssl/root+server-crldir/a3d11bff.r0 | 11 ++++++++
src/test/ssl/ssl/root+server-crldir/a836cc2d.r0 | 11 ++++++++
src/test/ssl/ssl/server-crldir/a836cc2d.r0 | 11 ++++++++
src/test/ssl/t/001_ssltests.pl | 32 ++++++++++++++++++++--
src/test/ssl/t/SSLServer.pm | 14 +++++++++-
20 files changed, 255 insertions(+), 17 deletions(-)

Upstream: git.postgresql.org


  • Share