summaryrefslogtreecommitdiff
path: root/entropy.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2019-07-06 12:00:41 +1000
committerDarren Tucker <dtucker@dtucker.net>2019-07-06 12:06:48 +1000
commit01a1e21cd55d99293c8ff8ed7c590f2ee440da43 (patch)
treefe86a4986a84a4018412db4230c51c1fba89500f /entropy.c
parente187b1d4607392cf2c19243afe0d0311a4ff3591 (diff)
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
Diffstat (limited to 'entropy.c')
-rw-r--r--entropy.c7
1 files changed, 4 insertions, 3 deletions
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)
201void 201void
202rexec_recv_rng_seed(struct sshbuf *m) 202rexec_recv_rng_seed(struct sshbuf *m)
203{ 203{
204 u_char *buf = NULL; 204 const u_char *buf = NULL;
205 size_t len = 0; 205 size_t len = 0;
206 int r; 206 int r;
207 207
208 if ((r = sshbuf_get_string_direct(m, &buf, &len)) != 0 208 if ((r = sshbuf_get_string_direct(m, &buf, &len)) != 0)
209 fatal("%s: buffer error: %s", __func__, ssh_err(r)); 209 fatal("%s: buffer error: %s", __func__, ssh_err(r));
210 210
211 debug3("rexec_recv_rng_seed: seeding rng with %u bytes", len); 211 debug3("rexec_recv_rng_seed: seeding rng with %lu bytes",
212 (unsigned long)len);
212 RAND_add(buf, len, len); 213 RAND_add(buf, len, len);
213} 214}
214#endif /* OPENSSL_PRNG_ONLY */ 215#endif /* OPENSSL_PRNG_ONLY */