summaryrefslogtreecommitdiff
path: root/kexgex.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-03-13 13:19:42 +1100
committerDamien Miller <djm@mindrot.org>2002-03-13 13:19:42 +1100
commit3a5b0233306a3db3a5db5b9ddc187c55e9b251f4 (patch)
tree86478addb63771a9a1be0e13cfbdea9f964f963a /kexgex.c
parent3225fb454d0e79cf6f824dd00ff478749620277b (diff)
Stupid djm commits experimental code to head instead of branch
revert
Diffstat (limited to 'kexgex.c')
-rw-r--r--kexgex.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/kexgex.c b/kexgex.c
index 3c811f337..61896e6ed 100644
--- a/kexgex.c
+++ b/kexgex.c
@@ -38,12 +38,6 @@ RCSID("$OpenBSD: kexgex.c,v 1.20 2002/02/28 15:46:33 markus Exp $");
38#include "dh.h" 38#include "dh.h"
39#include "ssh2.h" 39#include "ssh2.h"
40#include "compat.h" 40#include "compat.h"
41#include "monitor.h"
42#include "monitor_wrap.h"
43
44/* Imports */
45extern int use_privsep;
46extern int mm_recvfd;
47 41
48static u_char * 42static u_char *
49kexgex_hash( 43kexgex_hash(
@@ -302,11 +296,7 @@ kexgex_server(Kex *kex)
302 fatal("DH_GEX_REQUEST, bad parameters: %d !< %d !< %d", 296 fatal("DH_GEX_REQUEST, bad parameters: %d !< %d !< %d",
303 min, nbits, max); 297 min, nbits, max);
304 298
305 /* Contact privileged parent */ 299 dh = choose_dh(min, nbits, max);
306 if (use_privsep)
307 dh = mm_choose_dh(mm_recvfd, min, nbits, max);
308 else
309 dh = choose_dh(min, nbits, max);
310 if (dh == NULL) 300 if (dh == NULL)
311 packet_disconnect("Protocol error: no matching DH grp found"); 301 packet_disconnect("Protocol error: no matching DH grp found");
312 302
@@ -389,11 +379,7 @@ kexgex_server(Kex *kex)
389 379
390 /* sign H */ 380 /* sign H */
391 /* XXX hashlen depends on KEX */ 381 /* XXX hashlen depends on KEX */
392 if (use_privsep) 382 key_sign(server_host_key, &signature, &slen, hash, 20);
393 mm_key_sign(mm_recvfd, kex->host_key_index(server_host_key),
394 &signature, &slen, hash, 20);
395 else
396 key_sign(server_host_key, &signature, &slen, hash, 20);
397 383
398 /* destroy_sensitive_data(); */ 384 /* destroy_sensitive_data(); */
399 385
@@ -404,7 +390,6 @@ kexgex_server(Kex *kex)
404 packet_put_bignum2(dh->pub_key); /* f */ 390 packet_put_bignum2(dh->pub_key); /* f */
405 packet_put_string(signature, slen); 391 packet_put_string(signature, slen);
406 packet_send(); 392 packet_send();
407
408 xfree(signature); 393 xfree(signature);
409 xfree(server_host_key_blob); 394 xfree(server_host_key_blob);
410 /* have keys, free DH */ 395 /* have keys, free DH */