MCPcopy Create free account
hub / github.com/apache/trafficserver / TSSslSessionInsert

Function TSSslSessionInsert

src/api/InkAPI.cc:8518–8537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8516}
8517
8518TSReturnCode
8519TSSslSessionInsert(const TSSslSessionID *session_id, TSSslSession add_session, TSSslConnection ssl_conn)
8520{
8521 // Don't insert if there is no session id or the cache is not yet set up
8522 if (session_id && session_cache) {
8523 if (dbg_ctl_ssl_session_cache_insert.on()) {
8524 const SSLSessionID *sid = reinterpret_cast<const SSLSessionID *>(session_id);
8525 char buf[sid->len * 2 + 1];
8526 sid->toString(buf, sizeof(buf));
8527 DbgPrint(dbg_ctl_ssl_session_cache_insert, "TSSslSessionInsert: Inserting session '%s' ", buf);
8528 }
8529 SSL_SESSION *session = reinterpret_cast<SSL_SESSION *>(add_session);
8530 SSL *ssl = reinterpret_cast<SSL *>(ssl_conn);
8531 session_cache->insertSession(reinterpret_cast<const SSLSessionID &>(*session_id), session, ssl);
8532 // insertSession returns void, assume all went well
8533 return TS_SUCCESS;
8534 } else {
8535 return TS_ERROR;
8536 }
8537}
8538
8539TSReturnCode
8540TSSslSessionRemove(const TSSslSessionID *session_id)

Callers

nothing calls this directly

Calls 3

insertSessionMethod · 0.80
onMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected