diff options
author | Damien Miller <djm@mindrot.org> | 1999-11-25 00:26:21 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-11-25 00:26:21 +1100 |
commit | 95def09838fc61b37b6ea7cd5c234a465b4b129b (patch) | |
tree | 042744f76f40a326b873cb1c3690a6d7d966bc3e /fingerprint.c | |
parent | 4d2f15f895f4c795afc008aeff3fd2ceffbc44f4 (diff) |
- Merged very large OpenBSD source code reformat
- OpenBSD CVS updates
- [channels.c cipher.c compat.c log-client.c scp.c serverloop.c]
[ssh.h sshd.8 sshd.c]
syslog changes:
* Unified Logmessage for all auth-types, for success and for failed
* Standard connections get only ONE line in the LOG when level==LOG:
Auth-attempts are logged only, if authentication is:
a) successfull or
b) with passwd or
c) we had more than AUTH_FAIL_LOG failues
* many log() became verbose()
* old behaviour with level=VERBOSE
- [readconf.c readconf.h ssh.1 ssh.h sshconnect.c sshd.c]
tranfer s/key challenge/response data in SSH_SMSG_AUTH_TIS_CHALLENGE
messages. allows use of s/key in windows (ttssh, securecrt) and
ssh-1.2.27 clients without 'ssh -v', ok: niels@
- [sshd.8]
-V, for fallback to openssh in SSH2 compatibility mode
- [sshd.c]
fix sigchld race; cjc5@po.cwru.edu
Diffstat (limited to 'fingerprint.c')
-rw-r--r-- | fingerprint.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/fingerprint.c b/fingerprint.c index 9a9b6358..54fc7e9b 100644 --- a/fingerprint.c +++ b/fingerprint.c @@ -1,5 +1,5 @@ #include "includes.h" -RCSID("$Id: fingerprint.c,v 1.1 1999/11/17 06:29:08 damien Exp $"); +RCSID("$Id: fingerprint.c,v 1.3 1999/11/24 00:26:01 deraadt Exp $"); #include "ssh.h" #include "xmalloc.h" @@ -13,17 +13,18 @@ RCSID("$Id: fingerprint.c,v 1.1 1999/11/17 06:29:08 damien Exp $"); #define FPRINT "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x" -/* Generate key fingerprint in ascii format. - Based on ideas and code from Bjoern Groenvall <bg@sics.se> */ - +/* + * Generate key fingerprint in ascii format. + * Based on ideas and code from Bjoern Groenvall <bg@sics.se> + */ char * fingerprint(BIGNUM *e, BIGNUM *n) { - static char retval[80]; - MD5_CTX md; - unsigned char d[16]; - char *buf; - int nlen, elen; + static char retval[80]; + MD5_CTX md; + unsigned char d[16]; + char *buf; + int nlen, elen; nlen = BN_num_bytes(n); elen = BN_num_bytes(e); @@ -37,8 +38,8 @@ fingerprint(BIGNUM *e, BIGNUM *n) MD5_Update(&md, buf, nlen + elen); MD5_Final(d, &md); snprintf(retval, sizeof(retval), FPRINT, - d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], - d[8], d[9], d[10], d[11], d[12], d[13], d[14], d[15]); + d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], + d[8], d[9], d[10], d[11], d[12], d[13], d[14], d[15]); memset(buf, 0, nlen + elen); xfree(buf); return retval; |