1 diff -urN isakmpd/GNUmakefile isakmpd.new/GNUmakefile
2 --- isakmpd/GNUmakefile 2006-09-01 19:29:05.000000000 +0200
3 +++ isakmpd.new/GNUmakefile 2006-09-01 19:29:28.000000000 +0200
5 isakmp_fld.c isakmp_fld.h
6 MAN= isakmpd.8 isakmpd.conf.5 isakmpd.policy.5
8 -CFLAGS+= -O2 ${DEBUG} -Wall -DNEED_SYSDEP_APP \
9 +CFLAGS+= ${DEBUG} -Wall -DNEED_SYSDEP_APP \
10 -I${.CURDIR} -I${.CURDIR}/sysdep/${OS} -I. \
12 # Different debugging & profiling suggestions
14 # Include symbolic debugging info
18 # Do execution time profiles
24 +ifdef USE_OPENSSL_MD5
25 +CFLAGS+= -DUSE_OPENSSL_MD5
28 +ifdef USE_OPENSSL_SHA1
29 +CFLAGS+= -DUSE_OPENSSL_SHA1
32 SRCS+= ${IPSEC_SRCS} ${X509} ${POLICY} ${EC} ${AGGRESSIVE} ${DNSSEC} \
34 CFLAGS+= ${IPSEC_CFLAGS}
35 diff -urN isakmpd/sysdep/common/libsysdep/GNUmakefile isakmpd.new/sysdep/common/libsysdep/GNUmakefile
36 --- isakmpd/sysdep/common/libsysdep/GNUmakefile 2003-06-03 16:52:06.000000000 +0200
37 +++ isakmpd.new/sysdep/common/libsysdep/GNUmakefile 2006-09-01 19:29:28.000000000 +0200
39 .CURDIR:= $(shell pwd)
42 -SRCS= arc4random.c blowfish.c cast.c md5.c sha1.c strlcat.c strlcpy.c
43 +SRCS= arc4random.c blowfish.c cast.c strlcat.c strlcpy.c
45 CFLAGS+= -I${.CURDIR}/.. -I/usr/include/machine
47 +ifeq (,$(findstring USE_OPENSSL_MD5,$(CFLAGS)))
51 +ifeq (,$(findstring USE_OPENSSL_SHA1,$(CFLAGS)))
55 lib${LIB}.a: ${SRCS:%.c=%.o}
56 ar cq $@ ${SRCS:%.c=%.o}
58 diff -urN isakmpd/sysdep/common/libsysdep/md5.c isakmpd.new/sysdep/common/libsysdep/md5.c
59 --- isakmpd/sysdep/common/libsysdep/md5.c 2002-06-14 23:34:58.000000000 +0200
60 +++ isakmpd.new/sysdep/common/libsysdep/md5.c 2006-09-01 19:29:28.000000000 +0200
62 * changes to accommodate it in the kernel by ji.
65 +#ifndef USE_OPENSSL_MD5
67 /* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
74 +#endif /* USE_OPENSSL_MD5 */
75 diff -urN isakmpd/sysdep/common/libsysdep/sha1.c isakmpd.new/sysdep/common/libsysdep/sha1.c
76 --- isakmpd/sysdep/common/libsysdep/sha1.c 2001-01-28 23:38:48.000000000 +0100
77 +++ isakmpd.new/sysdep/common/libsysdep/sha1.c 2006-09-01 19:29:28.000000000 +0200
79 /* $OpenBSD: sha1.c,v 1.2 2001/01/28 22:38:48 niklas Exp $ */
81 +#ifndef USE_OPENSSL_SHA1
85 By Steve Reid <steve@edmweb.com>
87 SHA1Transform(context->state, context->buffer);
91 +#endif /* USE_OPENSSL_SHA1 */
92 diff -urN isakmpd/sysdep/common/md5.h isakmpd.new/sysdep/common/md5.h
93 --- isakmpd/sysdep/common/md5.h 2001-01-28 23:38:47.000000000 +0100
94 +++ isakmpd.new/sysdep/common/md5.h 2006-09-01 19:29:28.000000000 +0200
96 /* $OpenBSD: md5.h,v 1.2 2001/01/28 22:38:47 niklas Exp $ */
98 +#ifdef USE_OPENSSL_MD5
100 +#include <openssl/md5.h>
102 +#define MD5Init MD5_Init
103 +#define MD5Update MD5_Update
104 +#define MD5Final MD5_Final
106 +#else /* USE_OPENSSL_MD5 */
108 /* GLOBAL.H - RSAREF types and constants
112 void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
116 +#endif /* USE_OPENSSL_MD5 */
117 diff -urN isakmpd/sysdep/common/sha1.h isakmpd.new/sysdep/common/sha1.h
118 --- isakmpd/sysdep/common/sha1.h 2001-01-28 23:38:47.000000000 +0100
119 +++ isakmpd.new/sysdep/common/sha1.h 2006-09-01 19:29:28.000000000 +0200
121 /* $OpenBSD: sha1.h,v 1.2 2001/01/28 22:38:47 niklas Exp $ */
123 +#ifdef USE_OPENSSL_SHA1
125 +#include <openssl/sha.h>
127 +typedef SHA_CTX SHA1_CTX;
128 +#define SHA1Init SHA1_Init
129 +#define SHA1Update SHA1_Update
130 +#define SHA1Final SHA1_Final
132 +#else /* USE_OPENSSL_SHA1 */
136 By Steve Reid <steve@edmweb.com>
138 void SHA1Init(SHA1_CTX* context);
139 void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int len);
140 void SHA1Final(unsigned char digest[20], SHA1_CTX* context);
142 +#endif /* USE_OPENSSL_SHA1 */
143 diff -urN isakmpd/sysdep/linux/GNUmakefile.sysdep isakmpd.new/sysdep/linux/GNUmakefile.sysdep
144 --- isakmpd/sysdep/linux/GNUmakefile.sysdep 2006-09-01 19:29:05.000000000 +0200
145 +++ isakmpd.new/sysdep/linux/GNUmakefile.sysdep 2006-09-01 19:29:29.000000000 +0200
147 USE_LIBCRYPO= defined
150 +USE_OPENSSL_MD5= defined
151 +USE_OPENSSL_SHA1= defined
153 # hack libsysdep.a dependenc
154 ${LIBSYSDEPDIR}/.depend ${LIBSYSDEP}: