diff options
Diffstat (limited to 'sshconnect1.c')
-rw-r--r-- | sshconnect1.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sshconnect1.c b/sshconnect1.c index 2bb4d5387..ce560791c 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.6 2000/09/07 20:27:54 deraadt Exp $"); | 16 | RCSID("$OpenBSD: sshconnect1.c,v 1.8 2000/10/12 09:59:19 markus Exp $"); |
17 | 17 | ||
18 | #include <openssl/bn.h> | 18 | #include <openssl/bn.h> |
19 | #include <openssl/dsa.h> | 19 | #include <openssl/dsa.h> |
@@ -25,7 +25,6 @@ RCSID("$OpenBSD: sshconnect1.c,v 1.6 2000/09/07 20:27:54 deraadt Exp $"); | |||
25 | #include "ssh.h" | 25 | #include "ssh.h" |
26 | #include "buffer.h" | 26 | #include "buffer.h" |
27 | #include "packet.h" | 27 | #include "packet.h" |
28 | #include "cipher.h" | ||
29 | #include "mpaux.h" | 28 | #include "mpaux.h" |
30 | #include "uidswap.h" | 29 | #include "uidswap.h" |
31 | #include "readconf.h" | 30 | #include "readconf.h" |
@@ -836,17 +835,11 @@ ssh_kex(char *host, struct sockaddr *hostaddr) | |||
836 | 835 | ||
837 | if (options.cipher == SSH_CIPHER_ILLEGAL) { | 836 | if (options.cipher == SSH_CIPHER_ILLEGAL) { |
838 | log("No valid SSH1 cipher, using %.100s instead.", | 837 | log("No valid SSH1 cipher, using %.100s instead.", |
839 | cipher_name(SSH_FALLBACK_CIPHER)); | 838 | cipher_name(ssh_cipher_default)); |
840 | options.cipher = SSH_FALLBACK_CIPHER; | 839 | options.cipher = ssh_cipher_default; |
841 | } else if (options.cipher == SSH_CIPHER_NOT_SET) { | 840 | } else if (options.cipher == SSH_CIPHER_NOT_SET) { |
842 | if (cipher_mask1() & supported_ciphers & (1 << ssh_cipher_default)) | 841 | if (cipher_mask_ssh1(1) & supported_ciphers & (1 << ssh_cipher_default)) |
843 | options.cipher = ssh_cipher_default; | 842 | options.cipher = ssh_cipher_default; |
844 | else { | ||
845 | debug("Cipher %s not supported, using %.100s instead.", | ||
846 | cipher_name(ssh_cipher_default), | ||
847 | cipher_name(SSH_FALLBACK_CIPHER)); | ||
848 | options.cipher = SSH_FALLBACK_CIPHER; | ||
849 | } | ||
850 | } | 843 | } |
851 | /* Check that the selected cipher is supported. */ | 844 | /* Check that the selected cipher is supported. */ |
852 | if (!(supported_ciphers & (1 << options.cipher))) | 845 | if (!(supported_ciphers & (1 << options.cipher))) |