From c413834da1183a85ea8a8e1447428a47a62c2be2 Mon Sep 17 00:00:00 2001 From: 0del <53461381+0del@users.noreply.github.com> Date: Thu, 4 Apr 2024 00:06:01 +0700 Subject: [PATCH] Rename redisTLSContextConfig to serverTLSContextConfig (#176) Part of #144 Signed-off-by: 0del --- src/server.h | 6 +++--- src/tls.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/server.h b/src/server.h index 4d7c94bd7..2b904309a 100644 --- a/src/server.h +++ b/src/server.h @@ -1475,7 +1475,7 @@ struct malloc_stats { * TLS Context Configuration *----------------------------------------------------------------------------*/ -typedef struct redisTLSContextConfig { +typedef struct serverTLSContextConfig { char *cert_file; /* Server side and optionally client side cert file name */ char *key_file; /* Private key filename for cert_file */ char *key_file_pass; /* Optional password for key_file */ @@ -1492,7 +1492,7 @@ typedef struct redisTLSContextConfig { int session_caching; int session_cache_size; int session_cache_timeout; -} redisTLSContextConfig; +} serverTLSContextConfig; /*----------------------------------------------------------------------------- * AOF manifest definition @@ -2050,7 +2050,7 @@ struct redisServer { int tls_cluster; int tls_replication; int tls_auth_clients; - redisTLSContextConfig tls_ctx_config; + serverTLSContextConfig tls_ctx_config; /* cpu affinity */ char *server_cpulist; /* cpu affinity list of redis server main/io thread. */ char *bio_cpulist; /* cpu affinity list of bio thread. */ diff --git a/src/tls.c b/src/tls.c index d011c16ea..a6bd06609 100644 --- a/src/tls.c +++ b/src/tls.c @@ -203,7 +203,7 @@ static int tlsPasswordCallback(char *buf, int size, int rwflag, void *u) { /* Create a *base* SSL_CTX using the SSL configuration provided. The base context * includes everything that's common for both client-side and server-side connections. */ -static SSL_CTX *createSSLContext(redisTLSContextConfig *ctx_config, int protocols, int client) { +static SSL_CTX *createSSLContext(serverTLSContextConfig *ctx_config, int protocols, int client) { const char *cert_file = client ? ctx_config->client_cert_file : ctx_config->cert_file; const char *key_file = client ? ctx_config->client_key_file : ctx_config->key_file; const char *key_file_pass = client ? ctx_config->client_key_file_pass : ctx_config->key_file_pass; @@ -282,12 +282,12 @@ error: /* Attempt to configure/reconfigure TLS. This operation is atomic and will * leave the SSL_CTX unchanged if fails. - * @priv: config of redisTLSContextConfig. + * @priv: config of serverTLSContextConfig. * @reconfigure: if true, ignore the previous configure; if false, only * configure from @ctx_config if redis_tls_ctx is NULL. */ static int tlsConfigure(void *priv, int reconfigure) { - redisTLSContextConfig *ctx_config = (redisTLSContextConfig *)priv; + serverTLSContextConfig *ctx_config = (serverTLSContextConfig *)priv; char errbuf[256]; SSL_CTX *ctx = NULL; SSL_CTX *client_ctx = NULL;