Move ssh-keygen -W handling code to match upstream

This commit is contained in:
Darren Tucker 2016-09-12 13:55:37 +10:00
parent af48d54136
commit 43cceff82c
1 changed files with 7 additions and 7 deletions

View File

@ -2448,13 +2448,6 @@ main(int argc, char **argv)
break; break;
#ifdef WITH_OPENSSL #ifdef WITH_OPENSSL
/* Moduli generation/screening */ /* Moduli generation/screening */
case 'W':
generator_wanted = (u_int32_t)strtonum(optarg, 1,
UINT_MAX, &errstr);
if (errstr)
fatal("Desired generator has bad value: %s (%s)",
optarg, errstr);
break;
case 'G': case 'G':
do_gen_candidates = 1; do_gen_candidates = 1;
if (strlcpy(out_file, optarg, sizeof(out_file)) >= if (strlcpy(out_file, optarg, sizeof(out_file)) >=
@ -2489,6 +2482,13 @@ main(int argc, char **argv)
sizeof(out_file)) sizeof(out_file))
fatal("Output filename too long"); fatal("Output filename too long");
break; break;
case 'W':
generator_wanted = (u_int32_t)strtonum(optarg, 1,
UINT_MAX, &errstr);
if (errstr)
fatal("Desired generator has bad value: %s (%s)",
optarg, errstr);
break;
#endif /* WITH_OPENSSL */ #endif /* WITH_OPENSSL */
case '?': case '?':
default: default: