summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sshd.c b/sshd.c
index 19ee92b27..366ae92a2 100644
--- a/sshd.c
+++ b/sshd.c
@@ -640,6 +640,8 @@ privsep_preauth_child(void)
640 arc4random_buf(rnd, sizeof(rnd)); 640 arc4random_buf(rnd, sizeof(rnd));
641#ifdef WITH_OPENSSL 641#ifdef WITH_OPENSSL
642 RAND_seed(rnd, sizeof(rnd)); 642 RAND_seed(rnd, sizeof(rnd));
643 if ((RAND_bytes((u_char *)rnd, 1)) != 1)
644 fatal("%s: RAND_bytes failed", __func__);
643#endif 645#endif
644 explicit_bzero(rnd, sizeof(rnd)); 646 explicit_bzero(rnd, sizeof(rnd));
645 647
@@ -783,6 +785,8 @@ privsep_postauth(Authctxt *authctxt)
783 arc4random_buf(rnd, sizeof(rnd)); 785 arc4random_buf(rnd, sizeof(rnd));
784#ifdef WITH_OPENSSL 786#ifdef WITH_OPENSSL
785 RAND_seed(rnd, sizeof(rnd)); 787 RAND_seed(rnd, sizeof(rnd));
788 if ((RAND_bytes((u_char *)rnd, 1)) != 1)
789 fatal("%s: RAND_bytes failed", __func__);
786#endif 790#endif
787 explicit_bzero(rnd, sizeof(rnd)); 791 explicit_bzero(rnd, sizeof(rnd));
788 792
@@ -1452,6 +1456,8 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
1452 arc4random_buf(rnd, sizeof(rnd)); 1456 arc4random_buf(rnd, sizeof(rnd));
1453#ifdef WITH_OPENSSL 1457#ifdef WITH_OPENSSL
1454 RAND_seed(rnd, sizeof(rnd)); 1458 RAND_seed(rnd, sizeof(rnd));
1459 if ((RAND_bytes((u_char *)rnd, 1)) != 1)
1460 fatal("%s: RAND_bytes failed", __func__);
1455#endif 1461#endif
1456 explicit_bzero(rnd, sizeof(rnd)); 1462 explicit_bzero(rnd, sizeof(rnd));
1457 } 1463 }