summaryrefslogtreecommitdiff
path: root/key.c
diff options
context:
space:
mode:
Diffstat (limited to 'key.c')
-rw-r--r--key.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/key.c b/key.c
index f2edf6d5d..5aea416b3 100644
--- a/key.c
+++ b/key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: key.c,v 1.81 2009/12/11 18:16:33 markus Exp $ */ 1/* $OpenBSD: key.c,v 1.82 2010/01/13 01:10:56 dtucker Exp $ */
2/* 2/*
3 * read_bignum(): 3 * read_bignum():
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -522,6 +522,12 @@ key_read(Key *ret, char **cpp)
522 return -1; 522 return -1;
523 if (!read_bignum(cpp, ret->rsa->n)) 523 if (!read_bignum(cpp, ret->rsa->n))
524 return -1; 524 return -1;
525 /* validate the claimed number of bits */
526 if ((u_int)BN_num_bits(ret->rsa->n) != bits) {
527 verbose("key_read: claimed key size %d does not match "
528 "actual %d", bits, BN_num_bits(ret->rsa->n));
529 return -1;
530 }
525 success = 1; 531 success = 1;
526 break; 532 break;
527 case KEY_UNSPEC: 533 case KEY_UNSPEC: