mirror of
http://github.com/valkey-io/valkey
synced 2024-11-21 16:46:15 +00:00
Rename redisTLSContextConfig to serverTLSContextConfig (#176)
Part of #144 Signed-off-by: 0del <bany.y0599@gmail.com>
This commit is contained in:
parent
25122b140e
commit
c413834da1
@ -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. */
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user