| 75 | } |
| 76 | |
| 77 | bool |
| 78 | SSLSessionCache::getSession(const SSLSessionID &sid, SSL_SESSION **sess, ssl_session_cache_exdata **data) const |
| 79 | { |
| 80 | uint64_t hash = sid.hash(); |
| 81 | uint64_t target_bucket = hash % nbuckets; |
| 82 | SSLSessionBucket *bucket = &session_bucket[target_bucket]; |
| 83 | |
| 84 | if (dbg_ctl_ssl_session_cache.on()) { |
| 85 | char buf[sid.len * 2 + 1]; |
| 86 | sid.toString(buf, sizeof(buf)); |
| 87 | DbgPrint(dbg_ctl_ssl_session_cache_get, "SessionCache looking in bucket %" PRId64 " (%p) for session '%s' (hash: %" PRIX64 ").", |
| 88 | target_bucket, bucket, buf, hash); |
| 89 | } |
| 90 | |
| 91 | return bucket->getSession(sid, sess, data); |
| 92 | } |
| 93 | |
| 94 | void |
| 95 | SSLSessionCache::removeSession(const SSLSessionID &sid) |