=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/cipher.c,v retrieving revision 1.73.2.1 retrieving revision 1.74 diff -u -r1.73.2.1 -r1.74 --- src/usr.bin/ssh/cipher.c 2005/09/04 18:40:01 1.73.2.1 +++ src/usr.bin/ssh/cipher.c 2005/05/23 23:32:46 1.74 @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: cipher.c,v 1.73.2.1 2005/09/04 18:40:01 brad Exp $"); +RCSID("$OpenBSD: cipher.c,v 1.74 2005/05/23 23:32:46 djm Exp $"); #include "xmalloc.h" #include "log.h" @@ -78,7 +78,7 @@ { "aes256-ctr", SSH_CIPHER_SSH2, 16, 32, 0, evp_aes_128_ctr }, { "acss@openssh.org", SSH_CIPHER_SSH2, 16, 5, 0, EVP_acss }, - { NULL, SSH_CIPHER_INVALID, 0, 0, 0, NULL } + { NULL, SSH_CIPHER_INVALID, 0, 0, NULL } }; /*--*/ @@ -221,7 +221,7 @@ fatal("cipher_init: EVP_CipherInit failed for %s", cipher->name); klen = EVP_CIPHER_CTX_key_length(&cc->evp); - if (klen > 0 && keylen != (u_int)klen) { + if (klen > 0 && keylen != klen) { debug2("cipher_init: set keylen (%d -> %d)", klen, keylen); if (EVP_CIPHER_CTX_set_key_length(&cc->evp, keylen) == 0) fatal("cipher_init: set keylen failed (%d -> %d)", @@ -231,7 +231,7 @@ fatal("cipher_init: EVP_CipherInit: set key failed for %s", cipher->name); - if (cipher->discard_len > 0) { + if (cipher->discard_len > 0) { junk = xmalloc(cipher->discard_len); discard = xmalloc(cipher->discard_len); if (EVP_Cipher(&cc->evp, discard, junk, @@ -311,9 +311,9 @@ case SSH_CIPHER_DES: case SSH_CIPHER_BLOWFISH: evplen = EVP_CIPHER_CTX_iv_length(&cc->evp); - if (evplen <= 0) + if (evplen == 0) return; - if ((u_int)evplen != len) + if (evplen != len) fatal("%s: wrong iv length %d != %d", __func__, evplen, len); if (c->evptype == evp_aes_128_ctr)