mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Add parameters for controlling locations of server-side SSL files
This allows changing the location of the files that were previously hard-coded to server.crt, server.key, root.crt, root.crl. server.crt and server.key continue to be the default settings and are thus required to be present by default if SSL is enabled. But the settings for the server-side CA and CRL are now empty by default, and if they are set, the files are required to be present. This replaces the previous behavior of ignoring the functionality if the files were not found.
This commit is contained in:
@ -39,6 +39,7 @@
|
||||
#include "funcapi.h"
|
||||
#include "libpq/auth.h"
|
||||
#include "libpq/be-fsstubs.h"
|
||||
#include "libpq/libpq.h"
|
||||
#include "libpq/pqformat.h"
|
||||
#include "miscadmin.h"
|
||||
#include "optimizer/cost.h"
|
||||
@ -2960,6 +2961,46 @@ static struct config_string ConfigureNamesString[] =
|
||||
check_canonical_path, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"ssl_cert_file", PGC_POSTMASTER, CONN_AUTH_SECURITY,
|
||||
gettext_noop("Location of the SSL server certificate file."),
|
||||
NULL
|
||||
},
|
||||
&ssl_cert_file,
|
||||
"server.crt",
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"ssl_key_file", PGC_POSTMASTER, CONN_AUTH_SECURITY,
|
||||
gettext_noop("Location of the SSL server private key file."),
|
||||
NULL
|
||||
},
|
||||
&ssl_key_file,
|
||||
"server.key",
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"ssl_ca_file", PGC_POSTMASTER, CONN_AUTH_SECURITY,
|
||||
gettext_noop("Location of the SSL certificate authority file."),
|
||||
NULL
|
||||
},
|
||||
&ssl_ca_file,
|
||||
"",
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"ssl_crl_file", PGC_POSTMASTER, CONN_AUTH_SECURITY,
|
||||
gettext_noop("Location of the SSL certificate revocation list file."),
|
||||
NULL
|
||||
},
|
||||
&ssl_crl_file,
|
||||
"",
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"stats_temp_directory", PGC_SIGHUP, STATS_COLLECTOR,
|
||||
gettext_noop("Writes temporary statistics files to the specified directory."),
|
||||
|
Reference in New Issue
Block a user