|
Lines 2223-2231
usage(void)
Link Here
|
| 2223 |
" ssh-keygen -H [-f known_hosts_file]\n" |
2223 |
" ssh-keygen -H [-f known_hosts_file]\n" |
| 2224 |
" ssh-keygen -R hostname [-f known_hosts_file]\n" |
2224 |
" ssh-keygen -R hostname [-f known_hosts_file]\n" |
| 2225 |
" ssh-keygen -r hostname [-f input_keyfile] [-g]\n" |
2225 |
" ssh-keygen -r hostname [-f input_keyfile] [-g]\n" |
|
|
2226 |
#ifdef WITH_OPENSSL |
| 2226 |
" ssh-keygen -G output_file [-v] [-b bits] [-M memory] [-S start_point]\n" |
2227 |
" ssh-keygen -G output_file [-v] [-b bits] [-M memory] [-S start_point]\n" |
| 2227 |
" ssh-keygen -T output_file -f input_file [-v] [-a rounds] [-J num_lines]\n" |
2228 |
" ssh-keygen -T output_file -f input_file [-v] [-a rounds] [-J num_lines]\n" |
| 2228 |
" [-j start_line] [-K checkpt] [-W generator]\n" |
2229 |
" [-j start_line] [-K checkpt] [-W generator]\n" |
|
|
2230 |
#endif |
| 2229 |
" ssh-keygen -s ca_key -I certificate_identity [-h] [-n principals]\n" |
2231 |
" ssh-keygen -s ca_key -I certificate_identity [-h] [-n principals]\n" |
| 2230 |
" [-O option] [-V validity_interval] [-z serial_number] file ...\n" |
2232 |
" [-O option] [-V validity_interval] [-z serial_number] file ...\n" |
| 2231 |
" ssh-keygen -L [-f input_keyfile]\n" |
2233 |
" ssh-keygen -L [-f input_keyfile]\n" |
|
Lines 2243-2259
int
Link Here
|
| 2243 |
main(int argc, char **argv) |
2245 |
main(int argc, char **argv) |
| 2244 |
{ |
2246 |
{ |
| 2245 |
char dotsshdir[PATH_MAX], comment[1024], *passphrase1, *passphrase2; |
2247 |
char dotsshdir[PATH_MAX], comment[1024], *passphrase1, *passphrase2; |
| 2246 |
char *checkpoint = NULL; |
2248 |
char *rr_hostname = NULL, *ep, *fp, *ra; |
| 2247 |
char out_file[PATH_MAX], *rr_hostname = NULL, *ep, *fp, *ra; |
|
|
| 2248 |
struct sshkey *private, *public; |
2249 |
struct sshkey *private, *public; |
| 2249 |
struct passwd *pw; |
2250 |
struct passwd *pw; |
| 2250 |
struct stat st; |
2251 |
struct stat st; |
| 2251 |
int r, opt, type, fd; |
2252 |
int r, opt, type, fd; |
| 2252 |
u_int32_t memory = 0, generator_wanted = 0; |
2253 |
#ifdef WITH_OPENSSL |
|
|
2254 |
char out_file[PATH_MAX]; |
| 2255 |
u_int32_t generator_wanted = 0; |
| 2256 |
char *checkpoint = NULL; |
| 2257 |
u_int32_t memory = 0; |
| 2253 |
int do_gen_candidates = 0, do_screen_candidates = 0; |
2258 |
int do_gen_candidates = 0, do_screen_candidates = 0; |
| 2254 |
int gen_all_hostkeys = 0, gen_krl = 0, update_krl = 0, check_krl = 0; |
|
|
| 2255 |
unsigned long start_lineno = 0, lines_to_process = 0; |
| 2256 |
BIGNUM *start = NULL; |
2259 |
BIGNUM *start = NULL; |
|
|
2260 |
unsigned long start_lineno = 0, lines_to_process = 0; |
| 2261 |
#endif |
| 2262 |
int gen_all_hostkeys = 0, gen_krl = 0, update_krl = 0, check_krl = 0; |
| 2257 |
FILE *f; |
2263 |
FILE *f; |
| 2258 |
const char *errstr; |
2264 |
const char *errstr; |
| 2259 |
|
2265 |
|
|
Lines 2312-2323
main(int argc, char **argv)
Link Here
|
| 2312 |
case 'I': |
2318 |
case 'I': |
| 2313 |
cert_key_id = optarg; |
2319 |
cert_key_id = optarg; |
| 2314 |
break; |
2320 |
break; |
| 2315 |
case 'J': |
|
|
| 2316 |
lines_to_process = strtoul(optarg, NULL, 10); |
| 2317 |
break; |
| 2318 |
case 'j': |
| 2319 |
start_lineno = strtoul(optarg, NULL, 10); |
| 2320 |
break; |
| 2321 |
case 'R': |
2321 |
case 'R': |
| 2322 |
delete_host = 1; |
2322 |
delete_host = 1; |
| 2323 |
rr_hostname = optarg; |
2323 |
rr_hostname = optarg; |
|
Lines 2432-2437
main(int argc, char **argv)
Link Here
|
| 2432 |
case 'r': |
2432 |
case 'r': |
| 2433 |
rr_hostname = optarg; |
2433 |
rr_hostname = optarg; |
| 2434 |
break; |
2434 |
break; |
|
|
2435 |
#ifdef WITH_OPENSSL |
| 2436 |
case 'j': |
| 2437 |
start_lineno = strtoul(optarg, NULL, 10); |
| 2438 |
break; |
| 2439 |
case 'J': |
| 2440 |
lines_to_process = strtoul(optarg, NULL, 10); |
| 2441 |
break; |
| 2435 |
case 'W': |
2442 |
case 'W': |
| 2436 |
generator_wanted = (u_int32_t)strtonum(optarg, 1, |
2443 |
generator_wanted = (u_int32_t)strtonum(optarg, 1, |
| 2437 |
UINT_MAX, &errstr); |
2444 |
UINT_MAX, &errstr); |
|
Lines 2445-2451
main(int argc, char **argv)
Link Here
|
| 2445 |
fatal("Invalid number: %s (%s)", |
2452 |
fatal("Invalid number: %s (%s)", |
| 2446 |
optarg, errstr); |
2453 |
optarg, errstr); |
| 2447 |
break; |
2454 |
break; |
| 2448 |
#ifdef WITH_OPENSSL |
|
|
| 2449 |
case 'M': |
2455 |
case 'M': |
| 2450 |
memory = (u_int32_t)strtonum(optarg, 1, UINT_MAX, &errstr); |
2456 |
memory = (u_int32_t)strtonum(optarg, 1, UINT_MAX, &errstr); |
| 2451 |
if (errstr) |
2457 |
if (errstr) |
|
Lines 2589-2595
main(int argc, char **argv)
Link Here
|
| 2589 |
|
2595 |
|
| 2590 |
return (0); |
2596 |
return (0); |
| 2591 |
} |
2597 |
} |
| 2592 |
|
|
|
| 2593 |
if (do_screen_candidates) { |
2598 |
if (do_screen_candidates) { |
| 2594 |
FILE *in; |
2599 |
FILE *in; |
| 2595 |
FILE *out = fopen(out_file, "a"); |
2600 |
FILE *out = fopen(out_file, "a"); |
| 2596 |
- |
|
|