diff options
author | Colin Watson <cjwatson@debian.org> | 2005-01-04 13:07:27 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2005-01-04 13:07:27 +0000 |
commit | fd0f611b70a83d80fe8793af785542ee5541b7cd (patch) | |
tree | bededd22bb7eeec52e20083237ab7e4113445a16 /sshconnect1.c | |
parent | c44fe9a5b9d3db96a7249b04d915f17e4a3a3b04 (diff) | |
parent | ebd2ce335af5861020c79fddb1ae35c03bf036cf (diff) |
Merge 3.9p1 to the trunk.
Diffstat (limited to 'sshconnect1.c')
-rw-r--r-- | sshconnect1.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sshconnect1.c b/sshconnect1.c index 2f89964ec..6e2e31c02 100644 --- a/sshconnect1.c +++ b/sshconnect1.c | |||
@@ -13,7 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include "includes.h" | 15 | #include "includes.h" |
16 | RCSID("$OpenBSD: sshconnect1.c,v 1.56 2003/08/28 12:54:34 markus Exp $"); | 16 | RCSID("$OpenBSD: sshconnect1.c,v 1.60 2004/07/28 09:40:29 markus Exp $"); |
17 | 17 | ||
18 | #include <openssl/bn.h> | 18 | #include <openssl/bn.h> |
19 | #include <openssl/md5.h> | 19 | #include <openssl/md5.h> |
@@ -24,7 +24,7 @@ RCSID("$OpenBSD: sshconnect1.c,v 1.56 2003/08/28 12:54:34 markus Exp $"); | |||
24 | #include "rsa.h" | 24 | #include "rsa.h" |
25 | #include "buffer.h" | 25 | #include "buffer.h" |
26 | #include "packet.h" | 26 | #include "packet.h" |
27 | #include "mpaux.h" | 27 | #include "kex.h" |
28 | #include "uidswap.h" | 28 | #include "uidswap.h" |
29 | #include "log.h" | 29 | #include "log.h" |
30 | #include "readconf.h" | 30 | #include "readconf.h" |
@@ -32,7 +32,7 @@ RCSID("$OpenBSD: sshconnect1.c,v 1.56 2003/08/28 12:54:34 markus Exp $"); | |||
32 | #include "authfd.h" | 32 | #include "authfd.h" |
33 | #include "sshconnect.h" | 33 | #include "sshconnect.h" |
34 | #include "authfile.h" | 34 | #include "authfile.h" |
35 | #include "readpass.h" | 35 | #include "misc.h" |
36 | #include "cipher.h" | 36 | #include "cipher.h" |
37 | #include "canohost.h" | 37 | #include "canohost.h" |
38 | #include "auth.h" | 38 | #include "auth.h" |
@@ -476,7 +476,7 @@ ssh_kex(char *host, struct sockaddr *hostaddr) | |||
476 | u_char cookie[8]; | 476 | u_char cookie[8]; |
477 | u_int supported_ciphers; | 477 | u_int supported_ciphers; |
478 | u_int server_flags, client_flags; | 478 | u_int server_flags, client_flags; |
479 | u_int32_t rand = 0; | 479 | u_int32_t rnd = 0; |
480 | 480 | ||
481 | debug("Waiting for server public key."); | 481 | debug("Waiting for server public key."); |
482 | 482 | ||
@@ -528,7 +528,7 @@ ssh_kex(char *host, struct sockaddr *hostaddr) | |||
528 | 528 | ||
529 | client_flags = SSH_PROTOFLAG_SCREEN_NUMBER | SSH_PROTOFLAG_HOST_IN_FWD_OPEN; | 529 | client_flags = SSH_PROTOFLAG_SCREEN_NUMBER | SSH_PROTOFLAG_HOST_IN_FWD_OPEN; |
530 | 530 | ||
531 | compute_session_id(session_id, cookie, host_key->rsa->n, server_key->rsa->n); | 531 | derive_ssh1_session_id(host_key->rsa->n, server_key->rsa->n, cookie, session_id); |
532 | 532 | ||
533 | /* Generate a session key. */ | 533 | /* Generate a session key. */ |
534 | arc4random_stir(); | 534 | arc4random_stir(); |
@@ -540,9 +540,9 @@ ssh_kex(char *host, struct sockaddr *hostaddr) | |||
540 | */ | 540 | */ |
541 | for (i = 0; i < 32; i++) { | 541 | for (i = 0; i < 32; i++) { |
542 | if (i % 4 == 0) | 542 | if (i % 4 == 0) |
543 | rand = arc4random(); | 543 | rnd = arc4random(); |
544 | session_key[i] = rand & 0xff; | 544 | session_key[i] = rnd & 0xff; |
545 | rand >>= 8; | 545 | rnd >>= 8; |
546 | } | 546 | } |
547 | 547 | ||
548 | /* | 548 | /* |
@@ -598,7 +598,7 @@ ssh_kex(char *host, struct sockaddr *hostaddr) | |||
598 | if (options.cipher == SSH_CIPHER_NOT_SET) { | 598 | if (options.cipher == SSH_CIPHER_NOT_SET) { |
599 | if (cipher_mask_ssh1(1) & supported_ciphers & (1 << ssh_cipher_default)) | 599 | if (cipher_mask_ssh1(1) & supported_ciphers & (1 << ssh_cipher_default)) |
600 | options.cipher = ssh_cipher_default; | 600 | options.cipher = ssh_cipher_default; |
601 | } else if (options.cipher == SSH_CIPHER_ILLEGAL || | 601 | } else if (options.cipher == SSH_CIPHER_INVALID || |
602 | !(cipher_mask_ssh1(1) & (1 << options.cipher))) { | 602 | !(cipher_mask_ssh1(1) & (1 << options.cipher))) { |
603 | logit("No valid SSH1 cipher, using %.100s instead.", | 603 | logit("No valid SSH1 cipher, using %.100s instead.", |
604 | cipher_name(ssh_cipher_default)); | 604 | cipher_name(ssh_cipher_default)); |