From df8ec7931c4d060a83dbb3f707a797dd2e8a2458 Mon Sep 17 00:00:00 2001 From: Mingtian Yin Date: Wed, 20 Jul 2016 11:43:19 -0700 Subject: [PATCH] Record whether cached certificate was used Summary: Record whether cached certificate was used Reviewed By: anirudhvr Differential Revision: D3582807 fbshipit-source-id: 246107ce383ff31718ee7dcccf8bbea459b559a8 --- folly/io/async/AsyncSSLSocket.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/folly/io/async/AsyncSSLSocket.h b/folly/io/async/AsyncSSLSocket.h index bd4f76d1..eb6251c7 100644 --- a/folly/io/async/AsyncSSLSocket.h +++ b/folly/io/async/AsyncSSLSocket.h @@ -714,6 +714,14 @@ class AsyncSSLSocket : public virtual AsyncSocket { serviceIdentity_ = std::move(serviceIdentity); } + void setCertCacheHit(bool hit) { + certCacheHit_ = hit; + } + + bool getCertCacheHit() const { + return certCacheHit_; + } + private: void init(); @@ -855,6 +863,7 @@ class AsyncSSLSocket : public virtual AsyncSocket { bool parseClientHello_{false}; bool cacheAddrOnFailure_{false}; bool bufferMovableEnabled_{false}; + bool certCacheHit_{false}; std::unique_ptr clientHelloInfo_; std::vector> alertsReceived_; -- 2.34.1