Index: unit_tests/CMakeLists.txt
--- unit_tests/CMakeLists.txt.orig
+++ unit_tests/CMakeLists.txt
@@ -307,23 +307,7 @@ set(ENVIRONMENT
 # The Rust openssl-sys crate needs to know how to find the OpenSSL headers and libraries.
 get_filename_component(OPENSSL_DIR "${OPENSSL_INCLUDE_DIR}" DIRECTORY)
 
-set(OPENSSL_LIBS "")
-
-# Get the libcrypto library.
-# Remove path and extension.
-get_filename_component(LIBNAME "${OPENSSL_CRYPTO_LIBRARY}" NAME_WLE)
-# Remove "lib" prefix, if present.
-string(REGEX REPLACE "^lib" "" LIBNAME "${LIBNAME}")
-# Add libcrypto.
-set(OPENSSL_LIBS "${LIBNAME}")
-
-# Get the libssl library.
-# Remove path and extension.
-get_filename_component(LIBNAME "${OPENSSL_SSL_LIBRARY}" NAME_WLE)
-# Remove "lib" prefix, if present.
-string(REGEX REPLACE "^lib" "" LIBNAME "${LIBNAME}")
-# Add libssl.
-set(OPENSSL_LIBS "${OPENSSL_LIBS}:${LIBNAME}")
+set(OPENSSL_LIBS "ssl:crypto")
 
 # Get directory of the first library to use for the OPENSSL_LIB_DIR.
 get_filename_component(OPENSSL_LIB_DIR "${OPENSSL_CRYPTO_LIBRARY}" DIRECTORY)
