mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-31 01:35:11 +02:00
Fix fixed egd code
This commit is contained in:
parent
7a445bb8d8
commit
0800647391
@ -4,6 +4,7 @@
|
|||||||
- (djm) Added password expiry checking (no password change support)
|
- (djm) Added password expiry checking (no password change support)
|
||||||
- (djm) Make EGD failures non-fatal if OpenSSL's entropy pool is still OK
|
- (djm) Make EGD failures non-fatal if OpenSSL's entropy pool is still OK
|
||||||
based on patch from Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
|
based on patch from Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
|
||||||
|
- (djm) Fix fixed EGD code.
|
||||||
- OpenBSD CVS update
|
- OpenBSD CVS update
|
||||||
- provos@cvs.openbsd.org 2000/06/25 14:17:58
|
- provos@cvs.openbsd.org 2000/06/25 14:17:58
|
||||||
[channels.c]
|
[channels.c]
|
||||||
|
14
entropy.c
14
entropy.c
@ -35,7 +35,7 @@
|
|||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
||||||
|
|
||||||
RCSID("$Id: entropy.c,v 1.15 2000/06/26 03:01:33 djm Exp $");
|
RCSID("$Id: entropy.c,v 1.16 2000/06/26 03:55:31 djm Exp $");
|
||||||
|
|
||||||
#ifndef offsetof
|
#ifndef offsetof
|
||||||
# define offsetof(type, member) ((size_t) &((type *)0)->member)
|
# define offsetof(type, member) ((size_t) &((type *)0)->member)
|
||||||
@ -158,11 +158,13 @@ seed_rng(void)
|
|||||||
|
|
||||||
debug("Seeding random number generator");
|
debug("Seeding random number generator");
|
||||||
|
|
||||||
if (!get_random_bytes(buf, sizeof(buf)) && !RAND_status())
|
if (!get_random_bytes(buf, sizeof(buf))) {
|
||||||
fatal("Entropy collection failed and entropy exhausted");
|
if (!RAND_status())
|
||||||
|
fatal("Entropy collection failed and entropy exhausted");
|
||||||
RAND_add(buf, sizeof(buf), sizeof(buf));
|
} else {
|
||||||
|
RAND_add(buf, sizeof(buf), sizeof(buf));
|
||||||
|
}
|
||||||
|
|
||||||
memset(buf, '\0', sizeof(buf));
|
memset(buf, '\0', sizeof(buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user