summaryrefslogtreecommitdiff
path: root/package/dsniff/patches/patch-ssh_c
blob: 2bf20f1f6d124876881816759e3f1d5e2e8afddc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
--- dsniff-2.4.orig/ssh.c	2001-03-15 09:33:04.000000000 +0100
+++ dsniff-2.4/ssh.c	2009-05-09 23:17:07.000000000 +0200
@@ -331,12 +331,14 @@ SSH_accept(SSH *ssh)
 		ssh->encrypt = des3_encrypt;
 		ssh->decrypt = des3_decrypt;
 	}
+#ifndef OPENSSL_NO_BF
 	else if (cipher == SSH_CIPHER_BLOWFISH) {
 		ssh->estate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
 		ssh->dstate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
 		ssh->encrypt = blowfish_encrypt;
 		ssh->decrypt = blowfish_decrypt;
 	}
+#endif
 	
 	/* Send verification. */
 	msg[0] = SSH_SMSG_SUCCESS;
@@ -461,18 +463,20 @@ SSH_connect(SSH *ssh)
 		return (-1);
 	}
 	/* Set cipher. */
-	if (cipher == SSH_CIPHER_BLOWFISH) {
-		ssh->estate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
-		ssh->dstate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
-		ssh->encrypt = blowfish_encrypt;
-		ssh->decrypt = blowfish_decrypt;
-	}
-	else if (cipher == SSH_CIPHER_3DES) {
+	if (cipher == SSH_CIPHER_3DES) {
 		ssh->estate = des3_init(ssh->sesskey, sizeof(ssh->sesskey));
 		ssh->dstate = des3_init(ssh->sesskey, sizeof(ssh->sesskey));
 		ssh->encrypt = des3_encrypt;
 		ssh->decrypt = des3_decrypt;
 	}
+#ifndef OPENSSL_NO_BF
+	else if (cipher == SSH_CIPHER_BLOWFISH) {
+		ssh->estate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
+		ssh->dstate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
+		ssh->encrypt = blowfish_encrypt;
+		ssh->decrypt = blowfish_decrypt;
+	}
+#endif
 	/* Get server response. */
 	if ((i = SSH_recv(ssh, pkt, sizeof(pkt))) <= 0) {
 		warn("SSH_recv");