]> andersk Git - openssh.git/blobdiff - kexgex.c
- markus@cvs.openbsd.org 2002/06/08 05:07:56
[openssh.git] / kexgex.c
index 3c811f337be50385567fb2b0c946ac0c7756e9c8..2d4a58153151753d56e9cd24e025ad4897bd212a 100644 (file)
--- a/kexgex.c
+++ b/kexgex.c
@@ -24,7 +24,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: kexgex.c,v 1.20 2002/02/28 15:46:33 markus Exp $");
+RCSID("$OpenBSD: kexgex.c,v 1.22 2002/03/24 17:27:03 stevesk Exp $");
 
 #include <openssl/bn.h>
 
@@ -38,13 +38,8 @@ RCSID("$OpenBSD: kexgex.c,v 1.20 2002/02/28 15:46:33 markus Exp $");
 #include "dh.h"
 #include "ssh2.h"
 #include "compat.h"
-#include "monitor.h"
 #include "monitor_wrap.h"
 
-/* Imports */
-extern int use_privsep;
-extern int mm_recvfd;
-
 static u_char *
 kexgex_hash(
     char *client_version_string,
@@ -265,7 +260,7 @@ kexgex_server(Kex *kex)
 {
        BIGNUM *shared_secret = NULL, *dh_client_pub = NULL;
        Key *server_host_key;
-       DH *dh = dh;
+       DH *dh;
        u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL;
        u_int sbloblen, klen, kout, slen;
        int min = -1, max = -1, nbits = -1, type;
@@ -303,10 +298,7 @@ kexgex_server(Kex *kex)
                    min, nbits, max);
 
        /* Contact privileged parent */
-       if (use_privsep)
-               dh = mm_choose_dh(mm_recvfd, min, nbits, max);
-       else
-               dh = choose_dh(min, nbits, max);
+       dh = PRIVSEP(choose_dh(min, nbits, max));
        if (dh == NULL)
                packet_disconnect("Protocol error: no matching DH grp found");
 
@@ -389,11 +381,7 @@ kexgex_server(Kex *kex)
 
        /* sign H */
        /* XXX hashlen depends on KEX */
-       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);
+       PRIVSEP(key_sign(server_host_key, &signature, &slen, hash, 20));
 
        /* destroy_sensitive_data(); */
 
This page took 0.195079 seconds and 4 git commands to generate.