svn commit: r1924433 - /apr/apr/trunk/crypto/apr_crypto_openssl.c

[email protected]
Newsgroups gmane.comp.apache.apr.cvs
Message-ID <[email protected]>
Author: minfrin
Date: Mon Mar 17 14:41:50 2025
New Revision: 1924433

URL: http://svn.apache.org/viewvc?rev=1924433&view=rev
Log:
apr_crypto_openssl: Remove remaining ENGINE references on openssl3+

Modified:
    apr/apr/trunk/crypto/apr_crypto_openssl.c

Modified: apr/apr/trunk/crypto/apr_crypto_openssl.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/crypto/apr_crypto_openssl.c?rev=1924433&r1=1924432&r2=1924433&view=diff
==============================================================================
--- apr/apr/trunk/crypto/apr_crypto_openssl.c (original)
+++ apr/apr/trunk/crypto/apr_crypto_openssl.c Mon Mar 17 14:41:50 2025
@@ -90,8 +90,7 @@
 
 #endif /* defined(LIBRESSL_VERSION_NUMBER) */
 
-#if APR_USE_OPENSSL_PRE_3_0_API \
-    || (defined(OPENSSL_API_LEVEL) && OPENSSL_API_LEVEL < 30000)
+#if APR_USE_OPENSSL_PRE_3_0_API
 #define APR_USE_OPENSSL_ENGINE_API 1
 #else
 #define APR_USE_OPENSSL_ENGINE_API 0
@@ -218,8 +217,10 @@ static apr_status_t crypto_shutdown(void
 
     ERR_free_strings();
     EVP_cleanup();
+#if APR_USE_OPENSSL_ENGINE_API
     ENGINE_cleanup();
 #endif
+#endif
 
     return APR_SUCCESS;
 }
@@ -241,7 +242,9 @@ static apr_status_t crypto_init(apr_pool
      *
      * We tell openssl we want to include engine support.
      */
+#if APR_USE_OPENSSL_ENGINE_API
     OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN, NULL);
+#endif
 
 #else
     /* Configuration below is for legacy versions Openssl v1.0 and
@@ -256,9 +259,11 @@ static apr_status_t crypto_init(apr_pool
     ERR_load_crypto_strings();
     /* SSL_load_error_strings(); */
     OpenSSL_add_all_algorithms();
+#if APR_USE_OPENSSL_ENGINE_API
     ENGINE_load_builtin_engines();
     ENGINE_register_all_complete();
 #endif
+#endif
 
     apr_pool_cleanup_register(pool, pool, crypto_shutdown_helper,
             apr_pool_cleanup_null);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.