Record whether cached certificate was used
authorMingtian Yin <mingtian@fb.com>
Wed, 20 Jul 2016 18:43:19 +0000 (11:43 -0700)
committerFacebook Github Bot 9 <facebook-github-bot-9-bot@fb.com>
Wed, 20 Jul 2016 18:53:29 +0000 (11:53 -0700)
Summary: Record whether cached certificate was used

Reviewed By: anirudhvr

Differential Revision: D3582807

fbshipit-source-id: 246107ce383ff31718ee7dcccf8bbea459b559a8

folly/io/async/AsyncSSLSocket.h

index bd4f76d12ab2080327fee9996e4d18147a7fb08a..eb6251c71eee087b4c156dc1680892db51b71e86 100644 (file)
@@ -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<ssl::ClientHelloInfo> clientHelloInfo_;
   std::vector<std::pair<char, StringPiece>> alertsReceived_;