From 324374ec03a091add5d6c8c31cae8d804d547437 Mon Sep 17 00:00:00 2001 From: Isabel Atkinson Date: Thu, 23 Jan 2025 14:03:03 -0700 Subject: [PATCH 1/3] RUST-2144 Remove use of deprecated openssl_probe method --- src/runtime/tls_openssl.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime/tls_openssl.rs b/src/runtime/tls_openssl.rs index cbc431aee..f6d777ce7 100644 --- a/src/runtime/tls_openssl.rs +++ b/src/runtime/tls_openssl.rs @@ -113,7 +113,9 @@ fn make_openssl_connector(cfg: TlsOptions) -> Result { fn init_trust() { static ONCE: Once = Once::new(); - ONCE.call_once(openssl_probe::init_ssl_cert_env_vars); + // nosemgrep: unsafe-usage + // mongodb rating: No Fix Needed + ONCE.call_once(|| unsafe { openssl_probe::init_openssl_env_vars() }); } fn make_ssl_stream( From 2c89fd6c775a49ef0180b158adf60c68a629da4f Mon Sep 17 00:00:00 2001 From: Isabel Atkinson Date: Thu, 30 Jan 2025 09:13:51 -0700 Subject: [PATCH 2/3] move comment --- src/runtime/tls_openssl.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/tls_openssl.rs b/src/runtime/tls_openssl.rs index f6d777ce7..56667e0c0 100644 --- a/src/runtime/tls_openssl.rs +++ b/src/runtime/tls_openssl.rs @@ -114,8 +114,8 @@ fn make_openssl_connector(cfg: TlsOptions) -> Result { fn init_trust() { static ONCE: Once = Once::new(); // nosemgrep: unsafe-usage - // mongodb rating: No Fix Needed - ONCE.call_once(|| unsafe { openssl_probe::init_openssl_env_vars() }); + ONCE.call_once(|| unsafe { openssl_probe::init_openssl_env_vars() }) // mongodb rating: No Fix + // Needed } fn make_ssl_stream( From d67cb8e2014c26c76b330b287d15cc8ff1f01e74 Mon Sep 17 00:00:00 2001 From: Isabel Atkinson Date: Thu, 30 Jan 2025 09:17:32 -0700 Subject: [PATCH 3/3] move comment --- src/runtime/tls_openssl.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/runtime/tls_openssl.rs b/src/runtime/tls_openssl.rs index 56667e0c0..a05b046fc 100644 --- a/src/runtime/tls_openssl.rs +++ b/src/runtime/tls_openssl.rs @@ -114,8 +114,10 @@ fn make_openssl_connector(cfg: TlsOptions) -> Result { fn init_trust() { static ONCE: Once = Once::new(); // nosemgrep: unsafe-usage - ONCE.call_once(|| unsafe { openssl_probe::init_openssl_env_vars() }) // mongodb rating: No Fix - // Needed + ONCE.call_once(|| unsafe { + // mongodb rating: No Fix Needed + openssl_probe::init_openssl_env_vars() + }) } fn make_ssl_stream(