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

[email protected]
Newsgroups gmane.comp.apache.apr.cvs
Message-ID <[email protected]>
Author: minfrin
Date: Tue Mar 18 09:14:44 2025
New Revision: 1924444

URL: http://svn.apache.org/viewvc?rev=1924444&view=rev
Log:
apr_crypto_openssl: ERR_free_strings and ERR_load_crypto_strings are gone.

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=1924444&r1=1924443&r2=1924444&view=diff
==============================================================================
--- apr/apr/trunk/crypto/apr_crypto_openssl.c (original)
+++ apr/apr/trunk/crypto/apr_crypto_openssl.c Tue Mar 18 09:14:44 2025
@@ -215,8 +215,10 @@ static apr_status_t crypto_shutdown(void
      * older.
      */
 
+#if APR_USE_OPENSSL_PRE_3_0_API
     ERR_free_strings();
     EVP_cleanup();
+#endif
 #if APR_USE_OPENSSL_ENGINE_API
     ENGINE_cleanup();
 #endif
@@ -232,6 +234,8 @@ static apr_status_t crypto_shutdown_help
 
 /**
  * Initialise the crypto library and perform one time initialisation.
+ *
+ * This is a noop from OpenSSL v3+.
  */
 static apr_status_t crypto_init(apr_pool_t *pool, const char *params,
         const apu_err_t **result)
@@ -253,12 +257,16 @@ static apr_status_t crypto_init(apr_pool
 
 #if APR_USE_OPENSSL_PRE_1_1_API
     (void)CRYPTO_malloc_init();
-#else
+#elif APR_USE_OPENSSL_PRE_3_0_API
     OPENSSL_malloc_init();
 #endif
+
+#if APR_USE_OPENSSL_PRE_3_0_API
     ERR_load_crypto_strings();
     /* SSL_load_error_strings(); */
     OpenSSL_add_all_algorithms();
+#endif
+
 #if APR_USE_OPENSSL_ENGINE_API
     ENGINE_load_builtin_engines();
     ENGINE_register_all_complete();
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.