=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/Attic/sshconnect1.c,v retrieving revision 1.56.2.1 retrieving revision 1.57 diff -u -r1.56.2.1 -r1.57 --- src/usr.bin/ssh/Attic/sshconnect1.c 2004/08/19 22:37:32 1.56.2.1 +++ src/usr.bin/ssh/Attic/sshconnect1.c 2004/05/08 00:21:31 1.57 @@ -13,7 +13,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect1.c,v 1.56.2.1 2004/08/19 22:37:32 brad Exp $"); +RCSID("$OpenBSD: sshconnect1.c,v 1.57 2004/05/08 00:21:31 djm Exp $"); #include #include @@ -24,7 +24,7 @@ #include "rsa.h" #include "buffer.h" #include "packet.h" -#include "kex.h" +#include "mpaux.h" #include "uidswap.h" #include "log.h" #include "readconf.h" @@ -476,7 +476,7 @@ u_char cookie[8]; u_int supported_ciphers; u_int server_flags, client_flags; - u_int32_t rnd = 0; + u_int32_t rand = 0; debug("Waiting for server public key."); @@ -528,7 +528,7 @@ client_flags = SSH_PROTOFLAG_SCREEN_NUMBER | SSH_PROTOFLAG_HOST_IN_FWD_OPEN; - derive_ssh1_session_id(host_key->rsa->n, server_key->rsa->n, cookie, session_id); + compute_session_id(session_id, cookie, host_key->rsa->n, server_key->rsa->n); /* Generate a session key. */ arc4random_stir(); @@ -540,9 +540,9 @@ */ for (i = 0; i < 32; i++) { if (i % 4 == 0) - rnd = arc4random(); - session_key[i] = rnd & 0xff; - rnd >>= 8; + rand = arc4random(); + session_key[i] = rand & 0xff; + rand >>= 8; } /* @@ -598,7 +598,7 @@ if (options.cipher == SSH_CIPHER_NOT_SET) { if (cipher_mask_ssh1(1) & supported_ciphers & (1 << ssh_cipher_default)) options.cipher = ssh_cipher_default; - } else if (options.cipher == SSH_CIPHER_INVALID || + } else if (options.cipher == SSH_CIPHER_ILLEGAL || !(cipher_mask_ssh1(1) & (1 << options.cipher))) { logit("No valid SSH1 cipher, using %.100s instead.", cipher_name(ssh_cipher_default));