summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2016-09-12 13:30:50 +1000
committerDarren Tucker <dtucker@zip.com.au>2016-09-12 13:51:04 +1000
commitd8c3cfbb018825c6c86547165ddaf11924901c49 (patch)
treef0651592e7a5c446a0497256c2e420f9e4dff713 /ssh-keygen.c
parent7b63cf6dbbfa841c003de57d1061acbf2ff22364 (diff)
Move -M handling code to match upstream.
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 0149a090d..09d995ffb 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -2455,11 +2455,6 @@ main(int argc, char **argv)
2455 fatal("Desired generator has bad value: %s (%s)", 2455 fatal("Desired generator has bad value: %s (%s)",
2456 optarg, errstr); 2456 optarg, errstr);
2457 break; 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': 2458 case 'G':
2464 do_gen_candidates = 1; 2459 do_gen_candidates = 1;
2465 if (strlcpy(out_file, optarg, sizeof(out_file)) >= 2460 if (strlcpy(out_file, optarg, sizeof(out_file)) >=
@@ -2483,6 +2478,12 @@ main(int argc, char **argv)
2483 fatal("Checkpoint filename too long"); 2478 fatal("Checkpoint filename too long");
2484 checkpoint = xstrdup(optarg); 2479 checkpoint = xstrdup(optarg);
2485 break; 2480 break;
2481 case 'M':
2482 memory = (u_int32_t)strtonum(optarg, 1, UINT_MAX,
2483 &errstr);
2484 if (errstr)
2485 fatal("Memory limit is %s: %s", errstr, optarg);
2486 break;
2486 case 'S': 2487 case 'S':
2487 /* XXX - also compare length against bits */ 2488 /* XXX - also compare length against bits */
2488 if (BN_hex2bn(&start, optarg) == 0) 2489 if (BN_hex2bn(&start, optarg) == 0)