diff options
author | Colin Watson <cjwatson@debian.org> | 2016-12-20 00:22:53 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2016-12-23 19:08:35 +0000 |
commit | ee52365e713e546dbd878d73d9590dbaccd760ba (patch) | |
tree | 841d0d9ae73e83070bcc3b46218ebdd18142dda3 /ssh-keygen.c | |
parent | 8a4a5c22e363ad6a110ad9b787170297f5da8f04 (diff) | |
parent | 2103d3e5566c54e08a59be750579a249e46747d7 (diff) |
New upstream release (7.4p1).
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r-- | ssh-keygen.c | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c index 0bd5fc93a..2a7939bfc 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-keygen.c,v 1.290 2016/05/02 09:36:42 djm Exp $ */ | 1 | /* $OpenBSD: ssh-keygen.c,v 1.292 2016/09/12 03:29:16 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -2448,40 +2448,47 @@ main(int argc, char **argv) | |||
2448 | break; | 2448 | break; |
2449 | #ifdef WITH_OPENSSL | 2449 | #ifdef WITH_OPENSSL |
2450 | /* Moduli generation/screening */ | 2450 | /* Moduli generation/screening */ |
2451 | case 'W': | ||
2452 | generator_wanted = (u_int32_t)strtonum(optarg, 1, | ||
2453 | UINT_MAX, &errstr); | ||
2454 | if (errstr) | ||
2455 | fatal("Desired generator has bad value: %s (%s)", | ||
2456 | optarg, errstr); | ||
2457 | break; | ||
2458 | case 'M': | ||
2459 | memory = (u_int32_t)strtonum(optarg, 1, UINT_MAX, &errstr); | ||
2460 | if (errstr) | ||
2461 | fatal("Memory limit is %s: %s", errstr, optarg); | ||
2462 | break; | ||
2463 | case 'G': | 2451 | case 'G': |
2464 | do_gen_candidates = 1; | 2452 | do_gen_candidates = 1; |
2465 | if (strlcpy(out_file, optarg, sizeof(out_file)) >= | 2453 | if (strlcpy(out_file, optarg, sizeof(out_file)) >= |
2466 | sizeof(out_file)) | 2454 | sizeof(out_file)) |
2467 | fatal("Output filename too long"); | 2455 | fatal("Output filename too long"); |
2468 | break; | 2456 | break; |
2469 | case 'T': | 2457 | case 'J': |
2470 | do_screen_candidates = 1; | 2458 | lines_to_process = strtoul(optarg, NULL, 10); |
2471 | if (strlcpy(out_file, optarg, sizeof(out_file)) >= | 2459 | break; |
2472 | sizeof(out_file)) | 2460 | case 'j': |
2473 | fatal("Output filename too long"); | 2461 | start_lineno = strtoul(optarg, NULL, 10); |
2474 | break; | 2462 | break; |
2475 | case 'K': | 2463 | case 'K': |
2476 | if (strlen(optarg) >= PATH_MAX) | 2464 | if (strlen(optarg) >= PATH_MAX) |
2477 | fatal("Checkpoint filename too long"); | 2465 | fatal("Checkpoint filename too long"); |
2478 | checkpoint = xstrdup(optarg); | 2466 | checkpoint = xstrdup(optarg); |
2479 | break; | 2467 | break; |
2468 | case 'M': | ||
2469 | memory = (u_int32_t)strtonum(optarg, 1, UINT_MAX, | ||
2470 | &errstr); | ||
2471 | if (errstr) | ||
2472 | fatal("Memory limit is %s: %s", errstr, optarg); | ||
2473 | break; | ||
2480 | case 'S': | 2474 | case 'S': |
2481 | /* XXX - also compare length against bits */ | 2475 | /* XXX - also compare length against bits */ |
2482 | if (BN_hex2bn(&start, optarg) == 0) | 2476 | if (BN_hex2bn(&start, optarg) == 0) |
2483 | fatal("Invalid start point."); | 2477 | fatal("Invalid start point."); |
2484 | break; | 2478 | break; |
2479 | case 'T': | ||
2480 | do_screen_candidates = 1; | ||
2481 | if (strlcpy(out_file, optarg, sizeof(out_file)) >= | ||
2482 | sizeof(out_file)) | ||
2483 | fatal("Output filename too long"); | ||
2484 | break; | ||
2485 | case 'W': | ||
2486 | generator_wanted = (u_int32_t)strtonum(optarg, 1, | ||
2487 | UINT_MAX, &errstr); | ||
2488 | if (errstr != NULL) | ||
2489 | fatal("Desired generator invalid: %s (%s)", | ||
2490 | optarg, errstr); | ||
2491 | break; | ||
2485 | #endif /* WITH_OPENSSL */ | 2492 | #endif /* WITH_OPENSSL */ |
2486 | case '?': | 2493 | case '?': |
2487 | default: | 2494 | default: |