summaryrefslogtreecommitdiff
path: root/ssh-agent.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 /ssh-agent.c
parent5ac5f1ca6b5270e1a755d75120f8217f5850c9b2 (diff)
Merged OpenBSD CVS changes that go away
Diffstat (limited to 'ssh-agent.c')
-rw-r--r--ssh-agent.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ssh-agent.c b/ssh-agent.c
index 4f7f57f03..96bd021eb 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -16,7 +16,7 @@ The authentication agent program.
16*/ 16*/
17 17
18#include "includes.h" 18#include "includes.h"
19RCSID("$OpenBSD: ssh-agent.c,v 1.16 1999/10/28 20:41:23 markus Exp $"); 19RCSID("$OpenBSD: ssh-agent.c,v 1.17 1999/11/02 19:42:36 markus Exp $");
20 20
21#include "ssh.h" 21#include "ssh.h"
22#include "rsa.h" 22#include "rsa.h"
@@ -136,7 +136,12 @@ process_authentication_challenge(SocketEntry *e)
136 case 1: /* As of protocol 1.1 */ 136 case 1: /* As of protocol 1.1 */
137 /* The response is MD5 of decrypted challenge plus session id. */ 137 /* The response is MD5 of decrypted challenge plus session id. */
138 len = BN_num_bytes(challenge); 138 len = BN_num_bytes(challenge);
139 assert(len <= 32 && len); 139
140 if (len <= 0 || len > 32) {
141 fatal("process_authentication_challenge: "
142 "bad challenge length %d", len);
143 }
144
140 memset(buf, 0, 32); 145 memset(buf, 0, 32);
141 BN_bn2bin(challenge, buf + 32 - len); 146 BN_bn2bin(challenge, buf + 32 - len);
142 MD5_Init(&md); 147 MD5_Init(&md);