summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2020-05-08 05:13:15 +0000
committerDamien Miller <djm@cvs.openbsd.org>2020-05-08 05:13:15 +0000
commitf3087c83d72544f09ca149160d476baacec50258 (patch)
tree08c4f7ea948fdbc9ad021b81e9b3faa689a67ee0 /usr.bin/ssh
parent2a4ae678e2bd673f9bd39bd16839ecb99651edac (diff)
fix compilation with DEBUG_KEXDH; bz#3160 ok dtucker@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/kexdh.c3
-rw-r--r--usr.bin/ssh/sshd.c11
2 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/ssh/kexdh.c b/usr.bin/ssh/kexdh.c
index 799f0e80081..d613f76f3e4 100644
--- a/usr.bin/ssh/kexdh.c
+++ b/usr.bin/ssh/kexdh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexdh.c,v 1.32 2019/01/21 10:40:11 djm Exp $ */
+/* $OpenBSD: kexdh.c,v 1.33 2020/05/08 05:13:14 djm Exp $ */
/*
* Copyright (c) 2019 Markus Friedl. All rights reserved.
*
@@ -35,6 +35,7 @@
#include "digest.h"
#include "ssherr.h"
#include "dh.h"
+#include "log.h"
int
kex_dh_keygen(struct kex *kex)
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index 27cf8a24727..b0c6dc6e6f7 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.552 2020/03/13 04:01:57 djm Exp $ */
+/* $OpenBSD: sshd.c,v 1.553 2020/05/08 05:13:14 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2191,10 +2191,11 @@ do_ssh2_kex(struct ssh *ssh)
#ifdef DEBUG_KEXDH
/* send 1st encrypted/maced/compressed message */
- packet_start(SSH2_MSG_IGNORE);
- packet_put_cstring("markus");
- packet_send();
- packet_write_wait();
+ if ((r = sshpkt_start(ssh, SSH2_MSG_IGNORE)) != 0 ||
+ (r = sshpkt_put_cstring(ssh, "markus")) != 0 ||
+ (r = sshpkt_send(ssh)) != 0 ||
+ (r = ssh_packet_write_wait(ssh)) != 0)
+ fatal("%s: send test: %s", __func__, ssh_err(r));
#endif
debug("KEX done");
}