Summary:
Some things like gSOAP, initialize SSL only to have SSLContext stomp over their
work. Add a method to allow flagging SSLContext as "initialized" to use the
existing global state.
Test Plan:
Tested running mcrouter and paymentnegined to verify existing
functionality appears normal.
Reviewed By: subodh@fb.com
Subscribers: ssl-diffs@, folly-diffs@, yfeldblum, chalfant, dihde
FB internal diff:
D1959936
Tasks:
6655251
Signature: t1:
1959936:
1427994292:
8b2be1742ef17a5ec2c7b3ad37787d2cf4d142a6
lockTypes() = inLockTypes;
}
+void SSLContext::markInitialized() {
+ std::lock_guard<std::mutex> g(mutex_);
+ initialized_ = true;
+}
+
void SSLContext::initializeOpenSSL() {
std::lock_guard<std::mutex> g(mutex_);
initializeOpenSSLLocked();
static void initializeOpenSSL();
static void cleanupOpenSSL();
+ /**
+ * Mark openssl as initialized without actually performing any initialization.
+ * Please use this only if you are using a library which requires that it must
+ * make its own calls to SSL_library_init() and related functions.
+ */
+ static void markInitialized();
+
/**
* Default randomize method.
*/