From d5f3a9753f359d5bbcbb51693103784c79f5f40e Mon Sep 17 00:00:00 2001 From: tb <> Date: Tue, 1 Sep 2020 17:45:17 +0000 Subject: The bumping of sess_cb_hit stats can wait until handling of get_session_cb is completed. --- src/lib/libssl/ssl_sess.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c index be00c8a6ad..d46c85411b 100644 --- a/src/lib/libssl/ssl_sess.c +++ b/src/lib/libssl/ssl_sess.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_sess.c,v 1.94 2020/09/01 17:30:45 tb Exp $ */ +/* $OpenBSD: ssl_sess.c,v 1.95 2020/09/01 17:45:17 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -452,9 +452,6 @@ ssl_session_from_callback(SSL *s, CBS *session_id) if ((sess = s->session_ctx->internal->get_session_cb(s, CBS_data(session_id), CBS_len(session_id), ©)) == NULL) return NULL; - - s->session_ctx->internal->stats.sess_cb_hit++; - /* * The copy handler may have set copy == 0 to indicate that the session * structures are shared between threads and that it handles the @@ -464,6 +461,8 @@ ssl_session_from_callback(SSL *s, CBS *session_id) if (copy) CRYPTO_add(&sess->references, 1, CRYPTO_LOCK_SSL_SESSION); + s->session_ctx->internal->stats.sess_cb_hit++; + /* Add the externally cached session to the internal cache as well. */ if (!(s->session_ctx->internal->session_cache_mode & SSL_SESS_CACHE_NO_INTERNAL_STORE)) { -- cgit v1.2.3-55-g6feb