diff options
author | green <green@FreeBSD.org> | 2001-05-04 03:57:05 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2001-05-04 03:57:05 +0000 |
commit | 8acd87ac472a182ef2d717212f2c0faba81143a5 (patch) | |
tree | 8070a266de2673f242df1ac3c19ad277bbd7e0f6 /crypto/openssh/deattack.c | |
parent | 5bcde1229c897d3a1ecba9ae48d888c773877ad9 (diff) | |
download | FreeBSD-src-8acd87ac472a182ef2d717212f2c0faba81143a5.zip FreeBSD-src-8acd87ac472a182ef2d717212f2c0faba81143a5.tar.gz |
Say "hi" to the latest in the OpenSSH series, version 2.9!
Happy birthday to: rwatson
Diffstat (limited to 'crypto/openssh/deattack.c')
-rw-r--r-- | crypto/openssh/deattack.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/crypto/openssh/deattack.c b/crypto/openssh/deattack.c index df1d224..36023e0 100644 --- a/crypto/openssh/deattack.c +++ b/crypto/openssh/deattack.c @@ -1,4 +1,4 @@ -/* $OpenBSD: deattack.c,v 1.10 2000/10/31 13:18:53 markus Exp $ */ +/* $OpenBSD: deattack.c,v 1.13 2001/03/01 02:45:10 deraadt Exp $ */ /* * Cryptographic attack detector for ssh - source code @@ -21,7 +21,7 @@ #include "includes.h" #include "deattack.h" -#include "ssh.h" +#include "log.h" #include "crc32.h" #include "getput.h" #include "xmalloc.h" @@ -44,23 +44,23 @@ /* Hash function (Input keys are cipher results) */ #define HASH(x) GET_32BIT(x) -#define CMP(a,b) (memcmp(a, b, SSH_BLOCKSIZE)) +#define CMP(a, b) (memcmp(a, b, SSH_BLOCKSIZE)) void crc_update(u_int32_t *a, u_int32_t b) { b ^= *a; - *a = ssh_crc32((unsigned char *) &b, sizeof(b)); + *a = ssh_crc32((u_char *) &b, sizeof(b)); } /* detect if a block is used in a particular pattern */ int -check_crc(unsigned char *S, unsigned char *buf, u_int32_t len, - unsigned char *IV) +check_crc(u_char *S, u_char *buf, u_int32_t len, + u_char *IV) { u_int32_t crc; - unsigned char *c; + u_char *c; crc = 0; if (IV && !CMP(S, IV)) { @@ -82,14 +82,14 @@ check_crc(unsigned char *S, unsigned char *buf, u_int32_t len, /* Detect a crc32 compensation attack on a packet */ int -detect_attack(unsigned char *buf, u_int32_t len, unsigned char *IV) +detect_attack(u_char *buf, u_int32_t len, u_char *IV) { static u_int16_t *h = (u_int16_t *) NULL; static u_int32_t n = HASH_MINSIZE / HASH_ENTRYSIZE; register u_int32_t i, j; u_int32_t l; - register unsigned char *c; - unsigned char *d; + register u_char *c; + u_char *d; if (len > (SSH_MAXBLOCKS * SSH_BLOCKSIZE) || len % SSH_BLOCKSIZE != 0) { |