diff options
author | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:32:03 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:32:03 +0000 |
commit | 04942aa41fa94ec6f2c3ce1d348f600f31bb7c78 (patch) | |
tree | af8e928bd79d3f2d0219bb5b2c78b573ec31d94c /auth-rsa.c | |
parent | 9ad7b718d42e43f3a285fcbc8f91193931fce324 (diff) | |
parent | 16704d57999d987fb8d9ba53379841a79f016d67 (diff) |
import openssh-4.2p1-gsskex-20050926-2.patch
Diffstat (limited to 'auth-rsa.c')
-rw-r--r-- | auth-rsa.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/auth-rsa.c b/auth-rsa.c index 4378008d3..d9c9652dc 100644 --- a/auth-rsa.c +++ b/auth-rsa.c | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "includes.h" | 16 | #include "includes.h" |
17 | RCSID("$OpenBSD: auth-rsa.c,v 1.62 2004/12/11 01:48:56 dtucker Exp $"); | 17 | RCSID("$OpenBSD: auth-rsa.c,v 1.63 2005/06/17 02:44:32 djm Exp $"); |
18 | 18 | ||
19 | #include <openssl/rsa.h> | 19 | #include <openssl/rsa.h> |
20 | #include <openssl/md5.h> | 20 | #include <openssl/md5.h> |
@@ -205,6 +205,7 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey) | |||
205 | while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) { | 205 | while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) { |
206 | char *cp; | 206 | char *cp; |
207 | char *key_options; | 207 | char *key_options; |
208 | int keybits; | ||
208 | 209 | ||
209 | /* Skip leading whitespace, empty and comment lines. */ | 210 | /* Skip leading whitespace, empty and comment lines. */ |
210 | for (cp = line; *cp == ' ' || *cp == '\t'; cp++) | 211 | for (cp = line; *cp == ' ' || *cp == '\t'; cp++) |
@@ -243,7 +244,8 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey) | |||
243 | continue; | 244 | continue; |
244 | 245 | ||
245 | /* check the real bits */ | 246 | /* check the real bits */ |
246 | if (bits != BN_num_bits(key->rsa->n)) | 247 | keybits = BN_num_bits(key->rsa->n); |
248 | if (keybits < 0 || bits != (u_int)keybits) | ||
247 | logit("Warning: %s, line %lu: keysize mismatch: " | 249 | logit("Warning: %s, line %lu: keysize mismatch: " |
248 | "actual %d vs. announced %d.", | 250 | "actual %d vs. announced %d.", |
249 | file, linenum, BN_num_bits(key->rsa->n), bits); | 251 | file, linenum, BN_num_bits(key->rsa->n), bits); |