diff options
author | Damien Miller <djm@mindrot.org> | 2013-10-26 10:05:46 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-10-26 10:05:46 +1100 |
commit | 26506ad29350c5681815745cc90b3952a84cf118 (patch) | |
tree | 797fb5763b2569bb1e15f86a5d3afe707ed88680 /ssh-keygen.c | |
parent | bd43e8872325e9bbb3319c89da593614709f317c (diff) |
- (djm) [ssh-keygen.c ssh-keysign.c sshconnect1.c sshd.c] Remove
unnecessary arc4random_stir() calls. The only ones left are to ensure
that the PRNG gets a different state after fork() for platforms that
have broken the API.
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r-- | ssh-keygen.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c index b664a5f1f..678dafe87 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -910,7 +910,6 @@ do_gen_all_hostkeys(struct passwd *pw) | |||
910 | } | 910 | } |
911 | printf("%s ", key_types[i].key_type_display); | 911 | printf("%s ", key_types[i].key_type_display); |
912 | fflush(stdout); | 912 | fflush(stdout); |
913 | arc4random_stir(); | ||
914 | type = key_type_from_name(key_types[i].key_type); | 913 | type = key_type_from_name(key_types[i].key_type); |
915 | strlcpy(identity_file, key_types[i].path, sizeof(identity_file)); | 914 | strlcpy(identity_file, key_types[i].path, sizeof(identity_file)); |
916 | bits = 0; | 915 | bits = 0; |
@@ -932,7 +931,6 @@ do_gen_all_hostkeys(struct passwd *pw) | |||
932 | continue; | 931 | continue; |
933 | } | 932 | } |
934 | key_free(private); | 933 | key_free(private); |
935 | arc4random_stir(); | ||
936 | strlcat(identity_file, ".pub", sizeof(identity_file)); | 934 | strlcat(identity_file, ".pub", sizeof(identity_file)); |
937 | fd = open(identity_file, O_WRONLY | O_CREAT | O_TRUNC, 0644); | 935 | fd = open(identity_file, O_WRONLY | O_CREAT | O_TRUNC, 0644); |
938 | if (fd == -1) { | 936 | if (fd == -1) { |
@@ -2543,8 +2541,6 @@ main(int argc, char **argv) | |||
2543 | return (0); | 2541 | return (0); |
2544 | } | 2542 | } |
2545 | 2543 | ||
2546 | arc4random_stir(); | ||
2547 | |||
2548 | if (key_type_name == NULL) | 2544 | if (key_type_name == NULL) |
2549 | key_type_name = "rsa"; | 2545 | key_type_name = "rsa"; |
2550 | 2546 | ||
@@ -2638,7 +2634,6 @@ passphrase_again: | |||
2638 | 2634 | ||
2639 | /* Clear the private key and the random number generator. */ | 2635 | /* Clear the private key and the random number generator. */ |
2640 | key_free(private); | 2636 | key_free(private); |
2641 | arc4random_stir(); | ||
2642 | 2637 | ||
2643 | if (!quiet) | 2638 | if (!quiet) |
2644 | printf("Your identification has been saved in %s.\n", identity_file); | 2639 | printf("Your identification has been saved in %s.\n", identity_file); |