summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/sshd.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2000-04-12 07:03:07 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2000-04-12 07:03:07 +0000
commit3f6547314a456d02e3306664e55213db57f93a14 (patch)
treeb34510294f7588b64651fe5b068096dcbfff738d /usr.bin/ssh/sshd.c
parent4cba919149b8a5f18774f2399edd94a9062ca307 (diff)
check for reasonable public DH values
Diffstat (limited to 'usr.bin/ssh/sshd.c')
-rw-r--r--usr.bin/ssh/sshd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index 7d8963ffa22..088da20c550 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -14,7 +14,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.100 2000/04/12 06:37:02 markus Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.101 2000/04/12 07:03:06 markus Exp $");
#include "xmalloc.h"
#include "rsa.h"
@@ -1166,7 +1166,7 @@ do_ssh2_kex()
#endif
/* generate DH key */
- dh = new_dh_group1(); /* XXX depends on 'kex' */
+ dh = dh_new_group1(); /* XXX depends on 'kex' */
#ifdef DEBUG_KEXDH
fprintf(stderr, "\np= ");
@@ -1177,6 +1177,8 @@ do_ssh2_kex()
bignum_print(dh->pub_key);
fprintf(stderr, "\n");
#endif
+ if (!dh_pub_is_valid(dh, dh_client_pub))
+ packet_disconnect("bad client public DH value");
klen = DH_size(dh);
kbuf = xmalloc(klen);