aboutsummaryrefslogtreecommitdiff
path: root/net/tund
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2000-02-06 22:14:05 +0000
committerKris Kennaway <kris@FreeBSD.org>2000-02-06 22:14:05 +0000
commit6a179c6b82894e91c79c6e004822d020a951fd55 (patch)
tree250ec644f24189a479fd7fd898c83a6f90fda292 /net/tund
parent7d2dd70a77802ed6ff8444060b73c4f700ab6887 (diff)
downloadports-6a179c6b82894e91c79c6e004822d020a951fd55.tar.gz
ports-6a179c6b82894e91c79c6e004822d020a951fd55.zip
Notes
Diffstat (limited to 'net/tund')
-rw-r--r--net/tund/Makefile6
-rw-r--r--net/tund/files/patch-aa21
-rw-r--r--net/tund/files/patch-ab86
3 files changed, 105 insertions, 8 deletions
diff --git a/net/tund/Makefile b/net/tund/Makefile
index 366b63f7823a..44295acaed1a 100644
--- a/net/tund/Makefile
+++ b/net/tund/Makefile
@@ -12,11 +12,7 @@ MASTER_SITES= ftp://ftp.chg.ru/pub/networking/freebsd/
MAINTAINER= ks@itp.ac.ru
-BUILD_DEPENDS= ${LOCALBASE}/lib/libcrypto.a:${PORTSDIR}/security/openssl
-
-.if defined(USA_RESIDENT) && ${USA_RESIDENT} == YES
-MAKE_ENV+= EXTRA_SSL_LIBS="-lRSAglue -lrsaref"
-.endif
+USE_OPENSSL= RSA
MAN8= tund.8
MANCOMPRESSED= yes
diff --git a/net/tund/files/patch-aa b/net/tund/files/patch-aa
index cb11aab93c87..1d475e130906 100644
--- a/net/tund/files/patch-aa
+++ b/net/tund/files/patch-aa
@@ -1,6 +1,21 @@
---- Makefile.orig Fri Sep 17 14:20:52 1999
-+++ Makefile Fri Sep 17 14:21:05 1999
-@@ -10,13 +10,13 @@
+--- Makefile.orig Tue Aug 24 03:48:00 1999
++++ Makefile Sat Feb 5 22:30:00 2000
+@@ -1,22 +1,24 @@
+
+ RSA_KEY_LENGTH = 1024
+
+-CFLAGS = -g -DDEBUG
++CFLAGS ?= -O2
++CFLAGS += -g -DDEBUG $(OPENSSL_CFLAGS)
+ # CFLAGS = -O6 -mpentium
+-CC = cc $(CFLAGS)
+-INC = -I/usr/local/include
+-LIB = -L/usr/local/lib
++CC ?= cc
++CC += $(CFLAGS)
++INC = -I$(OPENSSLINC)
++LIB = -L$(OPENSSLLIB)
+
all: rsa_kg pkey_gen tund keygen
rsa_kg: rsa_kg.c tund.h
diff --git a/net/tund/files/patch-ab b/net/tund/files/patch-ab
new file mode 100644
index 000000000000..8882676cea57
--- /dev/null
+++ b/net/tund/files/patch-ab
@@ -0,0 +1,86 @@
+--- cipher.c.orig Sat Feb 5 21:35:24 2000
++++ cipher.c Sat Feb 5 21:38:51 2000
+@@ -1,7 +1,9 @@
+ #include <stdlib.h>
+ #include "tund.h"
+ #include <openssl/blowfish.h>
++#ifndef NO_IDEA
+ #include <openssl/idea.h>
++#endif
+ #include <openssl/rc5.h>
+
+
+@@ -27,7 +29,9 @@
+ {
+ Tunnel *tun;
+ BF_KEY *bf_key;
++#ifndef NO_IDEA
+ IDEA_KEY_SCHEDULE *idea_key1,*idea_key2;
++#endif
+ RC5_32_KEY *rc5_key;
+ void *key;
+ unsigned char *data;
+@@ -56,6 +60,7 @@
+ BF_set_key(bf_key,16,data);
+ key=bf_key;
+ break;
++#ifndef NO_IDEA
+ case TUN_CIPHER_IDEA: idea_key1=must_malloc(sizeof(IDEA_KEY_SCHEDULE));
+ idea_set_encrypt_key(data,idea_key1);
+ if(remote)
+@@ -67,6 +72,7 @@
+ }
+ key=idea_key1;
+ break;
++#endif
+ case TUN_CIPHER_RC5:rc5_key=must_malloc(sizeof(RC5_32_KEY));
+ RC5_32_set_key(rc5_key,16,data,RC5_8_ROUNDS);
+ key=rc5_key;
+@@ -93,7 +99,9 @@
+ Tunnel *tun=(Tunnel*)stun->buf[tun_ind];
+ int cipher;
+ BF_KEY *bf_key;
++#ifndef NO_IDEA
+ IDEA_KEY_SCHEDULE *idea_key;
++#endif
+ RC5_32_KEY *rc5_key;
+ int length;
+
+@@ -106,11 +114,13 @@
+ bcopy(ivec_ini,iv_buf,8);
+ BF_cbc_encrypt(in,out,length,bf_key,iv_buf,BF_ENCRYPT);
+ return length;
++#ifndef NO_IDEA
+ case TUN_CIPHER_IDEA:idea_key=tun->localCipherKey;
+ bcopy(ivec_ini,iv_buf,8);
+ idea_cbc_encrypt(in,out,length,idea_key,
+ iv_buf,IDEA_ENCRYPT);
+ return length;
++#endif
+ case TUN_CIPHER_RC5:rc5_key=tun->localCipherKey;
+ bcopy(ivec_ini,iv_buf,8);
+ RC5_32_cbc_encrypt(in,out,length,rc5_key,
+@@ -129,7 +139,9 @@
+ Tunnel *tun=(Tunnel*)stun->buf[tun_ind];
+ int cipher;
+ BF_KEY *bf_key;
++#ifndef NO_IDEA
+ IDEA_KEY_SCHEDULE *idea_key;
++#endif
+ RC5_32_KEY *rc5_key;
+ int length;
+
+@@ -142,11 +154,13 @@
+ bcopy(ivec_ini,iv_buf,8);
+ BF_cbc_encrypt(in,out,length,bf_key,iv_buf,BF_DECRYPT);
+ break;
++#ifndef NO_IDEA
+ case TUN_CIPHER_IDEA:idea_key=tun->remoteCipherKey;
+ bcopy(ivec_ini,iv_buf,8);
+ idea_cbc_encrypt(in,out,length,idea_key,
+ iv_buf,IDEA_DECRYPT);
+ break;
++#endif
+ case TUN_CIPHER_RC5:rc5_key=tun->remoteCipherKey;
+ bcopy(ivec_ini,iv_buf,8);
+ RC5_32_cbc_encrypt(in,out,length,rc5_key,