Revert D4389970: add an option to clear error before calling ssl methods
[folly.git] / folly / io / async / AsyncSSLSocket.h
index e9aca826c379cb788578460c6179f709b827aa6f..4b0f13f6c1c0dbd90dafba3258d4c49f136b5a5d 100644 (file)
@@ -664,20 +664,9 @@ class AsyncSSLSocket : public virtual AsyncSocket {
     return sessionResumptionAttempted_;
   }
 
-  /**
-   * Clears the ERR stack before invoking SSL methods.
-   * This is useful if unrelated code that runs in the same thread
-   * does not properly handle SSL error conditions, in which case
-   * it could cause SSL_* methods to fail with incorrect error codes.
-   */
-  void setClearOpenSSLErrors(bool clearErr) {
-    clearOpenSSLErrors_ = clearErr;
-  }
-
  private:
 
   void init();
-  void clearOpenSSLErrors();
 
  protected:
 
@@ -722,7 +711,6 @@ class AsyncSSLSocket : public virtual AsyncSocket {
 
   // This virtual wrapper around SSL_write exists solely for testing/mockability
   virtual int sslWriteImpl(SSL *ssl, const void *buf, int n) {
-    clearOpenSSLErrors();
     return SSL_write(ssl, buf, n);
   }
 
@@ -830,9 +818,6 @@ class AsyncSSLSocket : public virtual AsyncSocket {
   bool sessionResumptionAttempted_{false};
 
   std::unique_ptr<IOBuf> preReceivedData_;
-  // Whether or not to clear the err stack before invocation of another
-  // SSL method
-  bool clearOpenSSLErrors_{false};
 };
 
 } // namespace