diff options
author | Damien Miller <djm@mindrot.org> | 2000-09-29 12:12:36 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-09-29 12:12:36 +1100 |
commit | cb5e44a440c1b310a9dc5b8b5abe32fe11ed479b (patch) | |
tree | e71546529e0058787f555ebf3c2fc03ad826bb89 /rsa.c | |
parent | 280e71bcb631d205fec33b1dd695263e2696a3f1 (diff) |
- (djm) Clean up. Strip some unnecessary differences with OpenBSD's code,
tidy necessary differences. Use Markus' new debugN() in entropy.c
Diffstat (limited to 'rsa.c')
-rw-r--r-- | rsa.c | 20 |
1 files changed, 1 insertions, 19 deletions
@@ -83,21 +83,6 @@ rsa_alive() | |||
83 | } | 83 | } |
84 | 84 | ||
85 | /* | 85 | /* |
86 | * Key generation progress meter callback | ||
87 | */ | ||
88 | void | ||
89 | keygen_progress(int p, int n, void *arg) | ||
90 | { | ||
91 | const char progress_chars[] = ".o+O?"; | ||
92 | |||
93 | if ((p < 0) || (p > (sizeof(progress_chars) - 2))) | ||
94 | p = sizeof(progress_chars) - 2; | ||
95 | |||
96 | putchar(progress_chars[p]); | ||
97 | fflush(stdout); | ||
98 | } | ||
99 | |||
100 | /* | ||
101 | * Generates RSA public and private keys. This initializes the data | 86 | * Generates RSA public and private keys. This initializes the data |
102 | * structures; they should be freed with rsa_clear_private_key and | 87 | * structures; they should be freed with rsa_clear_private_key and |
103 | * rsa_clear_public_key. | 88 | * rsa_clear_public_key. |
@@ -113,11 +98,8 @@ rsa_generate_key(RSA *prv, RSA *pub, unsigned int bits) | |||
113 | if (rsa_verbose) { | 98 | if (rsa_verbose) { |
114 | printf("Generating RSA keys: "); | 99 | printf("Generating RSA keys: "); |
115 | fflush(stdout); | 100 | fflush(stdout); |
116 | key = RSA_generate_key(bits, 35, keygen_progress, NULL); | ||
117 | printf("\n"); | ||
118 | } else { | ||
119 | key = RSA_generate_key(bits, 35, NULL, NULL); | ||
120 | } | 101 | } |
102 | key = RSA_generate_key(bits, 35, NULL, NULL); | ||
121 | if (key == NULL) | 103 | if (key == NULL) |
122 | fatal("rsa_generate_key: key generation failed."); | 104 | fatal("rsa_generate_key: key generation failed."); |
123 | 105 | ||