Skip to content

Commit 5d93f08

Browse files
committed
apr_crypto_openssl: ERR_free_strings and ERR_load_crypto_strings are gone.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1924444 13f79535-47bb-0310-9956-ffa450edef68
1 parent a9003ea commit 5d93f08

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

crypto/apr_crypto_openssl.c

+9-1
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,10 @@ static apr_status_t crypto_shutdown(void)
215215
* older.
216216
*/
217217

218+
#if APR_USE_OPENSSL_PRE_3_0_API
218219
ERR_free_strings();
219220
EVP_cleanup();
221+
#endif
220222
#if APR_USE_OPENSSL_ENGINE_API
221223
ENGINE_cleanup();
222224
#endif
@@ -232,6 +234,8 @@ static apr_status_t crypto_shutdown_helper(void *data)
232234

233235
/**
234236
* Initialise the crypto library and perform one time initialisation.
237+
*
238+
* This is a noop from OpenSSL v3+.
235239
*/
236240
static apr_status_t crypto_init(apr_pool_t *pool, const char *params,
237241
const apu_err_t **result)
@@ -253,12 +257,16 @@ static apr_status_t crypto_init(apr_pool_t *pool, const char *params,
253257

254258
#if APR_USE_OPENSSL_PRE_1_1_API
255259
(void)CRYPTO_malloc_init();
256-
#else
260+
#elif APR_USE_OPENSSL_PRE_3_0_API
257261
OPENSSL_malloc_init();
258262
#endif
263+
264+
#if APR_USE_OPENSSL_PRE_3_0_API
259265
ERR_load_crypto_strings();
260266
/* SSL_load_error_strings(); */
261267
OpenSSL_add_all_algorithms();
268+
#endif
269+
262270
#if APR_USE_OPENSSL_ENGINE_API
263271
ENGINE_load_builtin_engines();
264272
ENGINE_register_all_complete();

0 commit comments

Comments
 (0)