diff --git a/Makefile.inc1 b/Makefile.inc1 index 0139ca87526..2a5deb0378b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1104,6 +1104,7 @@ _cross-tools: @echo "--------------------------------------------------------------" @echo ">>> stage 3: cross tools" @echo "--------------------------------------------------------------" + mkdir -p ${WORLDTMP}/usr/include/private/openssl @rm -f ${OBJTOP}/toolchain-metadata.mk ${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools ${_+_}cd ${.CURDIR}; ${XMAKE} kernel-tools @@ -2082,7 +2083,7 @@ legacy: .PHONY false .endif -.for _tool in tools/build ${_config_deps} +.for _tool in tools/build ${_config_deps} ${_secure_lib_libcrypto} ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \ cd ${.CURDIR}/${_tool}; \ if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ @@ -2374,6 +2375,7 @@ bootstrap-tools: ${_bt}-links .PHONY # Try to bound the building of the bootstrap-tool to just the # FreeBSD versions that need the tool built at this stage of the build. .for _tool in \ + ${_secure_lib_libcrypto} \ ${_clang_tblgen} \ ${_kerberos5_bootstrap_tools} \ ${_strfile} \ @@ -2544,6 +2546,7 @@ _ar=usr.bin/ar cross-tools: .MAKE .PHONY .for _tool in \ ${LOCAL_XTOOL_DIRS} \ + ${_secure_lib_libcrypto} \ ${_ar} \ ${_clang_libs} \ ${_clang} \ diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index ca30df6eb48..de500a794a9 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -36,6 +36,20 @@ # xargs -n1 | sort | uniq -d; # done +# 20200229: Update for making ssl libs private +OLD_LIBS+=lib/libcrypto.so.111 +OLD_FILES+=usr/lib/libcrypto.a +OLD_FILES+=usr/lib/libcrypto.so +OLD_FILES+=usr/lib/libssl.a +OLD_FILES+=usr/lib/libssl.so +OLD_LIBS+=usr/lib/libssl.so.111 +OLD_FILES+=usr/lib32/libcrypto.a +OLD_FILES+=usr/lib32/libcrypto.so +OLD_LIBS+=usr/lib32/libcrypto.so.111 +OLD_FILES+=usr/lib32/libssl.a +OLD_FILES+=usr/lib32/libssl.so +OLD_LIBS+=usr/lib32/libssl.so.111 + # 20200220: Upgrade of ncurses, shlib bumped to version 9 OLD_LIBS+=lib/libncurses.so.8 OLD_LIBS+=lib/libncursesw.so.8 diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist index 8433c093ed6..82df5048f8b 100644 --- a/etc/mtree/BSD.include.dist +++ b/etc/mtree/BSD.include.dist @@ -329,8 +329,6 @@ stm .. .. - openssl - .. pcap .. protocols diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 5b136006633..72839f7bd5a 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -25,6 +25,8 @@ .. .. .. + openssl + .. sqlite3 .. ucl diff --git a/kerberos5/usr.bin/krb5-config/Makefile b/kerberos5/usr.bin/krb5-config/Makefile index 5224f7c5450..cc7029ba9db 100644 --- a/kerberos5/usr.bin/krb5-config/Makefile +++ b/kerberos5/usr.bin/krb5-config/Makefile @@ -18,7 +18,7 @@ krb5-config: krb5-config.in -e "s,@includedir@,${INCLUDEDIR},g" \ -e "s,@LIB_crypt@,-lcrypt,g" \ -e "s,@LIB_dbopen@,,g" \ - -e "s,@LIB_hcrypto_appl@,-lcrypto,g" \ + -e "s,@LIB_hcrypto_appl@,-lprivatecrypto,g" \ -e "s,@LIB_pkinit@,-lhx509,g" \ -e "s,@LIB_dlopen@,,g" \ -e "s,@LIB_door_create@,,g" \ diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index 0afb93a38f1..d7af4f55970 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -200,7 +200,7 @@ CRUNCH_LIBS+= ${LDADD_zstd} CRUNCH_PROGS_usr.bin+= tar CRUNCH_LIBS+= -larchive .if ${MK_OPENSSL} != "no" -CRUNCH_LIBS+= -lcrypto +CRUNCH_LIBS+= -lprivatecrypto .endif CRUNCH_LIBS+= -lmd diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index f8325332d6d..11bc4d99823 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -10,6 +10,8 @@ LIB= crypto SHLIB_MAJOR= 111 VERSION_MAP= ${.CURDIR}/Version.map +PRIVATELIB= true + NO_LINT= .include "Makefile.man" @@ -410,7 +412,7 @@ INCS+= ssl3.h sslerr.h stack.h store.h storeerr.h symhacks.h tls1.h ts.h INCS+= tserr.h txt_db.h ui.h uierr.h whrlpool.h x509.h x509_vfy.h x509err.h INCS+= x509v3.h x509v3err.h -INCSDIR= ${INCLUDEDIR}/openssl +INCSDIR= ${INCLUDEDIR}/private/openssl LIBADD= pthread diff --git a/secure/lib/libssl/Makefile b/secure/lib/libssl/Makefile index ce977145043..6e47391d69d 100644 --- a/secure/lib/libssl/Makefile +++ b/secure/lib/libssl/Makefile @@ -4,6 +4,8 @@ LIB= ssl SHLIB_MAJOR= 111 VERSION_MAP= ${.CURDIR}/Version.map +PRIVATELIB= true + NO_LINT= .include "../libcrypto/Makefile.inc" diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk index 0f97e9c29ba..96afe662eb4 100644 --- a/share/mk/bsd.libnames.mk +++ b/share/mk/bsd.libnames.mk @@ -39,7 +39,6 @@ LIBCOMPILER_RT?=${LIBDESTDIR}${LIBDIR_BASE}/libcompiler_rt.a LIBCOM_ERR?= ${LIBDESTDIR}${LIBDIR_BASE}/libcom_err.a LIBCPLUSPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libc++.a LIBCRYPT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcrypt.a -LIBCRYPTO?= ${LIBDESTDIR}${LIBDIR_BASE}/libcrypto.a LIBCTF?= ${LIBDESTDIR}${LIBDIR_BASE}/libctf.a LIBCURSES?= ${LIBDESTDIR}${LIBDIR_BASE}/libcurses.a LIBCUSE?= ${LIBDESTDIR}${LIBDIR_BASE}/libcuse.a @@ -135,7 +134,6 @@ LIBRTLD_DB?= ${LIBDESTDIR}${LIBDIR_BASE}/librtld_db.a LIBSBUF?= ${LIBDESTDIR}${LIBDIR_BASE}/libsbuf.a LIBSDP?= ${LIBDESTDIR}${LIBDIR_BASE}/libsdp.a LIBSMB?= ${LIBDESTDIR}${LIBDIR_BASE}/libsmb.a -LIBSSL?= ${LIBDESTDIR}${LIBDIR_BASE}/libssl.a LIBSSP_NONSHARED?= ${LIBDESTDIR}${LIBDIR_BASE}/libssp_nonshared.a LIBSTATS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstats.a LIBSTDCPLUSPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstdc++.a diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 927958711d8..0dee358afb5 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -27,6 +27,8 @@ _PRIVATELIBS= \ ldns \ sqlite3 \ ssh \ + ssl \ + crypto \ ucl \ unbound \ zstd @@ -87,7 +89,6 @@ _LIBRARIES= \ com_err \ compiler_rt \ crypt \ - crypto \ ctf \ cuse \ cxxrt \ @@ -163,7 +164,6 @@ _LIBRARIES= \ sdp \ sm \ smb \ - ssl \ ssp_nonshared \ stats \ stdthreads \ diff --git a/tools/bsdbox/Makefile b/tools/bsdbox/Makefile index 56ece9d3439..33fca9aa122 100644 --- a/tools/bsdbox/Makefile +++ b/tools/bsdbox/Makefile @@ -104,7 +104,7 @@ CRUNCH_LIBS+= -lm # .include "Makefile.telnetd" .include "Makefile.fs" -CRUNCH_LIBS+= -lcrypto -lssl -lz +CRUNCH_LIBS+= -lprivatecrypto -lprivatessl -lz # the crunchgen build environment .include diff --git a/tools/build/Makefile b/tools/build/Makefile index b815c77061d..3e8ba6ea57e 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -146,6 +146,7 @@ INSTALLDIR_LIST= \ lib/casper \ lib/geom \ usr/include/casper \ + usr/include/private/openssl \ usr/include/private/zstd \ usr/lib \ usr/libexec