|
Jan F. Chadima |
28355b |
diff -up openssh-5.3p1/ssh-add.c.randclean openssh-5.3p1/ssh-add.c
|
|
Jan F. Chadima |
28355b |
--- openssh-5.3p1/ssh-add.c.randclean 2010-01-20 19:13:28.000000000 +0100
|
|
Jan F. Chadima |
28355b |
+++ openssh-5.3p1/ssh-add.c 2010-01-20 19:13:29.000000000 +0100
|
|
Jan F. Chadima |
28355b |
@@ -41,6 +41,7 @@
|
|
Jan F. Chadima |
28355b |
#include <sys/stat.h>
|
|
Jan F. Chadima |
28355b |
#include <sys/param.h>
|
|
Jan F. Chadima |
28355b |
|
|
Jan F. Chadima |
28355b |
+#include <openssl/rand.h>
|
|
Jan F. Chadima |
28355b |
#include <openssl/evp.h>
|
|
Jan F. Chadima |
28355b |
#include <openssl/fips.h>
|
|
Jan F. Chadima |
28355b |
#include "openbsd-compat/openssl-compat.h"
|
|
Jan F. Chadima |
28355b |
@@ -471,6 +472,9 @@ main(int argc, char **argv)
|
|
Jan F. Chadima |
28355b |
int use_nss = 0;
|
|
Jan F. Chadima |
28355b |
#endif
|
|
Jan F. Chadima |
28355b |
|
|
Jan F. Chadima |
28355b |
+ /* clean the PRNG status when exiting the program */
|
|
Jan F. Chadima |
28355b |
+ atexit(RAND_cleanup);
|
|
Jan F. Chadima |
28355b |
+
|
|
Jan F. Chadima |
28355b |
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
|
|
Jan F. Chadima |
28355b |
sanitise_stdfd();
|
|
Jan F. Chadima |
28355b |
|
|
Jan F. Chadima |
28355b |
diff -up openssh-5.3p1/ssh.c.randclean openssh-5.3p1/ssh.c
|
|
Jan F. Chadima |
28355b |
--- openssh-5.3p1/ssh.c.randclean 2010-01-20 19:13:29.000000000 +0100
|
|
Jan F. Chadima |
28355b |
+++ openssh-5.3p1/ssh.c 2010-01-20 19:13:29.000000000 +0100
|
|
Jan F. Chadima |
28355b |
@@ -70,6 +70,7 @@
|
|
Jan F. Chadima |
28355b |
#include <netinet/in.h>
|
|
Jan F. Chadima |
28355b |
#include <arpa/inet.h>
|
|
Jan F. Chadima |
28355b |
|
|
Jan F. Chadima |
28355b |
+#include <openssl/rand.h>
|
|
Jan F. Chadima |
28355b |
#include <openssl/evp.h>
|
|
Jan F. Chadima |
28355b |
#include <openssl/err.h>
|
|
Jan F. Chadima |
28355b |
#include <openssl/fips.h>
|
|
Jan F. Chadima |
28355b |
@@ -220,6 +221,9 @@ main(int ac, char **av)
|
|
Jan F. Chadima |
28355b |
struct servent *sp;
|
|
Jan F. Chadima |
28355b |
Forward fwd;
|
|
Jan F. Chadima |
28355b |
|
|
Jan F. Chadima |
28355b |
+ /* clean the PRNG status when exiting the program */
|
|
Jan F. Chadima |
28355b |
+ atexit(RAND_cleanup);
|
|
Jan F. Chadima |
28355b |
+
|
|
Jan F. Chadima |
28355b |
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
|
|
Jan F. Chadima |
28355b |
sanitise_stdfd();
|
|
Jan F. Chadima |
28355b |
|
|
Jan F. Chadima |
28355b |
diff -up openssh-5.3p1/sshd.c.randclean openssh-5.3p1/sshd.c
|
|
Jan F. Chadima |
28355b |
--- openssh-5.3p1/sshd.c.randclean 2010-01-20 19:13:29.000000000 +0100
|
|
Jan F. Chadima |
28355b |
+++ openssh-5.3p1/sshd.c 2010-01-20 19:13:29.000000000 +0100
|
|
Jan F. Chadima |
28355b |
@@ -1263,6 +1263,9 @@ main(int ac, char **av)
|
|
Jan F. Chadima |
28355b |
Key *key;
|
|
Jan F. Chadima |
28355b |
Authctxt *authctxt;
|
|
Jan F. Chadima |
28355b |
|
|
Jan F. Chadima |
28355b |
+ /* clean the PRNG status when exiting the program */
|
|
Jan F. Chadima |
28355b |
+ atexit(RAND_cleanup);
|
|
Jan F. Chadima |
28355b |
+
|
|
Jan F. Chadima |
28355b |
#ifdef HAVE_SECUREWARE
|
|
Jan F. Chadima |
28355b |
(void)set_auth_parameters(ac, av);
|
|
Jan F. Chadima |
28355b |
#endif
|
|
Jan F. Chadima |
28355b |
diff -up openssh-5.3p1/ssh-keygen.c.randclean openssh-5.3p1/ssh-keygen.c
|
|
Jan F. Chadima |
28355b |
--- openssh-5.3p1/ssh-keygen.c.randclean 2010-01-20 19:13:29.000000000 +0100
|
|
Jan F. Chadima |
28355b |
+++ openssh-5.3p1/ssh-keygen.c 2010-01-20 19:13:29.000000000 +0100
|
|
Jan F. Chadima |
28355b |
@@ -19,6 +19,7 @@
|
|
Jan F. Chadima |
28355b |
#include <sys/stat.h>
|
|
Jan F. Chadima |
28355b |
#include <sys/param.h>
|
|
Jan F. Chadima |
28355b |
|
|
Jan F. Chadima |
28355b |
+#include <openssl/rand.h>
|
|
Jan F. Chadima |
28355b |
#include <openssl/evp.h>
|
|
Jan F. Chadima |
28355b |
#include <openssl/pem.h>
|
|
Jan F. Chadima |
28355b |
#include <openssl/fips.h>
|
|
Jan F. Chadima |
28355b |
@@ -1120,6 +1121,9 @@ main(int argc, char **argv)
|
|
Jan F. Chadima |
28355b |
extern int optind;
|
|
Jan F. Chadima |
28355b |
extern char *optarg;
|
|
Jan F. Chadima |
28355b |
|
|
Jan F. Chadima |
28355b |
+ /* clean the PRNG status when exiting the program */
|
|
Jan F. Chadima |
28355b |
+ atexit(RAND_cleanup);
|
|
Jan F. Chadima |
28355b |
+
|
|
Jan F. Chadima |
28355b |
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
|
|
Jan F. Chadima |
28355b |
sanitise_stdfd();
|
|
Jan F. Chadima |
28355b |
|
|
Jan F. Chadima |
28355b |
diff -up openssh-5.3p1/ssh-keyscan.c.randclean openssh-5.3p1/ssh-keyscan.c
|
|
Jan F. Chadima |
28355b |
--- openssh-5.3p1/ssh-keyscan.c.randclean 2009-01-28 06:31:23.000000000 +0100
|
|
Jan F. Chadima |
28355b |
+++ openssh-5.3p1/ssh-keyscan.c 2010-01-20 19:21:16.000000000 +0100
|
|
Jan F. Chadima |
28355b |
@@ -18,6 +18,7 @@
|
|
Jan F. Chadima |
28355b |
#include <netinet/in.h>
|
|
Jan F. Chadima |
28355b |
#include <arpa/inet.h>
|
|
Jan F. Chadima |
28355b |
|
|
Jan F. Chadima |
28355b |
+#include <openssl/rand.h>
|
|
Jan F. Chadima |
28355b |
#include <openssl/bn.h>
|
|
Jan F. Chadima |
28355b |
|
|
Jan F. Chadima |
28355b |
#include <netdb.h>
|
|
Jan F. Chadima |
28355b |
@@ -730,6 +731,9 @@ main(int argc, char **argv)
|
|
Jan F. Chadima |
28355b |
extern int optind;
|
|
Jan F. Chadima |
28355b |
extern char *optarg;
|
|
Jan F. Chadima |
28355b |
|
|
Jan F. Chadima |
28355b |
+ /* clean the PRNG status when exiting the program */
|
|
Jan F. Chadima |
28355b |
+ atexit(RAND_cleanup);
|
|
Jan F. Chadima |
28355b |
+
|
|
Jan F. Chadima |
28355b |
__progname = ssh_get_progname(argv[0]);
|
|
Jan F. Chadima |
28355b |
init_rng();
|
|
Jan F. Chadima |
28355b |
seed_rng();
|
|
Jan F. Chadima |
28355b |
diff -up openssh-5.3p1/ssh-keysign.c.randclean openssh-5.3p1/ssh-keysign.c
|
|
Jan F. Chadima |
28355b |
--- openssh-5.3p1/ssh-keysign.c.randclean 2006-09-01 07:38:37.000000000 +0200
|
|
Jan F. Chadima |
28355b |
+++ openssh-5.3p1/ssh-keysign.c 2010-01-20 19:13:29.000000000 +0100
|
|
Jan F. Chadima |
28355b |
@@ -158,6 +158,9 @@ main(int argc, char **argv)
|
|
Jan F. Chadima |
28355b |
u_int slen, dlen;
|
|
Jan F. Chadima |
28355b |
u_int32_t rnd[256];
|
|
Jan F. Chadima |
28355b |
|
|
Jan F. Chadima |
28355b |
+ /* clean the PRNG status when exiting the program */
|
|
Jan F. Chadima |
28355b |
+ atexit(RAND_cleanup);
|
|
Jan F. Chadima |
28355b |
+
|
|
Jan F. Chadima |
28355b |
/* Ensure that stdin and stdout are connected */
|
|
Jan F. Chadima |
28355b |
if ((fd = open(_PATH_DEVNULL, O_RDWR)) < 2)
|
|
Jan F. Chadima |
28355b |
exit(1);
|