patch file cleanup... ick.. kaloz you owe me some love
[openwrt/svn-archive/archive.git] / admin / osiris / patches / 004-no_openssl_ripe.patch
1 diff -urN osiris-4.2.1/src/libosiris/filter_ripemd.c osiris-4.2.1.new/src/libosiris/filter_ripemd.c
2 --- osiris-4.2.1/src/libosiris/filter_ripemd.c 2006-07-28 03:22:37.000000000 +0200
3 +++ osiris-4.2.1.new/src/libosiris/filter_ripemd.c 2006-11-29 12:16:00.000000000 +0100
4 @@ -55,9 +55,9 @@
5 {
6 context->filter_argument += 2;
7 }
8 -
9 +#ifndef OPENSSL_NO_RIPEMD
10 hash_file_ripemd( file_path, context->file_handle, hash, sizeof(hash) );
11 -
12 +#endif
13 if( strcmp( hash, context->filter_argument ) == 0 )
14 {
15 return TRUE;
16 diff -urN osiris-4.2.1/src/libosiris/ssl_utilities.c osiris-4.2.1.new/src/libosiris/ssl_utilities.c
17 --- osiris-4.2.1/src/libosiris/ssl_utilities.c 2006-07-28 03:22:37.000000000 +0200
18 +++ osiris-4.2.1.new/src/libosiris/ssl_utilities.c 2006-11-29 12:17:33.000000000 +0100
19 @@ -51,7 +51,9 @@
20 #include <openssl/rand.h>
21 #include <openssl/md5.h>
22 #include <openssl/sha.h>
23 +#ifndef OPENSSL_NO_RIPEMD
24 #include <openssl/ripemd.h>
25 +#endif
26
27 #ifdef WIN32
28 #include <winsock.h>
29 @@ -348,6 +350,7 @@
30 int hash_file_ripemd( const char *file_path, FILE *file,
31 char *buffer, int buffer_size )
32 {
33 +#ifndef OPENSSL_NO_RIPEMD
34 int fno;
35 FILE *file_to_hash = file;
36 RIPEMD160_CTX context;
37 @@ -430,7 +433,7 @@
38 osi_strlcpy( buffer, file_hash, buffer_size );
39 return 0;
40 }
41 -
42 +#endif
43 return -1;
44 }
45
46 diff -urN osiris-4.2.1/src/libosiris/utilities.c osiris-4.2.1.new/src/libosiris/utilities.c
47 --- osiris-4.2.1/src/libosiris/utilities.c 2006-07-28 03:22:37.000000000 +0200
48 +++ osiris-4.2.1.new/src/libosiris/utilities.c 2006-11-29 12:16:38.000000000 +0100
49 @@ -60,8 +60,9 @@
50
51 #include <openssl/md5.h>
52 #include <openssl/sha.h>
53 +#ifndef OPENSSL_NO_RIPEMD
54 #include <openssl/ripemd.h>
55 -
56 +#endif
57 #include "utilities.h"
58 #include "error.h"
59