aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2016-06-27 17:27:54 +0200
committerTobias Brunner <tobias@strongswan.org>2016-06-29 11:09:38 +0200
commitcd08eb84cbb30c03792ae15560fd52044aa8fd56 (patch)
tree15747ddf4566c3cc01d404e41ae2d5ec63737327
parent985d7b1c67213400a7c9ca389caaab0a09f80eb5 (diff)
downloadstrongswan-cd08eb84cbb30c03792ae15560fd52044aa8fd56.tar.bz2
strongswan-cd08eb84cbb30c03792ae15560fd52044aa8fd56.tar.xz
openssl: Don't use deprecated RAND_pseudo_bytes()
-rw-r--r--src/libstrongswan/plugins/openssl/openssl_rng.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/libstrongswan/plugins/openssl/openssl_rng.c b/src/libstrongswan/plugins/openssl/openssl_rng.c
index f8e98fc0f..a25b6b4b6 100644
--- a/src/libstrongswan/plugins/openssl/openssl_rng.c
+++ b/src/libstrongswan/plugins/openssl/openssl_rng.c
@@ -49,13 +49,6 @@ struct private_openssl_rng_t {
METHOD(rng_t, get_bytes, bool,
private_openssl_rng_t *this, size_t bytes, uint8_t *buffer)
{
- if (this->quality == RNG_WEAK)
- {
- /* RAND_pseudo_bytes() returns 1 if returned bytes are strong,
- * 0 if of not. Both is acceptable for RNG_WEAK. */
- return RAND_pseudo_bytes((char*)buffer, bytes) != -1;
- }
- /* A 0 return value is a failure for RAND_bytes() */
return RAND_bytes((char*)buffer, bytes) == 1;
}