diff --git a/README.md b/README.md index cefd94d..1b1fa58 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,7 @@ Follow this table to diagnose issues with SSL connections to Redis. * Multi-threaded server, configurable number of worker threads. * [WebSocket support](#websockets) (Currently using the specification from [RFC 6455](https://datatracker.ietf.org/doc/html/rfc6455)). * Connects to Redis using a TCP or UNIX socket. -* Support for [secure connections to Redis](https://redis.io/topics/encryption) (requires Redis 6 or newer). +* Support for [secure connections to Redis](#configuring-webdis-with-ssl) (requires [Redis 6 or newer](https://redis.io/topics/encryption)). * Restricted commands by IP range (CIDR subnet + mask) or HTTP Basic Auth, returning 403 errors. * Support for Redis authentication in the config file: set `redis_auth` to a single string to use a password value, or to an array of two strings to use username+password auth ([new in Redis 6.0](https://redis.io/commands/auth)). * Environment variables can be used as values in the config file, starting with `$` and in all caps (e.g. `$REDIS_HOST`). diff --git a/src/conf.c b/src/conf.c index 8b4ecff..8a1cc76 100644 --- a/src/conf.c +++ b/src/conf.c @@ -17,7 +17,8 @@ static struct acl * conf_parse_acls(json_t *jtab); #if HAVE_SSL -void conf_parse_ssl(struct conf *conf, json_t *jssl, const char *filename); +void +conf_parse_ssl(struct conf *conf, json_t *jssl, const char *filename); #endif #define ACL_ERROR_PREFIX "Config error with 'redis_auth': " diff --git a/src/pool.c b/src/pool.c index 3e7e76e..7ea9751 100644 --- a/src/pool.c +++ b/src/pool.c @@ -196,7 +196,7 @@ pool_connect(struct pool *p, int db_num, int attach) { #ifdef HAVE_SSL /* Negotiate SSL/TLS */ if(p->w->s->cfg->ssl.enabled) { - if (redisInitiateSSLWithContext((redisContext*)&ac->c, p->w->s->ssl_context) != REDIS_OK) { + if(redisInitiateSSLWithContext((redisContext*)&ac->c, p->w->s->ssl_context) != REDIS_OK) { /* Handle error, in c->err / c->errstr */ slog(p->w->s, WEBDIS_ERROR, "SSL negotiation failed", 0); if(ac->c.err) { /* non-zero on error */