mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 11:32:48 -05:00
Consistently use a single notation to refer to SSH protocol versions, as
discussed. Use Barrett and Silverman's convention of "SSH-1" for SSH protocol version 1 and "SSH-2" for protocol 2 ("SSH1"/"SSH2" refer to ssh.com implementations in this scheme). <http://www.snailbook.com/terms.html> [originally from svn r5480]
This commit is contained in:
18
cmdgen.c
18
cmdgen.c
@ -523,7 +523,7 @@ int main(int argc, char **argv)
|
||||
|
||||
case SSH_KEYTYPE_SSH1:
|
||||
if (sshver == 2) {
|
||||
fprintf(stderr, "puttygen: conversion from SSH1 to SSH2 keys"
|
||||
fprintf(stderr, "puttygen: conversion from SSH-1 to SSH-2 keys"
|
||||
" not supported\n");
|
||||
return 1;
|
||||
}
|
||||
@ -534,7 +534,7 @@ int main(int argc, char **argv)
|
||||
case SSH_KEYTYPE_OPENSSH:
|
||||
case SSH_KEYTYPE_SSHCOM:
|
||||
if (sshver == 1) {
|
||||
fprintf(stderr, "puttygen: conversion from SSH2 to SSH1 keys"
|
||||
fprintf(stderr, "puttygen: conversion from SSH-2 to SSH-1 keys"
|
||||
" not supported\n");
|
||||
return 1;
|
||||
}
|
||||
@ -694,13 +694,13 @@ int main(int argc, char **argv)
|
||||
l = ssh1_read_bignum(blob + n, bloblen - n,
|
||||
&ssh1key->exponent);
|
||||
if (l < 0) {
|
||||
error = "SSH1 public key blob was too short";
|
||||
error = "SSH-1 public key blob was too short";
|
||||
} else {
|
||||
n += l;
|
||||
l = ssh1_read_bignum(blob + n, bloblen - n,
|
||||
&ssh1key->modulus);
|
||||
if (l < 0) {
|
||||
error = "SSH1 public key blob was too short";
|
||||
error = "SSH-1 public key blob was too short";
|
||||
} else
|
||||
n += l;
|
||||
}
|
||||
@ -829,14 +829,14 @@ int main(int argc, char **argv)
|
||||
assert(ssh1key);
|
||||
ret = saversakey(&outfilename, ssh1key, passphrase);
|
||||
if (!ret) {
|
||||
fprintf(stderr, "puttygen: unable to save SSH1 private key\n");
|
||||
fprintf(stderr, "puttygen: unable to save SSH-1 private key\n");
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
assert(ssh2key);
|
||||
ret = ssh2_save_userkey(&outfilename, ssh2key, passphrase);
|
||||
if (!ret) {
|
||||
fprintf(stderr, "puttygen: unable to save SSH2 private key\n");
|
||||
fprintf(stderr, "puttygen: unable to save SSH-2 private key\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@ -1215,10 +1215,10 @@ int main(int argc, char **argv)
|
||||
* Change the comment of the key; this _does_ require a
|
||||
* passphrase owing to the tamperproofing.
|
||||
*
|
||||
* NOTE: In SSH1, this only requires a passphrase because
|
||||
* NOTE: In SSH-1, this only requires a passphrase because
|
||||
* of inadequacies of the loading and saving mechanisms. In
|
||||
* _principle_, it should be perfectly possible to modify
|
||||
* the comment on an SSH1 key without requiring a
|
||||
* the comment on an SSH-1 key without requiring a
|
||||
* passphrase; the only reason I can't do it is because my
|
||||
* loading and saving mechanisms don't include a method of
|
||||
* loading all the key data without also trying to decrypt
|
||||
@ -1226,7 +1226,7 @@ int main(int argc, char **argv)
|
||||
*
|
||||
* I don't consider this to be a problem worth solving,
|
||||
* because (a) to fix it would probably end up bloating
|
||||
* PuTTY proper, and (b) SSH1 is on the way out anyway so
|
||||
* PuTTY proper, and (b) SSH-1 is on the way out anyway so
|
||||
* it shouldn't be highly significant. If it seriously
|
||||
* bothers anyone then perhaps I _might_ be persuadable.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user