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

Function createTLSConnection

src/tls.cpp:670–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

668}
669
670static connection *createTLSConnection(int client_side) {
671 SSL_CTX *ctx = redis_tls_ctx;
672 if (client_side && redis_tls_client_ctx)
673 ctx = redis_tls_client_ctx;
674 tls_connection *conn = (tls_connection*)zcalloc(sizeof(tls_connection));
675 conn->c.type = &CT_TLS;
676 conn->c.fd = -1;
677 std::unique_lock<fastlock> ul(g_ctxtlock);
678 conn->ssl = SSL_new(ctx);
679 conn->el = serverTL->el;
680 return (connection *) conn;
681}
682
683void connTLSMarshalThread(connection *c) {
684 tls_connection *conn = (tls_connection*)c;

Callers 2

connCreateTLSFunction · 0.85
connCreateAcceptedTLSFunction · 0.85

Calls 1

zcallocFunction · 0.85

Tested by

no test coverage detected