Add security protocol trace event.
authorKyle Nekritz <knekritz@fb.com>
Mon, 11 Jan 2016 00:33:45 +0000 (16:33 -0800)
committerfacebook-github-bot-0 <folly-bot@fb.com>
Mon, 11 Jan 2016 01:20:22 +0000 (17:20 -0800)
Reviewed By: siyengar

Differential Revision: D2805183

fb-gh-sync-id: 9ed320dd3762658e993daa658100d0c3c617d210

folly/io/async/AsyncSSLSocket.h
folly/io/async/AsyncTransport.h

index ba7485ae00cff2b18255b4c7cdf5f6abf82d6b8e..ad2a979965df4eec7ad4f71fafd110314e248cf9 100644 (file)
@@ -275,6 +275,8 @@ class AsyncSSLSocket : public virtual AsyncSocket {
   virtual bool connecting() const override;
   virtual std::string getApplicationProtocol() noexcept override;
 
+  virtual std::string getSecurityProtocol() const override { return "TLS"; }
+
   bool isEorTrackingEnabled() const override;
   virtual void setEorTracking(bool track) override;
   virtual size_t getRawBytesWritten() const override;
index f3eebfc757d4f71f2d1912065528a90e59bd7fdd..515656b8bd63e27c97836f479d50493746af219a 100644 (file)
@@ -573,6 +573,11 @@ class AsyncTransportWrapper : virtual public AsyncTransport,
   virtual std::string getApplicationProtocol() noexcept {
     return "";
   }
+
+  /**
+   * Returns the name of the security protocol being used.
+   */
+  virtual std::string getSecurityProtocol() const { return ""; }
 };
 
 } // folly