[openssh-commits] [openssh] 01/15: upstream: fix compilation with DEBUG_KEXDH; bz#3160 ok dtucker@

git+noreply at mindrot.org git+noreply at mindrot.org
Wed May 27 21:55:00 AEST 2020


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit ecb2c02d994b3e21994f31a70ff911667c262f1f
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Fri May 8 05:13:14 2020 +0000

    upstream: fix compilation with DEBUG_KEXDH; bz#3160 ok dtucker@
    
    OpenBSD-Commit-ID: 832e771948fb45f2270e8b8895aac36d176ba17a
---
 kexdh.c |  3 ++-
 sshd.c  | 11 ++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/kexdh.c b/kexdh.c
index 67133e33..6e0159f9 100644
--- a/kexdh.c
+++ b/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.
  *
@@ -42,6 +42,7 @@
 #include "digest.h"
 #include "ssherr.h"
 #include "dh.h"
+#include "log.h"
 
 int
 kex_dh_keygen(struct kex *kex)
diff --git a/sshd.c b/sshd.c
index 6f8f11a3..a345bae7 100644
--- a/sshd.c
+++ b/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 at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -2372,10 +2372,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");
 }

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list