From 04b39900cb48c004d5b52086f6800cf9b55abaa5 Mon Sep 17 00:00:00 2001 From: Kyle Nekritz Date: Sun, 10 Jan 2016 16:33:45 -0800 Subject: [PATCH] Add security protocol trace event. Reviewed By: siyengar Differential Revision: D2805183 fb-gh-sync-id: 9ed320dd3762658e993daa658100d0c3c617d210 --- folly/io/async/AsyncSSLSocket.h | 2 ++ folly/io/async/AsyncTransport.h | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/folly/io/async/AsyncSSLSocket.h b/folly/io/async/AsyncSSLSocket.h index ba7485ae..ad2a9799 100644 --- a/folly/io/async/AsyncSSLSocket.h +++ b/folly/io/async/AsyncSSLSocket.h @@ -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; diff --git a/folly/io/async/AsyncTransport.h b/folly/io/async/AsyncTransport.h index f3eebfc7..515656b8 100644 --- a/folly/io/async/AsyncTransport.h +++ b/folly/io/async/AsyncTransport.h @@ -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 -- 2.34.1