I am using couchbase-lite-core (CBL2.0.0) to connect to a couchbase server. When I try to use SSL by using “blips” or “wss” as the schema in C4Address for c4repl_new(), I get an error when trying to replicate:
*** 1537276274.196254880 0 140735888205568 mg_connect_websocket_client2:14177: Websocket client connect error: SSL is not initialized
This seems to be because mg_init_library() is not called with the flag to enable SSL support. CBL passes 0, but enabling SSL would require 2. See https://github.com/couchbase/couchbase-lite-core/blob/6d0ad8fdbdbf694b70be3fbf0bf62451194e60db/Replicator/CivetWebSocket.cc#L123.
Q: Is this a bug in CBL or am I missing something?
By changing the value to 2, CBL will then try to initialize SSL. However that fails, because the symbol CRYPTO_num_locks is not found in libcrypto.so. This seems to be because Ubuntu 18.04 is using OpenSSL 1.1, which no longer has that symbol.
Q: Am I missing something here to make that work? Or do I need to manually pass the compiler define OPENSSL_API_1_1 to the build system, which looks like it should fix the problem?