summaryrefslogtreecommitdiff
path: root/auth-rsa.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-08 16:15:55 +1100
committerDamien Miller <djm@mindrot.org>1999-11-08 16:15:55 +1100
commitfd7c911f090749774cf1869420523c4811beeeb0 (patch)
treecd57567ddb3371c0c805a8bd8ace0c66df02fa53 /auth-rsa.c
parent5ac5f1ca6b5270e1a755d75120f8217f5850c9b2 (diff)
downloadopenssh-git-fd7c911f090749774cf1869420523c4811beeeb0.tar.gz
Merged OpenBSD CVS changes that go awayV_1_2_PRE8
Diffstat (limited to 'auth-rsa.c')
-rw-r--r--auth-rsa.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/auth-rsa.c b/auth-rsa.c
index 3be37ffc..dc1ad81a 100644
--- a/auth-rsa.c
+++ b/auth-rsa.c
@@ -17,7 +17,7 @@ validity of the host key.
#include "config.h"
#include "includes.h"
-RCSID("$Id: auth-rsa.c,v 1.3 1999/10/28 05:23:30 damien Exp $");
+RCSID("$Id: auth-rsa.c,v 1.4 1999/11/08 05:15:55 damien Exp $");
#include "rsa.h"
#include "packet.h"
@@ -98,7 +98,9 @@ auth_rsa_challenge_dialog(unsigned int bits, BIGNUM *e, BIGNUM *n)
/* The response is MD5 of decrypted challenge plus session id. */
len = BN_num_bytes(challenge);
- assert(len <= 32 && len);
+ if (len <= 0 || len > 32)
+ fatal("auth_rsa_challenge_dialog: bad challenge length %d", len);
+
memset(buf, 0, 32);
BN_bn2bin(challenge, buf + 32 - len);
MD5_Init(&md);