mirror of
https://github.com/postgres/postgres.git
synced 2025-11-15 03:41:20 +03:00
Allow specifying CRL directory
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 <horikyota.ntt@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/20200731.173911.904649928639357911.horikyota.ntt@gmail.com
This commit is contained in:
@@ -317,6 +317,10 @@ static const internalPQconninfoOption PQconninfoOptions[] = {
|
||||
"SSL-Revocation-List", "", 64,
|
||||
offsetof(struct pg_conn, sslcrl)},
|
||||
|
||||
{"sslcrldir", "PGSSLCRLDIR", NULL, NULL,
|
||||
"SSL-Revocation-List-Dir", "", 64,
|
||||
offsetof(struct pg_conn, sslcrldir)},
|
||||
|
||||
{"requirepeer", "PGREQUIREPEER", NULL, NULL,
|
||||
"Require-Peer", "", 10,
|
||||
offsetof(struct pg_conn, requirepeer)},
|
||||
@@ -3998,6 +4002,8 @@ freePGconn(PGconn *conn)
|
||||
free(conn->sslrootcert);
|
||||
if (conn->sslcrl)
|
||||
free(conn->sslcrl);
|
||||
if (conn->sslcrldir)
|
||||
free(conn->sslcrldir);
|
||||
if (conn->sslcompression)
|
||||
free(conn->sslcompression);
|
||||
if (conn->requirepeer)
|
||||
|
||||
Reference in New Issue
Block a user