diff options
author | Yann Ylavic <ylavic@apache.org> | 2018-06-21 10:52:18 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2018-06-21 10:52:18 +0000 |
commit | cb82042ea25a067f241d9b6a10463364ff4fffb9 (patch) | |
tree | 2ffccdf133eb0389cf2a94f5ec7ca6c5b060014b | |
parent | b037417a8e91c156fde34f6334a311734a1e2153 (diff) | |
download | apr-cb82042ea25a067f241d9b6a10463364ff4fffb9.tar.gz |
apr_crypto: follow up to r1833359: consistent apr_crypto_random_ prefix.
Was not for apr_crypto_thread_random_bytes(), so align with other functions.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1833993 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | crypto/apr_crypto_prng.c | 2 | ||||
-rw-r--r-- | include/apr_crypto.h | 2 | ||||
-rw-r--r-- | test/testcrypto.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/crypto/apr_crypto_prng.c b/crypto/apr_crypto_prng.c index 2c2f15f2d..4b302fb33 100644 --- a/crypto/apr_crypto_prng.c +++ b/crypto/apr_crypto_prng.c @@ -231,7 +231,7 @@ APR_DECLARE(apr_status_t) apr_crypto_random_bytes(void *buf, apr_size_t len) } #if APR_HAS_THREADS -APR_DECLARE(apr_status_t) apr_crypto_thread_random_bytes(void *buf, +APR_DECLARE(apr_status_t) apr_crypto_random_thread_bytes(void *buf, apr_size_t len) { apr_status_t rv; diff --git a/include/apr_crypto.h b/include/apr_crypto.h index 9a6154103..f8627b937 100644 --- a/include/apr_crypto.h +++ b/include/apr_crypto.h @@ -582,7 +582,7 @@ APR_DECLARE(apr_status_t) apr_crypto_random_bytes(void *buf, apr_size_t len); * called without \ref APR_CRYPTO_PRNG_PER_THREAD, * any system error (APR_ENOMEM, ...). */ -APR_DECLARE(apr_status_t) apr_crypto_thread_random_bytes(void *buf, +APR_DECLARE(apr_status_t) apr_crypto_random_thread_bytes(void *buf, apr_size_t len); #endif diff --git a/test/testcrypto.c b/test/testcrypto.c index 7c8a7c95e..2789adcb0 100644 --- a/test/testcrypto.c +++ b/test/testcrypto.c @@ -1635,7 +1635,7 @@ static void *APR_THREAD_FUNC thread_func(apr_thread_t *thd, void *data) unsigned char *randbytes = data; apr_status_t rv; - rv = apr_crypto_thread_random_bytes(randbytes, 800); + rv = apr_crypto_random_thread_bytes(randbytes, 800); apr_thread_exit(thd, rv); return NULL; @@ -1663,7 +1663,7 @@ static void test_crypto_thread_random(abts_case *tc, void *data) for (i = 0; i < NUM_THREADS; ++i) { rv = apr_thread_join(&ret, threads[i]); ABTS_ASSERT(tc, "apr_thread_join failed", rv == APR_SUCCESS); - ABTS_ASSERT(tc, "apr_crypto_thread_random_bytes failed", + ABTS_ASSERT(tc, "apr_crypto_random_thread_bytes failed", ret == APR_SUCCESS); } for (i = 0; i < NUM_THREADS; ++i) { |