diff options
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/e_des.c | 2 | ||||
-rw-r--r-- | crypto/evp/e_des3.c | 2 | ||||
-rw-r--r-- | crypto/evp/evp_enc.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/crypto/evp/e_des.c b/crypto/evp/e_des.c index 9b2facfecf..3b886263da 100644 --- a/crypto/evp/e_des.c +++ b/crypto/evp/e_des.c @@ -229,7 +229,7 @@ static int des_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) switch (type) { case EVP_CTRL_RAND_KEY: - if (RAND_bytes(ptr, 8) <= 0) + if (RAND_priv_bytes(ptr, 8) <= 0) return 0; DES_set_odd_parity((DES_cblock *)ptr); return 1; diff --git a/crypto/evp/e_des3.c b/crypto/evp/e_des3.c index da77936c96..7a2c12dbb7 100644 --- a/crypto/evp/e_des3.c +++ b/crypto/evp/e_des3.c @@ -283,7 +283,7 @@ static int des3_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) switch (type) { case EVP_CTRL_RAND_KEY: - if (RAND_bytes(ptr, EVP_CIPHER_CTX_key_length(ctx)) <= 0) + if (RAND_priv_bytes(ptr, EVP_CIPHER_CTX_key_length(ctx)) <= 0) return 0; DES_set_odd_parity(deskey); if (EVP_CIPHER_CTX_key_length(ctx) >= 16) diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 0297d2eea7..38633410cd 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -602,7 +602,7 @@ int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key) { if (ctx->cipher->flags & EVP_CIPH_RAND_KEY) return EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_RAND_KEY, 0, key); - if (RAND_bytes(key, ctx->key_len) <= 0) + if (RAND_priv_bytes(key, ctx->key_len) <= 0) return 0; return 1; } |