diff options
author | 2005-06-17 02:44:32 +0000 | |
---|---|---|
committer | 2005-06-17 02:44:32 +0000 | |
commit | d7d0778033a35e342679fe2f0b8587e821c96398 (patch) | |
tree | 17fa6ea4ce2df3c413abd434947e69705d5a0e77 /usr.bin/ssh/cipher.c | |
parent | Note that only version 1 of SMC 2635W is ADM8211 based (v2 is RT2400). (diff) | |
download | wireguard-openbsd-d7d0778033a35e342679fe2f0b8587e821c96398.tar.xz wireguard-openbsd-d7d0778033a35e342679fe2f0b8587e821c96398.zip |
make this -Wsign-compare clean; ok avsm@ markus@
Diffstat (limited to 'usr.bin/ssh/cipher.c')
-rw-r--r-- | usr.bin/ssh/cipher.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/cipher.c b/usr.bin/ssh/cipher.c index 18e14774834..e8244752a8e 100644 --- a/usr.bin/ssh/cipher.c +++ b/usr.bin/ssh/cipher.c @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: cipher.c,v 1.75 2005/06/09 13:43:49 dtucker Exp $"); +RCSID("$OpenBSD: cipher.c,v 1.76 2005/06/17 02:44:32 djm Exp $"); #include "xmalloc.h" #include "log.h" @@ -221,7 +221,7 @@ cipher_init(CipherContext *cc, Cipher *cipher, fatal("cipher_init: EVP_CipherInit failed for %s", cipher->name); klen = EVP_CIPHER_CTX_key_length(&cc->evp); - if (klen > 0 && keylen != klen) { + if (klen > 0 && keylen != (u_int)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)", @@ -311,9 +311,9 @@ cipher_get_keyiv(CipherContext *cc, u_char *iv, u_int len) case SSH_CIPHER_DES: case SSH_CIPHER_BLOWFISH: evplen = EVP_CIPHER_CTX_iv_length(&cc->evp); - if (evplen == 0) + if (evplen <= 0) return; - if (evplen != len) + if ((u_int)evplen != len) fatal("%s: wrong iv length %d != %d", __func__, evplen, len); if (c->evptype == evp_aes_128_ctr) |