MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / tlsCleanup

Function tlsCleanup

src/tls.cpp:191–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191void 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 */
208static int tlsPasswordCallback(char *buf, int size, int rwflag, void *u) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected