Skip to content

Commit 265ec23

Browse files
committed
Moving the body of setManualOpenSSLInitialization() to the cpp file
See the comment made in here where it was suggested but never done: #1714 (comment)
1 parent 6854d14 commit 265ec23

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

lib/cpp/src/thrift/transport/TSSLSocket.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,10 @@ int TSSLSocketFactory::passwordCallback(char* password, int size, int, void* dat
11341134
return length;
11351135
}
11361136

1137+
void TSSLSocketFactory::setManualOpenSSLInitialization(bool manualOpenSSLInitialization) {
1138+
manualOpenSSLInitialization_ = manualOpenSSLInitialization;
1139+
}
1140+
11371141
// extract error messages from error queue
11381142
void buildErrors(string& errors, int errno_copy, int sslerrno) {
11391143
unsigned long errorCode;

lib/cpp/src/thrift/transport/TSSLSocket.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,8 @@ class TSSLSocketFactory {
306306
* @param manager The AccessManager instance
307307
*/
308308
virtual void access(std::shared_ptr<AccessManager> manager) { access_ = manager; }
309-
static void setManualOpenSSLInitialization(bool manualOpenSSLInitialization) {
310-
manualOpenSSLInitialization_ = manualOpenSSLInitialization;
311-
}
309+
310+
static void setManualOpenSSLInitialization(bool manualOpenSSLInitialization);
312311

313312
protected:
314313
std::shared_ptr<SSLContext> ctx_;
@@ -327,7 +326,7 @@ class TSSLSocketFactory {
327326
std::shared_ptr<AccessManager> access_;
328327
static concurrency::Mutex mutex_;
329328
static uint64_t count_;
330-
/*THRIFT_EXPORT*/ static bool manualOpenSSLInitialization_; // questionable to export a private member
329+
static bool manualOpenSSLInitialization_;
331330
static bool didWeInitializeOpenSSL_; // in that case we also perform de-init
332331
void setup(std::shared_ptr<TSSLSocket> ssl);
333332
static int passwordCallback(char* password, int size, int, void* data);

0 commit comments

Comments
 (0)