use /dev/random or /dev/urandom for seeding prng

improve periodical reseeding of random generator
This commit is contained in:
Jan F 2011-03-22 22:05:18 +01:00
parent 3657adf0ba
commit 39c7b05d62
2 changed files with 5 additions and 3 deletions

View File

@ -28,7 +28,7 @@ diff -up openssh-5.8p1/sshd.c.reseed openssh-5.8p1/sshd.c
}
static void
@@ -1277,6 +1285,12 @@ server_accept_loop(int *sock_in, int *so
@@ -1277,6 +1285,13 @@ server_accept_loop(int *sock_in, int *so
* the child process the connection. The
* parent continues listening.
*/
@ -36,6 +36,7 @@ diff -up openssh-5.8p1/sshd.c.reseed openssh-5.8p1/sshd.c
+ seed_rng();
+ logit("random reseeded");
+ need_reseed = 0;
+ signal(SIGALRM, key_regeneration_alarm);
+ alarm(options.key_regeneration_time);
+ }
platform_pre_fork();

View File

@ -71,7 +71,7 @@
# Do not forget to bump pam_ssh_agent_auth release if you rewind the main package release to 1
%define openssh_ver 5.8p1
%define openssh_rel 19
%define openssh_rel 20
%define pam_ssh_agent_ver 0.9.2
%define pam_ssh_agent_rel 30
@ -669,8 +669,9 @@ fi
%endif
%changelog
* Tue Mar 22 2011 Jan F. Chadima <jchadima@redhat.com> - 5.8p1-19 + 0.9.2-30
* Tue Mar 22 2011 Jan F. Chadima <jchadima@redhat.com> - 5.8p1-20 + 0.9.2-30
- use /dev/random or /dev/urandom for seeding prng
- improve periodical reseeding of random generator
* Thu Mar 17 2011 Jan F. Chadima <jchadima@redhat.com> - 5.8p1-18 + 0.9.2-30
- add periodical reseeding of random generator