summaryrefslogtreecommitdiff
path: root/kexdh.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-03-13 12:47:54 +1100
committerDamien Miller <djm@mindrot.org>2002-03-13 12:47:54 +1100
commit646e7cf3d7e7d4231c2d97d27c09fe5fe1d749e2 (patch)
treea693368c47d2d044514878fbb1516f87b487f78b /kexdh.c
parent29bdd2c9bca2737e7a246ed50fd827a6ccba0c61 (diff)
Import of Niels Provos' 20020312 ssh-complete.diff
PAM, Cygwin and OSF SIA will not work for sure
Diffstat (limited to 'kexdh.c')
-rw-r--r--kexdh.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/kexdh.c b/kexdh.c
index eaf497ca..6256722f 100644
--- a/kexdh.c
+++ b/kexdh.c
@@ -37,6 +37,12 @@ RCSID("$OpenBSD: kexdh.c,v 1.17 2002/02/28 15:46:33 markus Exp $");
#include "packet.h"
#include "dh.h"
#include "ssh2.h"
+#include "monitor.h"
+#include "monitor_wrap.h"
+
+/* Imports */
+extern int use_privsep;
+extern int mm_recvfd;
static u_char *
kex_dh_hash(
@@ -275,7 +281,12 @@ kexdh_server(Kex *kex)
/* sign H */
/* XXX hashlen depends on KEX */
- key_sign(server_host_key, &signature, &slen, hash, 20);
+ if (use_privsep)
+ mm_key_sign(mm_recvfd,
+ kex->host_key_index(server_host_key),
+ &signature, &slen, hash, 20);
+ else
+ key_sign(server_host_key, &signature, &slen, hash, 20);
/* destroy_sensitive_data(); */