1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -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:
Jacob Nevins
2005-03-10 16:36:05 +00:00
parent dfccca7974
commit 5aa719d16e
30 changed files with 269 additions and 269 deletions

View File

@ -1,7 +1,7 @@
/*
* Generic SSH public-key handling operations. In particular,
* reading of SSH public-key files, and also the generic `sign'
* operation for ssh2 (which checks the type of the key and
* operation for SSH-2 (which checks the type of the key and
* dispatches to the appropriate key-type specific function).
*/
@ -78,7 +78,7 @@ static int loadrsakey_main(FILE * fp, struct RSAKey *key, int pub_only,
|| buf[i + 3] != 0) goto end; /* reserved field nonzero, panic! */
i += 4;
/* Now the serious stuff. An ordinary SSH 1 public key. */
/* Now the serious stuff. An ordinary SSH-1 public key. */
i += makekey(buf + i, len, key, NULL, 1);
if (i < 0)
goto end; /* overran */
@ -307,7 +307,7 @@ int saversakey(const Filename *filename, struct RSAKey *key, char *passphrase)
p += 4;
/*
* An ordinary SSH 1 public key consists of: a uint32
* An ordinary SSH-1 public key consists of: a uint32
* containing the bit count, then two bignums containing the
* modulus and exponent respectively.
*/
@ -384,11 +384,11 @@ int saversakey(const Filename *filename, struct RSAKey *key, char *passphrase)
}
/* ----------------------------------------------------------------------
* SSH2 private key load/store functions.
* SSH-2 private key load/store functions.
*/
/*
* PuTTY's own format for SSH2 keys is as follows:
* PuTTY's own format for SSH-2 keys is as follows:
*
* The file is text. Lines are terminated by CRLF, although CR-only
* and LF-only are tolerated on input.
@ -404,7 +404,7 @@ int saversakey(const Filename *filename, struct RSAKey *key, char *passphrase)
*
* Next there is a line saying "Public-Lines: " plus a number N.
* The following N lines contain a base64 encoding of the public
* part of the key. This is encoded as the standard SSH2 public key
* part of the key. This is encoded as the standard SSH-2 public key
* blob (with no initial length): so for RSA, for example, it will
* read
*
@ -1213,10 +1213,10 @@ char *key_type_to_str(int type)
switch (type) {
case SSH_KEYTYPE_UNOPENABLE: return "unable to open file"; break;
case SSH_KEYTYPE_UNKNOWN: return "not a private key"; break;
case SSH_KEYTYPE_SSH1: return "SSH1 private key"; break;
case SSH_KEYTYPE_SSH2: return "PuTTY SSH2 private key"; break;
case SSH_KEYTYPE_OPENSSH: return "OpenSSH SSH2 private key"; break;
case SSH_KEYTYPE_SSHCOM: return "ssh.com SSH2 private key"; break;
case SSH_KEYTYPE_SSH1: return "SSH-1 private key"; break;
case SSH_KEYTYPE_SSH2: return "PuTTY SSH-2 private key"; break;
case SSH_KEYTYPE_OPENSSH: return "OpenSSH SSH-2 private key"; break;
case SSH_KEYTYPE_SSHCOM: return "ssh.com SSH-2 private key"; break;
default: return "INTERNAL ERROR"; break;
}
}