mirror of
https://gitee.com/openharmony/third_party_nghttp2
synced 2025-02-02 22:46:20 +00:00
nghttpx: Change session cache key prefix
This commit is contained in:
parent
bb228c27de
commit
a4a9cfd650
@ -185,7 +185,8 @@ int ocsp_resp_cb(SSL *ssl, void *arg) {
|
||||
}
|
||||
} // namespace
|
||||
|
||||
constexpr char MEMCACHED_SESSION_ID_PREFIX[] = "nghttpx:session-id:";
|
||||
constexpr char MEMCACHED_SESSION_CACHE_KEY_PREFIX[] =
|
||||
"nghttpx:tls-session-cache:";
|
||||
|
||||
namespace {
|
||||
int tls_session_new_cb(SSL *ssl, SSL_SESSION *session) {
|
||||
@ -204,7 +205,7 @@ int tls_session_new_cb(SSL *ssl, SSL_SESSION *session) {
|
||||
|
||||
auto req = make_unique<MemcachedRequest>();
|
||||
req->op = MEMCACHED_OP_ADD;
|
||||
req->key = MEMCACHED_SESSION_ID_PREFIX;
|
||||
req->key = MEMCACHED_SESSION_CACHE_KEY_PREFIX;
|
||||
req->key += util::format_hex(id, idlen);
|
||||
|
||||
auto sessionlen = i2d_SSL_SESSION(session, nullptr);
|
||||
@ -261,7 +262,7 @@ SSL_SESSION *tls_session_get_cb(SSL *ssl, unsigned char *id, int idlen,
|
||||
|
||||
auto req = make_unique<MemcachedRequest>();
|
||||
req->op = MEMCACHED_OP_GET;
|
||||
req->key = MEMCACHED_SESSION_ID_PREFIX;
|
||||
req->key = MEMCACHED_SESSION_CACHE_KEY_PREFIX;
|
||||
req->key += util::format_hex(id, idlen);
|
||||
req->cb = [conn](MemcachedRequest *, MemcachedResult res) {
|
||||
if (LOG_ENABLED(INFO)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user