diff options
Diffstat (limited to 'sshconnect1.c')
-rw-r--r-- | sshconnect1.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sshconnect1.c b/sshconnect1.c index 31ee9843c..4360d7283 100644 --- a/sshconnect1.c +++ b/sshconnect1.c | |||
@@ -9,7 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include "includes.h" | 11 | #include "includes.h" |
12 | RCSID("$OpenBSD: sshconnect1.c,v 1.2 2000/05/04 22:38:00 markus Exp $"); | 12 | RCSID("$OpenBSD: sshconnect1.c,v 1.3 2000/05/08 17:12:16 markus Exp $"); |
13 | 13 | ||
14 | #include <openssl/bn.h> | 14 | #include <openssl/bn.h> |
15 | #include <openssl/dsa.h> | 15 | #include <openssl/dsa.h> |
@@ -832,13 +832,17 @@ ssh_kex(char *host, struct sockaddr *hostaddr) | |||
832 | RSA_free(public_key); | 832 | RSA_free(public_key); |
833 | RSA_free(host_key); | 833 | RSA_free(host_key); |
834 | 834 | ||
835 | if (options.cipher == SSH_CIPHER_NOT_SET) { | 835 | if (options.cipher == SSH_CIPHER_ILLEGAL) { |
836 | log("No valid SSH1 cipher, using %.100s instead.", | ||
837 | cipher_name(SSH_FALLBACK_CIPHER)); | ||
838 | options.cipher = SSH_FALLBACK_CIPHER; | ||
839 | } else if (options.cipher == SSH_CIPHER_NOT_SET) { | ||
836 | if (cipher_mask1() & supported_ciphers & (1 << ssh_cipher_default)) | 840 | if (cipher_mask1() & supported_ciphers & (1 << ssh_cipher_default)) |
837 | options.cipher = ssh_cipher_default; | 841 | options.cipher = ssh_cipher_default; |
838 | else { | 842 | else { |
839 | debug("Cipher %s not supported, using %.100s instead.", | 843 | debug("Cipher %s not supported, using %.100s instead.", |
840 | cipher_name(ssh_cipher_default), | 844 | cipher_name(ssh_cipher_default), |
841 | cipher_name(SSH_FALLBACK_CIPHER)); | 845 | cipher_name(SSH_FALLBACK_CIPHER)); |
842 | options.cipher = SSH_FALLBACK_CIPHER; | 846 | options.cipher = SSH_FALLBACK_CIPHER; |
843 | } | 847 | } |
844 | } | 848 | } |