summaryrefslogtreecommitdiff
path: root/net/pipsecd
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2000-02-06 22:11:36 +0000
committerKris Kennaway <kris@FreeBSD.org>2000-02-06 22:11:36 +0000
commit7d2dd70a77802ed6ff8444060b73c4f700ab6887 (patch)
tree4646aadfcb7d4cbef2145ac0ea6cf2dace433ffa /net/pipsecd
parentUSE_OPENSSL, respect CC, CFLAGS, LOCALBASE (diff)
USE_OPENSSL
Assisted by: Jim Bloom <bloom@acm.org>
Notes
Notes: svn path=/head/; revision=25529
Diffstat (limited to 'net/pipsecd')
-rw-r--r--net/pipsecd/Makefile6
-rw-r--r--net/pipsecd/files/patch-aa17
-rw-r--r--net/pipsecd/files/patch-ab88
3 files changed, 96 insertions, 15 deletions
diff --git a/net/pipsecd/Makefile b/net/pipsecd/Makefile
index 3225b52c033f..43f054d67acf 100644
--- a/net/pipsecd/Makefile
+++ b/net/pipsecd/Makefile
@@ -14,12 +14,10 @@ MASTER_SITES= http://www.enst.fr/~beyssac/pipsec/ \
MAINTAINER= patrick@mindstep.com
-LIB_DEPENDS= crypto.1:${PORTSDIR}/security/openssl
+USE_OPENSSL= RSA
ALL_TARGET= pipsecd
-.include <bsd.port.pre.mk>
-
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/pipsecd ${PREFIX}/sbin
${INSTALL_DATA} ${WRKSRC}/pipsecd.sh ${PREFIX}/etc/rc.d
@@ -36,4 +34,4 @@ do-install:
post-install:
strip ${PREFIX}/sbin/pipsecd
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net/pipsecd/files/patch-aa b/net/pipsecd/files/patch-aa
index ce57cc312113..22df5536ce6f 100644
--- a/net/pipsecd/files/patch-aa
+++ b/net/pipsecd/files/patch-aa
@@ -1,27 +1,30 @@
--- Makefile.orig Thu Sep 16 17:44:50 1999
-+++ Makefile Thu Oct 14 10:27:50 1999
-@@ -6,10 +6,13 @@
++++ Makefile Fri Feb 4 15:14:18 2000
+@@ -6,23 +6,26 @@
CLEANFILES= *.core *.o pipsecd
# Where your OpenSSL includes are located
-INCDIR=/usr/local/ssl/include
-+INCDIR=-I$(PREFIX)/include/openssl -I$(PREFIX)/include
++INCDIR=-I$(OPENSSLINC) -I$(OPENSSLINC)/openssl -I$(LOCALBASE)/include
# Where your libcrypto is located
-LIBDIR=/usr/local/ssl/lib
-+LIBDIR=-L$(PREFIX)/lib
++LIBDIR=-L$(OPENSSLLIB)
+
+# Misc defines
+DEFINES=-DFILE_PREFIX=\"$(PREFIX)\"
# Optional: use FreeBSD's libmd
- #OPTLIB += -lmd
-@@ -19,10 +22,10 @@
+-#OPTLIB += -lmd
++OPTLIB += -lmd
+ #OPTDEF += -DUSE_SYSTEM_HASH
+
+ # Optional: use ethertap device under Linux instead of userlink
#OPTDEF += -DUSE_ETHERTAP
pipsecd: tunip.c defs.h
- gcc -Wall -I$(INCDIR) -g $(OPTDEF) -o pipsecd tunip.c -L$(LIBDIR) $(OPTLIB) -lcrypto
-+ gcc -Wall $(INCDIR) -g $(OPTDEF) -o pipsecd tunip.c $(LIBDIR) $(OPTLIB) -lcrypto -lRSAglue -lrsaref $(DEFINES)
++ $(CC) -Wall $(INCDIR) -g $(CFLAGS) $(OPENSSL_CFLAGS) $(OPTDEF) -o pipsecd tunip.c $(LIBDIR) -lcrypto $(OPTLIB) $(EXTRA_SSL_LIBS) $(DEFINES)
install: pipsecd
- install pipsecd /usr/local/sbin/
diff --git a/net/pipsecd/files/patch-ab b/net/pipsecd/files/patch-ab
index 8aaa16439810..cecf8ceca69f 100644
--- a/net/pipsecd/files/patch-ab
+++ b/net/pipsecd/files/patch-ab
@@ -1,6 +1,12 @@
---- tunip.c.orig Mon Aug 16 11:54:50 1999
-+++ tunip.c Mon Aug 16 12:27:07 1999
-@@ -57,8 +57,8 @@
+--- tunip.c.orig Tue Sep 21 18:20:40 1999
++++ tunip.c Fri Feb 4 15:09:46 2000
+@@ -54,12 +54,14 @@
+ #include <blowfish.h>
+ #include <cast.h>
+ #include <des.h>
++#ifndef NO_IDEA
+ #include <idea.h>
++#endif
#include "defs.h"
@@ -10,4 +16,78 @@
+#define _PATH_STARTUP FILE_PREFIX "/etc/ipsec/startup"
#define _PATH_DEV_RANDOM "/dev/random"
- #define MAX_HEADER 64
+ #ifdef USE_ETHERTAP
+@@ -87,10 +89,10 @@
+
+ #define UDP_PORT 2001
+
+-#ifdef USE_SYSTEM_HASH
+ #define MD5_Init MD5Init
+ #define MD5_Update MD5Update
+ #define MD5_Final MD5Final
++#ifdef USE_SYSTEM_HASH
+ #define SHA1_Init SHA1Init
+ #define SHA1_Update SHA1Update
+ #define SHA1_Final SHA1Final
+@@ -131,7 +133,9 @@
+ des_key_schedule k3;
+ } des3;
+ CAST_KEY cast;
++#ifndef NO_IDEA
+ IDEA_KEY_SCHEDULE idea;
++#endif
+ } crypt_key;
+
+ typedef struct crypt_method {
+@@ -304,12 +308,14 @@
+ void cast_cbc_decrypt(unsigned char *iv, crypt_key *dk,
+ unsigned char *ct, unsigned int len);
+ int cast_setkey(unsigned char *b, unsigned int len, crypt_key *k);
++#ifndef NO_IDEA
+ void my_idea_cbc_encrypt(unsigned char *iv, crypt_key *ek,
+ unsigned char *t, unsigned int len);
+ void my_idea_cbc_decrypt(unsigned char *iv, crypt_key *dk,
+ unsigned char *ct, unsigned int len);
+ int my_idea_set_encrypt_key(unsigned char *b, unsigned int len, crypt_key *k);
+ int my_idea_set_decrypt_key(unsigned char *b, unsigned int len, crypt_key *k);
++#endif
+ void my_des_cbc_encrypt(unsigned char *iv, crypt_key *ek,
+ unsigned char *t, unsigned int len);
+ void my_des_cbc_decrypt(unsigned char *iv, crypt_key *dk,
+@@ -379,14 +385,20 @@
+
+ hash_method_t *hash_list = &hash_ripemd160;
+
++#ifndef NO_IDEA
+ crypt_method_t crypt_idea = {
+ NULL,
+ "idea_cbc", 8, 8,
+ my_idea_cbc_encrypt, my_idea_cbc_decrypt,
+ my_idea_set_encrypt_key, my_idea_set_decrypt_key
+ };
++#endif
+ crypt_method_t crypt_cast = {
++#ifndef NO_IDEA
+ &crypt_idea,
++#else
++ NULL,
++#endif
+ "cast_cbc", 8, 8,
+ cast_cbc_encrypt, cast_cbc_decrypt,
+ cast_setkey, cast_setkey
+@@ -1974,6 +1986,7 @@
+ return 0;
+ }
+
++#ifndef NO_IDEA
+ void my_idea_cbc_encrypt(unsigned char *iv, crypt_key *ek,
+ unsigned char *t, unsigned int len)
+ {
+@@ -2002,6 +2015,7 @@
+ idea_set_decrypt_key(&k->idea, &k->idea);
+ return 0;
+ }
++#endif
+
+ void my_des_cbc_encrypt(unsigned char *iv, crypt_key *ek,
+ unsigned char *t, unsigned int len)