From 01a1e21cd55d99293c8ff8ed7c590f2ee440da43 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sat, 6 Jul 2019 12:00:41 +1000 Subject: Add missing bracket in EGD seeding code. When configured --with-prngd-socket the code had a missing bracket after an API change. Fix that and a couple of warnings. bz#3032 , from ole.weidner at protonmail.ch --- entropy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'entropy.c') diff --git a/entropy.c b/entropy.c index 31a7f1c3e..5c6594ac9 100644 --- a/entropy.c +++ b/entropy.c @@ -201,14 +201,15 @@ rexec_send_rng_seed(struct sshbuf *m) void rexec_recv_rng_seed(struct sshbuf *m) { - u_char *buf = NULL; + const u_char *buf = NULL; size_t len = 0; int r; - if ((r = sshbuf_get_string_direct(m, &buf, &len)) != 0 + if ((r = sshbuf_get_string_direct(m, &buf, &len)) != 0) fatal("%s: buffer error: %s", __func__, ssh_err(r)); - debug3("rexec_recv_rng_seed: seeding rng with %u bytes", len); + debug3("rexec_recv_rng_seed: seeding rng with %lu bytes", + (unsigned long)len); RAND_add(buf, len, len); } #endif /* OPENSSL_PRNG_ONLY */ -- cgit v1.2.3 From 9634ffbf29b3c2493e69d10b37077b09a8cbf5ff Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Tue, 23 Jul 2019 22:25:44 +1000 Subject: Add headers to prevent warnings w/out OpenSSL. --- auth2-passwd.c | 1 + entropy.c | 4 ++++ kexecdh.c | 2 ++ kexgen.c | 1 + loginrec.c | 1 + platform.c | 1 + ssh-keysign.c | 1 + ssh-pkcs11.c | 8 ++++++++ 8 files changed, 19 insertions(+) (limited to 'entropy.c') diff --git a/auth2-passwd.c b/auth2-passwd.c index 0395a69f4..f696abc21 100644 --- a/auth2-passwd.c +++ b/auth2-passwd.c @@ -29,6 +29,7 @@ #include #include +#include #include "packet.h" #include "ssherr.h" diff --git a/entropy.c b/entropy.c index 5c6594ac9..dc307e76c 100644 --- a/entropy.c +++ b/entropy.c @@ -39,6 +39,7 @@ #include #include +#include #include #include #include /* for offsetof */ @@ -248,6 +249,9 @@ seed_rng(void) #else /* WITH_OPENSSL */ +#include +#include + /* Acutal initialisation is handled in arc4random() */ void seed_rng(void) diff --git a/kexecdh.c b/kexecdh.c index 9a3bb81b8..be324a838 100644 --- a/kexecdh.c +++ b/kexecdh.c @@ -211,6 +211,8 @@ kex_ecdh_dec(struct kex *kex, const struct sshbuf *server_blob, #else +#include + #include "sshkey.h" #include "kex.h" #include "ssherr.h" diff --git a/kexgen.c b/kexgen.c index 2abbb9ef6..54292652a 100644 --- a/kexgen.c +++ b/kexgen.c @@ -27,6 +27,7 @@ #include +#include #include #include #include diff --git a/loginrec.c b/loginrec.c index 5f2a47797..93e48d517 100644 --- a/loginrec.c +++ b/loginrec.c @@ -163,6 +163,7 @@ #endif #include #include +#include #include #include #include diff --git a/platform.c b/platform.c index 41acc9370..44ba71dc5 100644 --- a/platform.c +++ b/platform.c @@ -17,6 +17,7 @@ #include "includes.h" #include +#include #include #include "log.h" diff --git a/ssh-keysign.c b/ssh-keysign.c index 7c14cde8a..a4a1b8c21 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -31,6 +31,7 @@ #endif #include #include +#include #include #include #include diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c index d9413bc4f..45ab80d0a 100644 --- a/ssh-pkcs11.c +++ b/ssh-pkcs11.c @@ -1789,6 +1789,14 @@ out: } #endif /* WITH_PKCS11_KEYGEN */ #else /* ENABLE_PKCS11 */ + +#include +#include +#include + +#include "log.h" +#include "sshkey.h" + int pkcs11_init(int interactive) { -- cgit v1.2.3 From 13c508dfed9f25e6e54c984ad00a74ef08539e70 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 2 Oct 2019 10:51:15 +1000 Subject: typo in comment --- entropy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'entropy.c') diff --git a/entropy.c b/entropy.c index dc307e76c..5de68016b 100644 --- a/entropy.c +++ b/entropy.c @@ -252,7 +252,7 @@ seed_rng(void) #include #include -/* Acutal initialisation is handled in arc4random() */ +/* Actual initialisation is handled in arc4random() */ void seed_rng(void) { -- cgit v1.2.3