| 92 | } |
| 93 | |
| 94 | void |
| 95 | SSLSessionCache::removeSession(const SSLSessionID &sid) |
| 96 | { |
| 97 | uint64_t hash = sid.hash(); |
| 98 | uint64_t target_bucket = hash % nbuckets; |
| 99 | SSLSessionBucket *bucket = &session_bucket[target_bucket]; |
| 100 | |
| 101 | if (dbg_ctl_ssl_session_cache_remove.on()) { |
| 102 | char buf[sid.len * 2 + 1]; |
| 103 | sid.toString(buf, sizeof(buf)); |
| 104 | DbgPrint(dbg_ctl_ssl_session_cache_remove, |
| 105 | "SessionCache using bucket %" PRId64 " (%p): Removing session '%s' (hash: %" PRIX64 ").", target_bucket, bucket, buf, |
| 106 | hash); |
| 107 | } |
| 108 | Metrics::Counter::increment(ssl_rsb.session_cache_eviction); |
| 109 | |
| 110 | bucket->removeSession(sid); |
| 111 | } |
| 112 | |
| 113 | void |
| 114 | SSLSessionCache::insertSession(const SSLSessionID &sid, SSL_SESSION *sess, SSL *ssl) |