diff options
author | Kris Kennaway <kris@FreeBSD.org> | 2000-02-06 22:11:36 +0000 |
---|---|---|
committer | Kris Kennaway <kris@FreeBSD.org> | 2000-02-06 22:11:36 +0000 |
commit | 7d2dd70a77802ed6ff8444060b73c4f700ab6887 (patch) | |
tree | 4646aadfcb7d4cbef2145ac0ea6cf2dace433ffa /net | |
parent | USE_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')
-rw-r--r-- | net/SSLtelnet/Makefile | 21 | ||||
-rw-r--r-- | net/SSLtelnet/files/patch-aa | 21 | ||||
-rw-r--r-- | net/SSLtelnet/files/patch-ah | 17 | ||||
-rw-r--r-- | net/SSLtelnet/files/patch-ai | 21 | ||||
-rw-r--r-- | net/SSLtelnet/files/patch-aj | 9 | ||||
-rw-r--r-- | net/SSLtelnet/pkg-plist | 1 | ||||
-rw-r--r-- | net/pipsecd/Makefile | 6 | ||||
-rw-r--r-- | net/pipsecd/files/patch-aa | 17 | ||||
-rw-r--r-- | net/pipsecd/files/patch-ab | 88 |
9 files changed, 133 insertions, 68 deletions
diff --git a/net/SSLtelnet/Makefile b/net/SSLtelnet/Makefile index 62940da9a00e..c1d90a53e919 100644 --- a/net/SSLtelnet/Makefile +++ b/net/SSLtelnet/Makefile @@ -11,26 +11,7 @@ MASTER_SITES= ftp://ftp.psy.uq.oz.au/pub/Crypto/SSLapps/ MAINTAINER= issei@jp.FreeBSD.org -.if defined(USA_RESIDENT) && ${USA_RESIDENT} != YES && ${USA_RESIDENT} != NO -pre-fetch: - @${ECHO_MSG} - @${ECHO_MSG} You must set variable USA_RESIDENT to YES, if you are USA resident - @${ECHO_MSG} or to NO, if you aren\'t USA resident to build this package. - @${ECHO_MSG} You must also have installed RSAREF if you are USA resident. - @${FALSE} -.elif defined(USA_RESIDENT) -.if ${USA_RESIDENT} == YES -LIB_DEPENDS= rsaref.2:${PORTSDIR}/security/rsaref - -pre-configure: - ${PATCH} ${PATCH_DIST_ARGS} < ${FILESDIR}/Makefile.patch -.endif -.endif - -BUILD_DEPENDS= openssl:${PORTSDIR}/security/openssl -RUN_DEPENDS= openssl:${PORTSDIR}/security/openssl - -RESTRICTED= "Cryptography" +USE_OPENSSL= RSA .if !defined(BATCH) INSTALL_TARGET= install certificate diff --git a/net/SSLtelnet/files/patch-aa b/net/SSLtelnet/files/patch-aa index b93630d58cca..c00635d9144a 100644 --- a/net/SSLtelnet/files/patch-aa +++ b/net/SSLtelnet/files/patch-aa @@ -1,5 +1,5 @@ ---- Makefile.orig Thu Sep 24 23:50:59 1998 -+++ Makefile Thu Aug 5 08:57:44 1999 +--- Makefile.orig Thu Sep 24 17:50:59 1998 ++++ Makefile Tue Feb 1 11:11:24 2000 @@ -47,7 +47,7 @@ # the location where SSLeay is installed ... @@ -20,18 +20,19 @@ ##OLD Linux stuff #CC = gcc -DLINUX -DUSE_SHADOW $(socksflags) -@@ -95,6 +95,10 @@ +@@ -95,6 +95,11 @@ #BSD386 #CC = gcc -DBSD386 -DTERMCAP $(socksflags) #LDADD = -ltermcap $(sockslib) + -+#BSD386 ++#FreeBSD +CC += -DTERMCAP $(socksflags) -+LDADD = -ltermcap $(sockslib) ++LDADD = -L$(OPENSSLLIB) -lssl -lcrypto $(EXTRA_SSL_LIBS) \ ++ -ltermcap $(sockslib) all: @-mkdir bin 2>/dev/null -@@ -145,12 +149,11 @@ +@@ -145,12 +150,11 @@ tar: clean (cd ..; tar cf $(TARFILE) $(DIRECTORY); /bin/rm -f $(TARFILE).Z $(TARFILE).gz >/dev/null 2>&1 ; $(COMPRESS) $(TARFILE) ) @@ -47,7 +48,7 @@ @echo "*****************************************************" @echo "* Do not forget to make the certificate for telnetd *" @echo "* either manually or via \"make certificate\" *" -@@ -158,9 +161,10 @@ +@@ -158,9 +162,10 @@ certificate: (\ @@ -55,10 +56,10 @@ - ssleay req -new -x509 -nodes -days 365 -out telnetd.pem -keyout telnetd.pem; \ - ln -s telnetd.pem `ssleay x509 -noout -hash < telnetd.pem`.0 ;\ - chmod 600 $(INSTALLTOP)/certs/telnetd.pem; \ -+ [ -f $(INSTALLTOP)/openssl/certs/telnetd.pem ] && exit; \ -+ cd $(INSTALLTOP)/openssl/certs; \ ++ [ -f $(OPENSSLDIR)/certs/telnetd.pem ] && exit; \ ++ cd $(OPENSSLDIR)/certs; \ + openssl req -new -x509 -nodes -days 365 -out telnetd.pem -keyout telnetd.pem; \ + ln -s telnetd.pem `openssl x509 -noout -hash < telnetd.pem`.0 ;\ -+ chmod 600 $(INSTALLTOP)/openssl/certs/telnetd.pem; \ ++ chmod 600 $(OPENSSLDIR)/certs/telnetd.pem; \ ) diff --git a/net/SSLtelnet/files/patch-ah b/net/SSLtelnet/files/patch-ah index 6a032123d1a3..b736d3a37762 100644 --- a/net/SSLtelnet/files/patch-ah +++ b/net/SSLtelnet/files/patch-ah @@ -1,6 +1,6 @@ ---- telnetd/Makefile.orig Tue Sep 12 11:22:51 1995 -+++ telnetd/Makefile Thu Aug 5 03:54:59 1999 -@@ -4,16 +4,13 @@ +--- telnetd/Makefile.orig Mon Sep 11 22:22:51 1995 ++++ telnetd/Makefile Tue Feb 1 09:20:28 2000 +@@ -4,17 +4,11 @@ PROG= telnetd @@ -10,14 +10,15 @@ - -I$(SSLTOP)/include +CFLAGS+= -DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO -DAUTHENTICATE -DUSE_SSL \ + -DDIAGNOSTICS -DFILIO_H -I../lib -I../lib/libbsd/include \ -+ -I$(SSLTOP)/include -I$(SSLTOP)/include/openssl ++ -I$(OPENSSLINC)/openssl - LIBS= ../lib/libtelnet/libtelnet.a \ +-LIBS= ../lib/libtelnet/libtelnet.a \ - ../lib/libbsd/libbsd.a \ - ../lib/libutil/libutil.a \ - $(SSLTOP)/lib/libssl.a \ +- $(SSLTOP)/lib/libssl.a \ - $(SSLTOP)/lib/libcrypto.a -+ $(SSLTOP)/lib/libcrypto.a -lutil - # $(SSLTOP)/lib/libdes.a +-# $(SSLTOP)/lib/libdes.a ++LIBS= ../lib/libtelnet/libtelnet.a -lutil OBJS= authenc.o global.o slc.o state.o sys_term.o telnetd.o \ + termstat.o utility.o diff --git a/net/SSLtelnet/files/patch-ai b/net/SSLtelnet/files/patch-ai index 4366b390b136..a9b2cd3df801 100644 --- a/net/SSLtelnet/files/patch-ai +++ b/net/SSLtelnet/files/patch-ai @@ -1,6 +1,6 @@ ---- telnet/Makefile.orig Sat Aug 2 14:30:16 1997 -+++ telnet/Makefile Thu Aug 5 03:54:01 1999 -@@ -6,14 +6,12 @@ +--- telnet/Makefile.orig Sat Aug 2 01:30:16 1997 ++++ telnet/Makefile Tue Feb 1 09:16:29 2000 +@@ -6,17 +6,11 @@ PROG= telnet @@ -9,12 +9,15 @@ - -I../lib/libbsd/include -I../lib \ - -I$(SSLTOP)/include +CFLAGS+= -DKLUDGELINEMODE -DUSE_TERMIO -DAUTHENTICATE -DUSE_SSL \ -+ -DFILIO_H -I../lib -I../lib/libbsd/include \ -+ -I$(SSLTOP)/include -I$(SSLTOP)/include/openssl ++ -DFILIO_H -I../lib -I../lib/libbsd/include -I$(OPENSSLINC)/openssl - LIBS= ../lib/libtelnet/libtelnet.a \ +-LIBS= ../lib/libtelnet/libtelnet.a \ - ../lib/libbsd/libbsd.a \ - $(SSLTOP)/lib/libssl.a \ - $(SSLTOP)/lib/libcrypto.a - # $(SSLTOP)/lib/libdes.a +- $(SSLTOP)/lib/libssl.a \ +- $(SSLTOP)/lib/libcrypto.a +-# $(SSLTOP)/lib/libdes.a ++LIBS= ../lib/libtelnet/libtelnet.a + + OBJS= authenc.o commands.o main.o network.o ring.o sys_bsd.o telnet.o \ + terminal.o tn3270.o utilities.o diff --git a/net/SSLtelnet/files/patch-aj b/net/SSLtelnet/files/patch-aj index a59f9a1790f6..47da4256fe0f 100644 --- a/net/SSLtelnet/files/patch-aj +++ b/net/SSLtelnet/files/patch-aj @@ -1,13 +1,12 @@ ---- lib/libtelnet/Makefile.orig Sat Aug 2 14:31:37 1997 -+++ lib/libtelnet/Makefile Thu Aug 5 03:52:45 1999 -@@ -12,8 +12,8 @@ +--- lib/libtelnet/Makefile.orig Sat Aug 2 01:31:37 1997 ++++ lib/libtelnet/Makefile Tue Feb 1 09:00:38 2000 +@@ -12,8 +12,7 @@ #CFLAGS= -DENCRYPT -DAUTHENTICATE -DSRA -DUSE_SSL -DDES_ENCRYPTION \ #-I../libbsd/include -I../libpk -CFLAGS= -DAUTHENTICATE -DUSE_SSL \ --I../libbsd/include -I$(SSLTOP)/include -I../libpk -g -+CFLAGS+= -DAUTHENTICATE -DUSE_SSL -I$(SSLTOP)/include \ -+ -I$(SSLTOP)/include/openssl -I../libbsd/include ++CFLAGS+= -DAUTHENTICATE -DUSE_SSL -I$(OPENSSLINC)/openssl -I../libbsd/include lib${LIB}.a: ${OBJS} echo building standard ${LIB} library diff --git a/net/SSLtelnet/pkg-plist b/net/SSLtelnet/pkg-plist index e73e012349b8..75a8b02c4a13 100644 --- a/net/SSLtelnet/pkg-plist +++ b/net/SSLtelnet/pkg-plist @@ -1,3 +1,2 @@ bin/telnet libexec/telnetd -@exec ( [ -f %D/openssl/certs/telnetd.pem ] && exit ; echo "Making certificate files" ; cd %D/openssl/certs ; %D/bin/openssl req -new -x509 -nodes -days 365 -out telnetd.pem -keyout telnetd.pem; ln -s telnetd.pem `%D/bin/openssl x509 -noout -hash < telnetd.pem`.0 ; chmod 644 %D/openssl/certs/telnetd.pem ) 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) |