1 Index: isakmpd-20041012.orig/GNUmakefile
2 ===================================================================
3 --- isakmpd-20041012.orig.orig/GNUmakefile 2007-06-04 13:22:39.722816496 +0200
4 +++ isakmpd-20041012.orig/GNUmakefile 2007-06-04 13:22:40.000774240 +0200
6 isakmp_fld.c isakmp_fld.h
7 MAN= isakmpd.8 isakmpd.conf.5 isakmpd.policy.5
9 -CFLAGS+= -O2 ${DEBUG} -Wall -DNEED_SYSDEP_APP \
10 +CFLAGS+= ${DEBUG} -Wall -DNEED_SYSDEP_APP \
11 -I${.CURDIR} -I${.CURDIR}/sysdep/${OS} -I. \
13 # Different debugging & profiling suggestions
15 # Include symbolic debugging info
19 # Do execution time profiles
25 +ifdef USE_OPENSSL_MD5
26 +CFLAGS+= -DUSE_OPENSSL_MD5
29 +ifdef USE_OPENSSL_SHA1
30 +CFLAGS+= -DUSE_OPENSSL_SHA1
33 SRCS+= ${IPSEC_SRCS} ${X509} ${POLICY} ${EC} ${AGGRESSIVE} ${DNSSEC} \
34 $(ISAKMP_CFG) ${DPD} ${NAT_TRAVERSAL}
35 CFLAGS+= ${IPSEC_CFLAGS}
36 Index: isakmpd-20041012.orig/sysdep/common/libsysdep/GNUmakefile
37 ===================================================================
38 --- isakmpd-20041012.orig.orig/sysdep/common/libsysdep/GNUmakefile 2007-06-04 13:22:38.959932472 +0200
39 +++ isakmpd-20041012.orig/sysdep/common/libsysdep/GNUmakefile 2007-06-04 13:22:40.000774240 +0200
41 .CURDIR:= $(shell pwd)
44 -SRCS= arc4random.c blowfish.c cast.c md5.c sha1.c strlcat.c strlcpy.c
45 +SRCS= arc4random.c blowfish.c cast.c strlcat.c strlcpy.c
47 CFLAGS+= -I${.CURDIR}/.. -I/usr/include/machine
49 +ifeq (,$(findstring USE_OPENSSL_MD5,$(CFLAGS)))
53 +ifeq (,$(findstring USE_OPENSSL_SHA1,$(CFLAGS)))
57 lib${LIB}.a: ${SRCS:%.c=%.o}
58 ar cq $@ ${SRCS:%.c=%.o}
60 Index: isakmpd-20041012.orig/sysdep/common/libsysdep/md5.c
61 ===================================================================
62 --- isakmpd-20041012.orig.orig/sysdep/common/libsysdep/md5.c 2007-06-04 13:22:38.964931712 +0200
63 +++ isakmpd-20041012.orig/sysdep/common/libsysdep/md5.c 2007-06-04 13:22:40.000774240 +0200
65 * changes to accommodate it in the kernel by ji.
68 +#ifndef USE_OPENSSL_MD5
70 /* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
77 +#endif /* USE_OPENSSL_MD5 */
78 Index: isakmpd-20041012.orig/sysdep/common/libsysdep/sha1.c
79 ===================================================================
80 --- isakmpd-20041012.orig.orig/sysdep/common/libsysdep/sha1.c 2007-06-04 13:22:38.970930800 +0200
81 +++ isakmpd-20041012.orig/sysdep/common/libsysdep/sha1.c 2007-06-04 13:22:40.001774088 +0200
83 /* $OpenBSD: sha1.c,v 1.2 2001/01/28 22:38:48 niklas Exp $ */
85 +#ifndef USE_OPENSSL_SHA1
89 By Steve Reid <steve@edmweb.com>
91 SHA1Transform(context->state, context->buffer);
95 +#endif /* USE_OPENSSL_SHA1 */
96 Index: isakmpd-20041012.orig/sysdep/common/md5.h
97 ===================================================================
98 --- isakmpd-20041012.orig.orig/sysdep/common/md5.h 2007-06-04 13:22:38.976929888 +0200
99 +++ isakmpd-20041012.orig/sysdep/common/md5.h 2007-06-04 13:22:40.001774088 +0200
101 /* $OpenBSD: md5.h,v 1.2 2001/01/28 22:38:47 niklas Exp $ */
103 +#ifdef USE_OPENSSL_MD5
105 +#include <openssl/md5.h>
107 +#define MD5Init MD5_Init
108 +#define MD5Update MD5_Update
109 +#define MD5Final MD5_Final
111 +#else /* USE_OPENSSL_MD5 */
113 /* GLOBAL.H - RSAREF types and constants
117 void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
121 +#endif /* USE_OPENSSL_MD5 */
122 Index: isakmpd-20041012.orig/sysdep/common/sha1.h
123 ===================================================================
124 --- isakmpd-20041012.orig.orig/sysdep/common/sha1.h 2007-06-04 13:22:38.982928976 +0200
125 +++ isakmpd-20041012.orig/sysdep/common/sha1.h 2007-06-04 13:22:40.001774088 +0200
127 /* $OpenBSD: sha1.h,v 1.2 2001/01/28 22:38:47 niklas Exp $ */
129 +#ifdef USE_OPENSSL_SHA1
131 +#include <openssl/sha.h>
133 +typedef SHA_CTX SHA1_CTX;
134 +#define SHA1Init SHA1_Init
135 +#define SHA1Update SHA1_Update
136 +#define SHA1Final SHA1_Final
138 +#else /* USE_OPENSSL_SHA1 */
142 By Steve Reid <steve@edmweb.com>
144 void SHA1Init(SHA1_CTX* context);
145 void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int len);
146 void SHA1Final(unsigned char digest[20], SHA1_CTX* context);
148 +#endif /* USE_OPENSSL_SHA1 */
149 Index: isakmpd-20041012.orig/sysdep/linux/GNUmakefile.sysdep
150 ===================================================================
151 --- isakmpd-20041012.orig.orig/sysdep/linux/GNUmakefile.sysdep 2007-06-04 13:22:39.722816496 +0200
152 +++ isakmpd-20041012.orig/sysdep/linux/GNUmakefile.sysdep 2007-06-04 13:22:40.001774088 +0200
154 USE_LIBCRYPO= defined
157 +USE_OPENSSL_MD5= defined
158 +USE_OPENSSL_SHA1= defined
160 # hack libsysdep.a dependenc
161 ${LIBSYSDEPDIR}/.depend ${LIBSYSDEP}: