From c9f2d5f4831961e16b54b2893d6ef13b760eceaf Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Thu, 24 Feb 2000 18:59:34 +0000 Subject: [PATCH] Build everything properly. This means: o Don't b uild libdes. o Crypto is now housed in libcrypto (with a compatability symlink to libdes) o RSA may depend on RSAREF at your locale. o OpenSSH is now a part of the base system. --- secure/Makefile | 2 +- secure/lib/Makefile | 10 ++++++++-- secure/lib/libcrypto/Makefile | 22 +++++++++++++++++++++- secure/lib/librsaglue/Makefile | 6 +----- secure/libexec/telnetd/Makefile | 6 +++--- secure/usr.bin/Makefile | 5 ++++- secure/usr.bin/telnet/Makefile | 6 +++--- 7 files changed, 41 insertions(+), 16 deletions(-) diff --git a/secure/Makefile b/secure/Makefile index 2b78992b6608..eb3f1071b895 100644 --- a/secure/Makefile +++ b/secure/Makefile @@ -6,7 +6,7 @@ MAINTAINER= markm -SUBDIR= lib libexec usr.bin +SUBDIR= lib libexec usr.bin usr.sbin SDIR= ${.CURDIR}/.. diff --git a/secure/lib/Makefile b/secure/lib/Makefile index 0180a3a72102..75f9b0517714 100644 --- a/secure/lib/Makefile +++ b/secure/lib/Makefile @@ -1,11 +1,17 @@ # $FreeBSD$ -SUBDIR= libcipher libdes +SUBDIR= libcipher .if !defined(NOCRYPT) && !defined(MAKE_KERBEROS4) SUBDIR+=libtelnet .endif .if !defined(NO_OPENSSL) -SUBDIR+=libcrypto librsaglue libssl +SUBDIR+=libcrypto libssl +.if defined(RSAREF) && ${RSAREF} == YES +SUBDIR+=librsaglue +.endif +.endif +.if !defined(NO_OPENSSH) +SUBDIR+=libssh .endif .include diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index 49cde2559a90..db824b12e135 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -55,7 +55,7 @@ SRCS+= cbc_cksm.c cbc_enc.c cfb64ede.c cfb64enc.c cfb_enc.c des_enc.c \ ecb3_enc.c ecb_enc.c ede_cbcm_enc.c enc_read.c enc_writ.c \ fcrypt.c fcrypt.c fcrypt_b.c ofb64ede.c ofb64enc.c ofb_enc.c \ pcbc_enc.c qud_cksm.c rand_key.c read2pwd.c read_pwd.c rpc_enc.c \ - set_key.c str2key.c supp.c xcbc_enc.c + set_key.c str2key.c supp.c xcbc_enc.c rnd_keys.c # dh SRCS+= dh_check.c dh_err.c dh_gen.c dh_key.c dh_lib.c @@ -127,6 +127,7 @@ SRCS+= rmd_dgst.c rmd_one.c .if defined(WITH_RSA) && ${WITH_RSA} == YES SRCS+= rsa_chk.c rsa_err.c rsa_gen.c rsa_lib.c rsa_none.c rsa_oaep.c \ rsa_pk1.c rsa_saos.c rsa_sign.c rsa_ssl.c +HDRS+= ../rsaref/rsaref.h .if !defined(RSAREF) || ${RSAREF} != YES SRCS+= rsa_eay.c .endif @@ -219,3 +220,22 @@ beforeinstall: ${.OBJDIR}/openssl/opensslconf.h .include +afterinstall: +.if !defined(NOPIC) + @cd ${DESTDIR}${SHLIBDIR}; \ + rm -f libdes.so.3; \ + ln -sf lib${LIB}.so.${SHLIB_MAJOR} libdes.so.3; +.endif +.if !defined(NOPIC) && ${OBJFORMAT} == elf + @cd ${DESTDIR}${SHLIBDIR}; \ + rm -f libdes.so; \ + ln -sf lib${LIB}.so libdes.so +.endif + @cd ${DESTDIR}${LIBDIR}; \ + rm -f libdes.a; \ + ln -sf lib${LIB}.a libdes.a +.if !defined(NOPROFILE) + @cd ${DESTDIR}${LIBDIR}; \ + rm -f libdes_p.a; \ + ln -sf lib${LIB}_p.a libdes_p.a +.endif diff --git a/secure/lib/librsaglue/Makefile b/secure/lib/librsaglue/Makefile index b374e6b2aef7..e077208cb066 100644 --- a/secure/lib/librsaglue/Makefile +++ b/secure/lib/librsaglue/Makefile @@ -4,14 +4,13 @@ MAINTAINER= kris -.if defined(RSAREF) && ${RSAREF} == YES LIB= RSAglue SHLIB_MAJOR= 1 CFLAGS+= -I${.OBJDIR} # rsaref -SRCS+= rsar_err.c rsaref.c +SRCS+= rsar_err.c rsaref.c rsaref_stubs.c HDRS= asn1/asn1.h asn1/asn1_mac.h bio/bio.h bf/blowfish.h bn/bn.h \ buffer/buffer.h cast/cast.h comp/comp.h conf/conf.h crypto.h \ @@ -43,6 +42,3 @@ headers: .PATH: ${LCRYPTO_SRC}/../rsaref .include -.else -.include -.endif diff --git a/secure/libexec/telnetd/Makefile b/secure/libexec/telnetd/Makefile index e13f48dcad78..53de979f88d2 100644 --- a/secure/libexec/telnetd/Makefile +++ b/secure/libexec/telnetd/Makefile @@ -1,4 +1,4 @@ -# $FreeBSD$ +# $FreeBSD$ # Do not define -DKLUDGELINEMODE, as it does not interact well with many # telnet implementations. @@ -13,9 +13,9 @@ CFLAGS+= -DLINEMODE -DUSE_TERMIO -DDIAGNOSTICS -DOLD_ENVIRON \ SRCS= global.c slc.c state.c sys_term.c telnetd.c \ termstat.c utility.c authenc.c -DPADD= ${LIBUTIL} ${LIBTERMCAP} ${LIBTELNET} ${LIBDES} ${LIBMP} \ +DPADD= ${LIBUTIL} ${LIBTERMCAP} ${LIBTELNET} ${LIBCRYPTO} ${LIBMP} \ ${LIBCRYPT} -LDADD= -lutil -ltermcap -L${TELNETOBJDIR} -ltelnet -ldes -lcrypt -lmp +LDADD= -lutil -ltermcap -L${TELNETOBJDIR} -ltelnet -lcrypto -lcrypt -lmp .include diff --git a/secure/usr.bin/Makefile b/secure/usr.bin/Makefile index 5f431e137aa1..3d284daf8402 100644 --- a/secure/usr.bin/Makefile +++ b/secure/usr.bin/Makefile @@ -1,11 +1,14 @@ # $FreeBSD$ SUBDIR= bdes -.if !defined(NOCRYPT) && !defined(MAKE_KERBEROS4) +.if !defined(NOCRYPT) && !defined(MAKE_KERBEROS4) && !defined(MAKE_KERBEROS5) SUBDIR+=telnet .endif .if !defined(NO_OPENSSL) SUBDIR+=openssl .endif +.if !defined(NO_OPENSSH) +SUBDIR+=scp ssh ssh-add ssh-agent ssh-keygen +.endif .include diff --git a/secure/usr.bin/telnet/Makefile b/secure/usr.bin/telnet/Makefile index f0db4cb8cb28..b59da7accef1 100644 --- a/secure/usr.bin/telnet/Makefile +++ b/secure/usr.bin/telnet/Makefile @@ -1,4 +1,4 @@ -# $FreeBSD$ +# $FreeBSD$ PROG= telnet @@ -9,9 +9,9 @@ CFLAGS+= -DIPSEC -DINET6 SRCS= authenc.c commands.c main.c network.c ring.c sys_bsd.c \ telnet.c terminal.c tn3270.c utilities.c -DPADD= ${LIBTERMCAP} ${LIBTELNET} ${LIBDES} ${LIBCRYPT} ${LIBMP} +DPADD= ${LIBTERMCAP} ${LIBTELNET} ${LIBCRYPTO} ${LIBCRYPT} ${LIBMP} DPADD+= ${LIBIPSEC} -LDADD= -ltermcap -L${TELNETOBJDIR} -ltelnet -ldes -lcrypt -lmp +LDADD= -ltermcap -L${TELNETOBJDIR} -ltelnet -lcrypto -lcrypt -lmp LDADD+= -lipsec .include