diff options
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r-- | ssh-keygen.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c index 4273c1132..3478e3723 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -761,6 +761,8 @@ main(int ac, char **av) | |||
761 | __progname = get_progname(av[0]); | 761 | __progname = get_progname(av[0]); |
762 | 762 | ||
763 | SSLeay_add_all_algorithms(); | 763 | SSLeay_add_all_algorithms(); |
764 | init_rng(); | ||
765 | seed_rng(); | ||
764 | 766 | ||
765 | /* we need this for the home * directory. */ | 767 | /* we need this for the home * directory. */ |
766 | pw = getpwuid(getuid()); | 768 | pw = getpwuid(getuid()); |
@@ -855,10 +857,12 @@ main(int ac, char **av) | |||
855 | do_fingerprint(pw); | 857 | do_fingerprint(pw); |
856 | if (change_passphrase) | 858 | if (change_passphrase) |
857 | do_change_passphrase(pw); | 859 | do_change_passphrase(pw); |
858 | if (convert_to_ssh2) | ||
859 | do_convert_to_ssh2(pw); | ||
860 | if (change_comment) | 860 | if (change_comment) |
861 | do_change_comment(pw); | 861 | do_change_comment(pw); |
862 | if (convert_to_ssh2) | ||
863 | do_convert_to_ssh2(pw); | ||
864 | if (convert_from_ssh2) | ||
865 | do_convert_from_ssh2(pw); | ||
862 | if (print_public) | 866 | if (print_public) |
863 | do_print_public(pw); | 867 | do_print_public(pw); |
864 | if (reader_id != NULL) { | 868 | if (reader_id != NULL) { |
@@ -872,13 +876,8 @@ main(int ac, char **av) | |||
872 | #endif /* SMARTCARD */ | 876 | #endif /* SMARTCARD */ |
873 | } | 877 | } |
874 | 878 | ||
875 | init_rng(); | ||
876 | seed_rng(); | ||
877 | arc4random_stir(); | 879 | arc4random_stir(); |
878 | 880 | ||
879 | if (convert_from_ssh2) | ||
880 | do_convert_from_ssh2(pw); | ||
881 | |||
882 | if (key_type_name == NULL) { | 881 | if (key_type_name == NULL) { |
883 | printf("You must specify a key type (-t).\n"); | 882 | printf("You must specify a key type (-t).\n"); |
884 | usage(); | 883 | usage(); |