Skip to content

Commit 72cba00

Browse files
authored
CDRIVER-4590 don't call ERR_load_BIO_strings for OpenSSL 3.0+ (#1216)
OpenSSL 3.0 loads error strings automatically and deprecated this function. See: https://www.openssl.org/docs/man3.0/man7/migration_guide.html#Deprecated-function-mappings
1 parent 934faf5 commit 72cba00

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libmongoc/src/mongoc/mongoc-openssl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ _mongoc_openssl_init (void)
7676

7777
SSL_library_init ();
7878
SSL_load_error_strings ();
79+
#if OPENSSL_VERSION_NUMBER < 0x30000000L
80+
// See: https://www.openssl.org/docs/man3.0/man7/migration_guide.html#Deprecated-function-mappings
7981
ERR_load_BIO_strings ();
82+
#endif
8083
OpenSSL_add_all_algorithms ();
8184
#if OPENSSL_VERSION_NUMBER < 0x10100000L
8285
_mongoc_openssl_thread_startup ();

0 commit comments

Comments
 (0)