| 189 | } |
| 190 | |
| 191 | void tlsCleanup(void) { |
| 192 | if (redis_tls_ctx) { |
| 193 | SSL_CTX_free(redis_tls_ctx); |
| 194 | redis_tls_ctx = NULL; |
| 195 | } |
| 196 | if (redis_tls_client_ctx) { |
| 197 | SSL_CTX_free(redis_tls_client_ctx); |
| 198 | redis_tls_client_ctx = NULL; |
| 199 | } |
| 200 | |
| 201 | #if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) |
| 202 | // unavailable on LibreSSL |
| 203 | OPENSSL_cleanup(); |
| 204 | #endif |
| 205 | } |
| 206 | |
| 207 | /* Callback for passing a keyfile password stored as an sds to OpenSSL */ |
| 208 | static int tlsPasswordCallback(char *buf, int size, int rwflag, void *u) { |
no outgoing calls
no test coverage detected