diff options
author | 2016-09-13 16:01:37 +0000 | |
---|---|---|
committer | 2016-09-13 16:01:37 +0000 | |
commit | 561aec62dc9cc14ebe4192c589b36712c7590738 (patch) | |
tree | 0a28dbca60d6719b774cb28fd517b3bdd1597c07 | |
parent | use reallocarray() (diff) | |
download | wireguard-openbsd-561aec62dc9cc14ebe4192c589b36712c7590738.tar.xz wireguard-openbsd-561aec62dc9cc14ebe4192c589b36712c7590738.zip |
RAND_status() and RAND_seed() are not needed, this is 2016.
-rw-r--r-- | usr.sbin/acme-client/acctproc.c | 14 | ||||
-rw-r--r-- | usr.sbin/acme-client/keyproc.c | 15 |
2 files changed, 2 insertions, 27 deletions
diff --git a/usr.sbin/acme-client/acctproc.c b/usr.sbin/acme-client/acctproc.c index a10daca54f1..d17a645b363 100644 --- a/usr.sbin/acme-client/acctproc.c +++ b/usr.sbin/acme-client/acctproc.c @@ -1,4 +1,4 @@ -/* $Id: acctproc.c,v 1.5 2016/09/01 00:35:21 florian Exp $ */ +/* $Id: acctproc.c,v 1.6 2016/09/13 16:01:37 deraadt Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -320,7 +320,6 @@ acctproc(int netsock, const char *acctkey, int newacct) EVP_PKEY *pkey; long lval; enum acctop op; - unsigned char rbuf[64]; int rc, cc; mode_t prev; @@ -352,17 +351,6 @@ acctproc(int netsock, const char *acctkey, int newacct) goto out; } - /* - * Seed our PRNG with data from arc4random(). - * Do this until we're told it's ok and use increments of 64 - * bytes (arbitrarily). - */ - - while (0 == RAND_status()) { - arc4random_buf(rbuf, sizeof(rbuf)); - RAND_seed(rbuf, sizeof(rbuf)); - } - if (newacct) { if (NULL == (pkey = rsa_key_create(f, acctkey))) goto out; diff --git a/usr.sbin/acme-client/keyproc.c b/usr.sbin/acme-client/keyproc.c index dfe3f321579..107803656b1 100644 --- a/usr.sbin/acme-client/keyproc.c +++ b/usr.sbin/acme-client/keyproc.c @@ -1,4 +1,4 @@ -/* $Id: keyproc.c,v 1.4 2016/09/01 00:35:22 florian Exp $ */ +/* $Id: keyproc.c,v 1.5 2016/09/13 16:01:37 deraadt Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -84,7 +84,6 @@ keyproc(int netsock, const char *keyfile, EVP_PKEY *pkey; X509_REQ *x; X509_NAME *name; - unsigned char rbuf[64]; int len, rc, cc, nid; mode_t prev; STACK_OF(X509_EXTENSION) *exts; @@ -120,18 +119,6 @@ keyproc(int netsock, const char *keyfile, goto out; } - /* - * Seed our PRNG with data from arc4random(). - * Do this until we're told it's ok and use increments of 64 - * bytes (arbitrarily). - * TODO: is this sufficient as a RAND source? - */ - - while (0 == RAND_status()) { - arc4random_buf(rbuf, sizeof(rbuf)); - RAND_seed(rbuf, sizeof(rbuf)); - } - if (newkey) { if (NULL == (pkey = rsa_key_create(f, keyfile))) goto out; |