diff options
author | Yann Ylavic <ylavic@apache.org> | 2018-06-12 20:11:09 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2018-06-12 20:11:09 +0000 |
commit | 9aefe5db8512187e194223cd411c1b63bcf0b7a8 (patch) | |
tree | deb423ee592da99470ce93bedf8892ab29ae785e /test | |
parent | af39a670ca00949536be1b3d615d2ec0392d63f3 (diff) | |
download | apr-9aefe5db8512187e194223cd411c1b63bcf0b7a8.tar.gz |
apr_crypto: follow up to r1833359.
Link underlying crypto libraries (openssl, nss, and commoncrypto) with libapr
when the corresponding --with is configured. This allows to initialize, terminate
or check whether initialized respectively with apr_crypto_lib_init(),
apr_crypto_lib_term() or apr_crypto_lib_is_initialized().
Users can now control the (un)initialization of those libraries, notably when
they also use them independently and that doing this multiple times can cause
leaks or unexpected behaviour.
The initialization code is moved from "apr_crypto_{openssl,nss,commoncrypto}.c"
where previously loaded dynamically (DSO) to "apr_crypto_internal.c" which is
linked with libapr.
Also apr_crypto_prng_init() can make sure the underlying crypto lib is ready.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1833421 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r-- | test/testcrypto.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/test/testcrypto.c b/test/testcrypto.c index 372097409..e25095450 100644 --- a/test/testcrypto.c +++ b/test/testcrypto.c @@ -556,16 +556,9 @@ static void test_crypto_init(abts_case *tc, void *data) { apr_pool_t *pool = NULL; apr_status_t rv; - int flags = 0; apr_pool_create(&pool, NULL); -#if APR_HAS_THREADS - flags = APR_CRYPTO_PRNG_PER_THREAD; -#endif - rv = apr_crypto_prng_init(apr_pool_parent_get(pool), 0, NULL, flags); - ABTS_ASSERT(tc, "failed to init apr_crypto_prng", rv == APR_SUCCESS); - rv = apr_crypto_init(pool); ABTS_ASSERT(tc, "failed to init apr_crypto", rv == APR_SUCCESS); |