summaryrefslogtreecommitdiff
path: root/cipher.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2005-06-17 12:59:34 +1000
committerDamien Miller <djm@mindrot.org>2005-06-17 12:59:34 +1000
commiteccb9de72aa29da5a3fad87a4287b32438689c1f (patch)
tree9b8ef20a7e454b984e0ad67b54b2bdc5577aa2fa /cipher.c
parent677257fe07dd2b9a58817e1d42fc2c25bb618a4d (diff)
- djm@cvs.openbsd.org 2005/06/17 02:44:33
[auth-rsa.c auth.c auth1.c auth2-chall.c auth2-gss.c authfd.c authfile.c] [bufaux.c canohost.c channels.c cipher.c clientloop.c dns.c gss-serv.c] [kex.c kex.h key.c mac.c match.c misc.c packet.c packet.h scp.c] [servconf.c session.c session.h sftp-client.c sftp-server.c sftp.c] [ssh-keyscan.c ssh-rsa.c sshconnect.c sshconnect1.c sshconnect2.c sshd.c] make this -Wsign-compare clean; ok avsm@ markus@ NB. auth1.c changes not committed yet (conflicts with uncommitted sync) NB2. more work may be needed to make portable Wsign-compare clean
Diffstat (limited to 'cipher.c')
-rw-r--r--cipher.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cipher.c b/cipher.c
index 8096a5174..20d0a80c4 100644
--- a/cipher.c
+++ b/cipher.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: cipher.c,v 1.75 2005/06/09 13:43:49 dtucker Exp $"); 38RCSID("$OpenBSD: cipher.c,v 1.76 2005/06/17 02:44:32 djm Exp $");
39 39
40#include "xmalloc.h" 40#include "xmalloc.h"
41#include "log.h" 41#include "log.h"
@@ -235,7 +235,7 @@ cipher_init(CipherContext *cc, Cipher *cipher,
235 fatal("cipher_init: EVP_CipherInit failed for %s", 235 fatal("cipher_init: EVP_CipherInit failed for %s",
236 cipher->name); 236 cipher->name);
237 klen = EVP_CIPHER_CTX_key_length(&cc->evp); 237 klen = EVP_CIPHER_CTX_key_length(&cc->evp);
238 if (klen > 0 && keylen != klen) { 238 if (klen > 0 && keylen != (u_int)klen) {
239 debug2("cipher_init: set keylen (%d -> %d)", klen, keylen); 239 debug2("cipher_init: set keylen (%d -> %d)", klen, keylen);
240 if (EVP_CIPHER_CTX_set_key_length(&cc->evp, keylen) == 0) 240 if (EVP_CIPHER_CTX_set_key_length(&cc->evp, keylen) == 0)
241 fatal("cipher_init: set keylen failed (%d -> %d)", 241 fatal("cipher_init: set keylen failed (%d -> %d)",
@@ -326,9 +326,9 @@ cipher_get_keyiv(CipherContext *cc, u_char *iv, u_int len)
326 case SSH_CIPHER_DES: 326 case SSH_CIPHER_DES:
327 case SSH_CIPHER_BLOWFISH: 327 case SSH_CIPHER_BLOWFISH:
328 evplen = EVP_CIPHER_CTX_iv_length(&cc->evp); 328 evplen = EVP_CIPHER_CTX_iv_length(&cc->evp);
329 if (evplen == 0) 329 if (evplen <= 0)
330 return; 330 return;
331 if (evplen != len) 331 if ((u_int)evplen != len)
332 fatal("%s: wrong iv length %d != %d", __func__, 332 fatal("%s: wrong iv length %d != %d", __func__,
333 evplen, len); 333 evplen, len);
334#if OPENSSL_VERSION_NUMBER < 0x00907000L 334#if OPENSSL_VERSION_NUMBER < 0x00907000L