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/auth1.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/auth1.c')
-rw-r--r-- | usr.bin/ssh/auth1.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ssh/auth1.c b/usr.bin/ssh/auth1.c index 0e1f067cedf..41433ef70d6 100644 --- a/usr.bin/ssh/auth1.c +++ b/usr.bin/ssh/auth1.c @@ -10,7 +10,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth1.c,v 1.60 2005/05/20 12:57:01 djm Exp $"); +RCSID("$OpenBSD: auth1.c,v 1.61 2005/06/17 02:44:32 djm Exp $"); #include "xmalloc.h" #include "rsa.h" @@ -136,7 +136,7 @@ auth1_process_rsa(Authctxt *authctxt, char *info, size_t infolen) static int auth1_process_rhosts_rsa(Authctxt *authctxt, char *info, size_t infolen) { - int authenticated = 0; + int keybits, authenticated = 0; u_int bits; char *client_user; Key *client_host_key; @@ -155,7 +155,8 @@ auth1_process_rhosts_rsa(Authctxt *authctxt, char *info, size_t infolen) packet_get_bignum(client_host_key->rsa->e); packet_get_bignum(client_host_key->rsa->n); - if (bits != BN_num_bits(client_host_key->rsa->n)) { + keybits = BN_num_bits(client_host_key->rsa->n); + if (keybits < 0 || bits != (u_int)keybits) { verbose("Warning: keysize mismatch for client_host_key: " "actual %d, announced %d", BN_num_bits(client_host_key->rsa->n), bits); |