summaryrefslogtreecommitdiff
path: root/package/dsniff/patches/patch-sshcrypto_c
blob: 981aadb53425a10ee5e7b22d71b258a37bf50d45 (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
$Id$
--- dsniff-2.4.orig/sshcrypto.c	2001-03-15 09:33:04.000000000 +0100
+++ dsniff-2.4/sshcrypto.c	2009-05-09 23:13:59.000000000 +0200
@@ -14,6 +14,10 @@
 
 #include <sys/types.h>
 #include <openssl/ssl.h>
+#ifndef OPENSSL_NO_BF
+#include <openssl/blowfish.h>
+#endif
+#include <openssl/des.h>
 
 #include <err.h>
 #include <stdio.h>
@@ -21,10 +25,12 @@
 
 #include "sshcrypto.h"
 
+#ifndef OPENSSL_NO_BF
 struct blowfish_state {
 	struct bf_key_st	key;
 	u_char			iv[8];
 };
+#endif
 
 struct des3_state {
 	des_key_schedule	k1, k2, k3;
@@ -106,6 +112,7 @@ swap_bytes(const u_char *src, u_char *ds
 	}
 }
 
+#ifndef OPENSSL_NO_BF
 void *
 blowfish_init(u_char *sesskey, int len)
 {
@@ -143,6 +150,7 @@ blowfish_decrypt(u_char *src, u_char *ds
 		       BF_DECRYPT);
 	swap_bytes(dst, dst, len);
 }
+#endif
 
 /* XXX - SSH1's weirdo 3DES... */
 void *