summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pem/pem_lib.c
diff options
context:
space:
mode:
authorderaadt <>2014-04-17 12:14:26 +0000
committerderaadt <>2014-04-17 12:14:26 +0000
commit158ff01036c37c580db90c516caa28e5f48ae7a0 (patch)
treeaf52f9c7f7962a9cca944bfe4ead5df91c5dfff3 /src/lib/libcrypto/pem/pem_lib.c
parent0ea210fb45bd6ba485ab770e9fe1102bc9b066fe (diff)
downloadopenbsd-158ff01036c37c580db90c516caa28e5f48ae7a0.tar.gz
openbsd-158ff01036c37c580db90c516caa28e5f48ae7a0.tar.bz2
openbsd-158ff01036c37c580db90c516caa28e5f48ae7a0.zip
Do not feed RSA private key information to the random subsystem as
entropy. It might be fed to a pluggable random subsystem.... What were they thinking?! ok guenther
Diffstat (limited to 'src/lib/libcrypto/pem/pem_lib.c')
-rw-r--r--src/lib/libcrypto/pem/pem_lib.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/lib/libcrypto/pem/pem_lib.c b/src/lib/libcrypto/pem/pem_lib.c
index 74baa2ec1c..0dfa7c7376 100644
--- a/src/lib/libcrypto/pem/pem_lib.c
+++ b/src/lib/libcrypto/pem/pem_lib.c
@@ -384,7 +384,6 @@ int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp,
384 } 384 }
385 kstr=(unsigned char *)buf; 385 kstr=(unsigned char *)buf;
386 } 386 }
387 RAND_add(data,i,0);/* put in the RSA key. */
388 OPENSSL_assert(enc->iv_len <= (int)sizeof(iv)); 387 OPENSSL_assert(enc->iv_len <= (int)sizeof(iv));
389 if (RAND_pseudo_bytes(iv,enc->iv_len) < 0) /* Generate a salt */ 388 if (RAND_pseudo_bytes(iv,enc->iv_len) < 0) /* Generate a salt */
390 goto err; 389 goto err;