Add method to check if SSL Lock is disabled
[folly.git] / folly / io / async / SSLContext.h
index f4a638ef94f04ac50ba003432d9caaccf7b24e79..5e539e0c20f4eefa69b32f80650bafa9059e396b 100644 (file)
@@ -449,6 +449,16 @@ class SSLContext {
    */
   static void setSSLLockTypes(std::map<int, SSLLockType> lockTypes);
 
+  /**
+   * Determine if the SSL lock with the specified id (i.e.
+   * CRYPTO_LOCK_SSL_SESSION) is disabled.  This should be called after
+   * initializeOpenSSL.  This will only check if the specified lock has been
+   * explicitly set to LOCK_NONE.
+   *
+   * This is not safe to call while setSSLLockTypes is being called.
+   */
+  static bool isSSLLockDisabled(int lockId);
+
   /**
    * Examine OpenSSL's error stack, and return a string description of the
    * errors.