1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Unix Pageant: revise --encrypted and -E CLI options.

I've decided that it was a mistake to use -E as the option for adding
keys encrypted, because it's better to use it as a fingerprint type
selector for the Pageant client side. That way it works the same as
command-line PuTTYgen, and also OpenSSH ssh-add (and ssh-keygen).

What spelling(s) to use instead for the option to add keys encrypted?
Obviously, the same ones I've just decided on for Windows Pageant;
there's no sensible reason to make them different.
This commit is contained in:
Simon Tatham 2021-04-03 10:30:27 +01:00
parent bd5d80b4f6
commit c1334f3b08

View File

@ -1353,7 +1353,14 @@ int main(int argc, char **argv)
life = LIFE_X11;
} else if (!strcmp(p, "-T")) {
life = LIFE_TTY;
} else if (!strcmp(p, "-E")) {
} else if (!strcmp(p, "--no-decrypt") ||
!strcmp(p, "-no-decrypt") ||
!strcmp(p, "--no_decrypt") ||
!strcmp(p, "-no_decrypt") ||
!strcmp(p, "--nodecrypt") ||
!strcmp(p, "-nodecrypt") ||
!strcmp(p, "--encrypted") ||
!strcmp(p, "-encrypted")) {
if (curr_keyact == KEYACT_AGENT_LOAD)
curr_keyact = KEYACT_AGENT_LOAD_ENCRYPTED;
else if (curr_keyact == KEYACT_CLIENT_ADD)
@ -1404,13 +1411,13 @@ int main(int argc, char **argv)
"after --symlink\n");
exit(1);
}
} else if (!strcmp(p, "--fptype")) {
} else if (!strcmp(p, "-E") || !strcmp(p, "--fptype")) {
const char *keyword;
if (--argc > 0) {
keyword = *++argv;
} else {
fprintf(stderr, "pageant: expected a type string "
"after --fptype\n");
"after %s\n", p);
exit(1);
}
if (!strcmp(keyword, "md5"))