]> andersk Git - openssh.git/blobdiff - deattack.c
One way to massive patch. <sigh> It compiles and works under Linux..
[openssh.git] / deattack.c
index df1d2240993f718baa1918b3347d84027a53c08f..c3c3f08d2eb49089db4599bfd324cd8cc8d4eb89 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: deattack.c,v 1.10 2000/10/31 13:18:53 markus Exp $    */
+/*     $OpenBSD: deattack.c,v 1.11 2000/12/19 23:17:56 markus Exp $    */
 
 /*
  * Cryptographic attack detector for ssh - source code
@@ -51,16 +51,16 @@ 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) {
This page took 0.03629 seconds and 4 git commands to generate.