|
|
|
@ -2071,7 +2071,7 @@ static int updateTlsCfg(char *val, char *prev, char **err) {
|
|
|
|
|
UNUSED(prev);
|
|
|
|
|
UNUSED(err);
|
|
|
|
|
if (tlsConfigure(&server.tls_ctx_config) == C_ERR) {
|
|
|
|
|
*err = "Unable to configure tls-cert-file. Check server logs.";
|
|
|
|
|
*err = "Unable to update TLS configuration. Check server logs.";
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
return 1;
|
|
|
|
@ -2081,6 +2081,12 @@ static int updateTlsCfgBool(int val, int prev, char **err) {
|
|
|
|
|
UNUSED(prev);
|
|
|
|
|
return updateTlsCfg(NULL, NULL, err);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int updateTlsCfgInt(long long val, long long prev, char **err) {
|
|
|
|
|
UNUSED(val);
|
|
|
|
|
UNUSED(prev);
|
|
|
|
|
return updateTlsCfg(NULL, NULL, err);
|
|
|
|
|
}
|
|
|
|
|
#endif /* USE_OPENSSL */
|
|
|
|
|
|
|
|
|
|
standardConfig configs[] = {
|
|
|
|
@ -2216,10 +2222,13 @@ standardConfig configs[] = {
|
|
|
|
|
|
|
|
|
|
#ifdef USE_OPENSSL
|
|
|
|
|
createIntConfig("tls-port", NULL, IMMUTABLE_CONFIG, 0, 65535, server.tls_port, 0, INTEGER_CONFIG, NULL, NULL), /* TCP port. */
|
|
|
|
|
createIntConfig("tls-session-cache-size", NULL, MODIFIABLE_CONFIG, 0, INT_MAX, server.tls_ctx_config.session_cache_size, 20*1024, INTEGER_CONFIG, NULL, updateTlsCfgInt),
|
|
|
|
|
createIntConfig("tls-session-cache-timeout", NULL, MODIFIABLE_CONFIG, 0, INT_MAX, server.tls_ctx_config.session_cache_timeout, 300, INTEGER_CONFIG, NULL, updateTlsCfgInt),
|
|
|
|
|
createBoolConfig("tls-cluster", NULL, MODIFIABLE_CONFIG, server.tls_cluster, 0, NULL, NULL),
|
|
|
|
|
createBoolConfig("tls-replication", NULL, MODIFIABLE_CONFIG, server.tls_replication, 0, NULL, NULL),
|
|
|
|
|
createBoolConfig("tls-auth-clients", NULL, MODIFIABLE_CONFIG, server.tls_auth_clients, 1, NULL, NULL),
|
|
|
|
|
createBoolConfig("tls-prefer-server-ciphers", NULL, MODIFIABLE_CONFIG, server.tls_ctx_config.prefer_server_ciphers, 0, NULL, updateTlsCfgBool),
|
|
|
|
|
createBoolConfig("tls-session-caching", NULL, MODIFIABLE_CONFIG, server.tls_ctx_config.session_caching, 1, NULL, updateTlsCfgBool),
|
|
|
|
|
createStringConfig("tls-cert-file", NULL, MODIFIABLE_CONFIG, EMPTY_STRING_IS_NULL, server.tls_ctx_config.cert_file, NULL, NULL, updateTlsCfg),
|
|
|
|
|
createStringConfig("tls-key-file", NULL, MODIFIABLE_CONFIG, EMPTY_STRING_IS_NULL, server.tls_ctx_config.key_file, NULL, NULL, updateTlsCfg),
|
|
|
|
|
createStringConfig("tls-dh-params-file", NULL, MODIFIABLE_CONFIG, EMPTY_STRING_IS_NULL, server.tls_ctx_config.dh_params_file, NULL, NULL, updateTlsCfg),
|
|
|
|
|