Github user anmolnar commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/639#discussion_r220136616
--- Diff: zookeeper-client/zookeeper-client-c/src/zookeeper.c ---
@@ -2213,6 +2259,72 @@ static socket_t zookeeper_connect(zhandle_t *zh,
LOG_DEBUG(LOGCALLBACK(zh), "[zk] connect()\n");
rc = connect(fd, (struct sockaddr *)addr, addr_len);
+#ifdef HAVE_OPENSSL_H
+ if (zh->fd->cert != NULL) {
+ SSL_CTX *ctx = NULL;
+ SSL *ssl = NULL;
+ const SSL_METHOD *method;
+
+ SSL_library_init();
--- End diff --
Which version of OpenSSL are you going to support?
According to the wiki:
https://wiki.openssl.org/index.php/Library_Initialization
You need a different call to init openssl library as of version `1.1.0`
---