summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/auth-rsa.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2005-09-03 06:59:33 +0000
committerdes <des@FreeBSD.org>2005-09-03 06:59:33 +0000
commit755a16fa864cacbbd9fbefc822011b6741351d8d (patch)
treeb8088b859d6543143de670740f5c6f7bf4e0b23d /crypto/openssh/auth-rsa.c
parentc4dfc1ed3bdacd05d73791b2c8f8b580511a939f (diff)
downloadFreeBSD-src-755a16fa864cacbbd9fbefc822011b6741351d8d.zip
FreeBSD-src-755a16fa864cacbbd9fbefc822011b6741351d8d.tar.gz
Vendor import of OpenSSH 4.2p1.
Diffstat (limited to 'crypto/openssh/auth-rsa.c')
-rw-r--r--crypto/openssh/auth-rsa.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/openssh/auth-rsa.c b/crypto/openssh/auth-rsa.c
index 4378008..d9c9652 100644
--- a/crypto/openssh/auth-rsa.c
+++ b/crypto/openssh/auth-rsa.c
@@ -14,7 +14,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth-rsa.c,v 1.62 2004/12/11 01:48:56 dtucker Exp $");
+RCSID("$OpenBSD: auth-rsa.c,v 1.63 2005/06/17 02:44:32 djm Exp $");
#include <openssl/rsa.h>
#include <openssl/md5.h>
@@ -205,6 +205,7 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) {
char *cp;
char *key_options;
+ int keybits;
/* Skip leading whitespace, empty and comment lines. */
for (cp = line; *cp == ' ' || *cp == '\t'; cp++)
@@ -243,7 +244,8 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
continue;
/* check the real bits */
- if (bits != BN_num_bits(key->rsa->n))
+ keybits = BN_num_bits(key->rsa->n);
+ if (keybits < 0 || bits != (u_int)keybits)
logit("Warning: %s, line %lu: keysize mismatch: "
"actual %d vs. announced %d.",
file, linenum, BN_num_bits(key->rsa->n), bits);
OpenPOWER on IntegriCloud