Change AsyncSSLSocket getSecurityProtocol to handle unencrypted mode
[folly.git] / folly / io / async / AsyncSSLSocket.h
index 044155dcbca6a37b749dce087197a34aa5d61e96..84551d77dea5b98f648962044b62eca9c8764ef8 100644 (file)
@@ -282,6 +282,9 @@ class AsyncSSLSocket : public virtual AsyncSocket {
   std::string getApplicationProtocol() noexcept override;
 
   std::string getSecurityProtocol() const override {
+    if (sslState_ == STATE_UNENCRYPTED) {
+      return "";
+    }
     return "TLS";
   }