From decbc098d78b4476b8dc2e6eb2d3681e5ae96308 Mon Sep 17 00:00:00 2001
From: Sascha Wildner <saw@online.de>
Date: Fri, 2 Feb 2018 15:26:03 +0100
Subject: [PATCH] Normalize libcrypto and libssl DPADD variable names.

---
 Makefile.ssh.common                    | 2 +-
 bin/csh/Makefile                       | 2 +-
 bin/ed/Makefile                        | 2 +-
 contrib/bmake/mk/mk-files.txt          | 4 ++--
 games/Makefile.inc                     | 2 +-
 gnu/sbin/cryptsetup/Makefile           | 2 +-
 lib/libarchive/Makefile                | 2 +-
 lib/libfetch/Makefile                  | 2 +-
 lib/libopie/Makefile                   | 2 +-
 lib/libpam/modules/pam_ssh/Makefile    | 2 +-
 lib/libradius/Makefile                 | 2 +-
 lib/libressl/Makefile                  | 2 +-
 libexec/dma/dma/Makefile               | 2 +-
 libexec/telnetd/Makefile               | 2 +-
 sbin/cryptdisks/Makefile               | 2 +-
 sbin/hammer/Makefile                   | 2 +-
 sbin/hammer2/Makefile                  | 2 +-
 sbin/init/Makefile                     | 2 +-
 sbin/iscontrol/Makefile                | 2 +-
 sbin/md5/Makefile                      | 2 +-
 sbin/ping6/Makefile                    | 2 +-
 sbin/tcplay/Makefile                   | 2 +-
 share/mk/bsd.libnames.mk               | 8 +++-----
 tools/tools/net80211/w00t/Makefile.inc | 2 +-
 usr.bin/bdes/Makefile                  | 2 +-
 usr.bin/chkey/Makefile                 | 2 +-
 usr.bin/cpio/Makefile                  | 2 +-
 usr.bin/dc/Makefile                    | 2 +-
 usr.bin/drill/Makefile                 | 2 +-
 usr.bin/fetch/Makefile                 | 2 +-
 usr.bin/ftp/Makefile                   | 2 +-
 usr.bin/nc/Makefile                    | 2 +-
 usr.bin/newkey/Makefile                | 2 +-
 usr.bin/openssl/Makefile               | 2 +-
 usr.bin/opiekey/Makefile               | 2 +-
 usr.bin/opiepasswd/Makefile            | 2 +-
 usr.bin/tar/Makefile                   | 2 +-
 usr.bin/telnet/Makefile                | 2 +-
 usr.sbin/802_11/Makefile.crypto        | 2 +-
 usr.sbin/keyserv/Makefile              | 2 +-
 usr.sbin/mtree/Makefile                | 2 +-
 usr.sbin/ppp/Makefile                  | 4 ++--
 usr.sbin/tcpdump/Makefile              | 2 +-
 usr.sbin/uefisign/Makefile             | 2 +-
 44 files changed, 48 insertions(+), 50 deletions(-)

diff --git a/Makefile.ssh.common b/Makefile.ssh.common
index 57fa440a1f..9794f7a581 100644
--- a/Makefile.ssh.common
+++ b/Makefile.ssh.common
@@ -19,7 +19,7 @@ CFLAGS+=	-I${SSHC_SYSDIR}/crypto/libressl/include
 CFLAGS+=	-I${SSHC_SYSDIR}/lib/libssh -I${SSHDIR}
 
 .if ${.CURDIR:T} != "libssh"
-DPADD+=		${LIBSSH} ${LIBRECRYPTO} ${LIBUTIL} ${LIBZ} ${LIBPTHREAD}
+DPADD+=		${LIBSSH} ${LIBCRYPTO} ${LIBUTIL} ${LIBZ} ${LIBPTHREAD}
 LDADD+=		-lprivate_ssh -lprivate_crypto -lutil -lz -lpthread
 LDFLAGS+=	-rpath /usr/lib/priv ${PRIVATELIB_LDFLAGS}
 .endif
diff --git a/bin/csh/Makefile b/bin/csh/Makefile
index c0d65be147..3d8406ca68 100644
--- a/bin/csh/Makefile
+++ b/bin/csh/Makefile
@@ -36,7 +36,7 @@ MLINKS= csh.1 tcsh.1
 # utilities of the same name are handled with the associated manpage,
 # builtin.1 in share/man/man1/.
 
-DPADD=	${LIBNCURSES} ${LIBCRYPT} ${LIBRECRYPTO}
+DPADD=	${LIBNCURSES} ${LIBCRYPT} ${LIBCRYPTO}
 LDADD=	-lprivate_ncurses -lcrypt -lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 
diff --git a/bin/ed/Makefile b/bin/ed/Makefile
index f145520c18..e2f157e480 100644
--- a/bin/ed/Makefile
+++ b/bin/ed/Makefile
@@ -7,7 +7,7 @@ LINKS=	${BINDIR}/ed ${BINDIR}/red
 MLINKS=	ed.1 red.1
 
 CFLAGS+=	-DDES -I${.CURDIR}/../../crypto/libressl/include
-DPADD=		${LIBRECRYPTO}
+DPADD=		${LIBCRYPTO}
 LDADD=		-lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 
diff --git a/contrib/bmake/mk/mk-files.txt b/contrib/bmake/mk/mk-files.txt
index b0a7e94dcb..be87ae3738 100644
--- a/contrib/bmake/mk/mk-files.txt
+++ b/contrib/bmake/mk/mk-files.txt
@@ -290,11 +290,11 @@ that need to be linked.   We prefer use of ``DPLIBS`` but the more
 traditional ``DPADD`` and ``LDADD`` work just as well.
 That is::
 
-	DPLIBS += ${LIBRECRYPTO}
+	DPLIBS += ${LIBCRYPTO}
 
 is equivalent to::
 
-	DPADD += ${LIBRECRYPTO}
+	DPADD += ${LIBCRYPTO}
 	LDADD += -lprivate_crypto
 
 obj.mk
diff --git a/games/Makefile.inc b/games/Makefile.inc
index 29f259e8e8..1d7d910446 100644
--- a/games/Makefile.inc
+++ b/games/Makefile.inc
@@ -14,7 +14,7 @@ BINMODE=	550
 # Handle libcrypto dependency
 .if defined(GAMESCRYPTO)
 LDADD+=		-lprivate_crypto
-DPADD+=		${LIBRECRYPTO}
+DPADD+=		${LIBCRYPTO}
 CFLAGS+=	-I${_SHLIBDIRPREFIX}/usr/include/priv
 LDFLAGS+=       ${PRIVATELIB_LDFLAGS}
 .endif
diff --git a/gnu/sbin/cryptsetup/Makefile b/gnu/sbin/cryptsetup/Makefile
index 3066d65314..5292c4ff60 100644
--- a/gnu/sbin/cryptsetup/Makefile
+++ b/gnu/sbin/cryptsetup/Makefile
@@ -24,7 +24,7 @@ CFLAGS+=	-I${CRYPTSETUP_SRCDIR} -I${CRYPTSETUP_LIBDIR} \
 DPADD+=		${LIBDM} ${LIBPROP}
 LDADD+=		-ldm -lprop
 
-DPADD+=		${LIBRECRYPTO}
+DPADD+=		${LIBCRYPTO}
 LDADD+=		-lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../../crypto/libressl/include
diff --git a/lib/libarchive/Makefile b/lib/libarchive/Makefile
index 0f00757db2..0a1296e67b 100644
--- a/lib/libarchive/Makefile
+++ b/lib/libarchive/Makefile
@@ -13,7 +13,7 @@ CFLAGS+=	-I${.OBJDIR} -I${.CURDIR} -I${CONTRIBDIR}
 SHARED_CFLAGS+=	-DHAVE_ICONV=1 -DHAVE_ICONV_H=1
 WARNS?=	2
 
-DPADD=	${LIBBZ2} ${LIBLZMA} ${LIBMD} ${LIBRECRYPTO} ${LIBZ}
+DPADD=	${LIBBZ2} ${LIBLZMA} ${LIBMD} ${LIBCRYPTO} ${LIBZ}
 LDADD=	-lbz2 -llzma -lmd -lprivate_crypto -lz
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
diff --git a/lib/libfetch/Makefile b/lib/libfetch/Makefile
index b591448812..84ca7271ce 100644
--- a/lib/libfetch/Makefile
+++ b/lib/libfetch/Makefile
@@ -11,7 +11,7 @@ CLEANFILES=	ftperr.h httperr.h
 NO_STRICT_ALIASING=
 
 CFLAGS+=	-DWITH_SSL -I${.CURDIR}/../../crypto/libressl/include
-DPADD=		${LIBRESSL} ${LIBRECRYPTO}
+DPADD=		${LIBSSL} ${LIBCRYPTO}
 LDADD=		-lprivate_ssl -lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 
diff --git a/lib/libopie/Makefile b/lib/libopie/Makefile
index 0f53750d9c..15bd0d3549 100644
--- a/lib/libopie/Makefile
+++ b/lib/libopie/Makefile
@@ -30,7 +30,7 @@ ACCESSFILE?=	\"/etc/opieaccess\"
 CFLAGS+=	-DINSECURE_OVERRIDE -DPATH_ACCESS_FILE=${ACCESSFILE}
 
 LDADD+=	-lmd -lprivate_crypto
-DPADD+=	${LIBMD} ${LIBRECRYPTO}
+DPADD+=	${LIBMD} ${LIBCRYPTO}
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
 
diff --git a/lib/libpam/modules/pam_ssh/Makefile b/lib/libpam/modules/pam_ssh/Makefile
index ae257b3f07..46c517980d 100644
--- a/lib/libpam/modules/pam_ssh/Makefile
+++ b/lib/libpam/modules/pam_ssh/Makefile
@@ -4,7 +4,7 @@ MAN=	pam_ssh.8
 WARNS?=	4
 
 LDADD=		-lprivate_ssh -lprivate_crypto -lcrypt
-DPADD=		${LIBSSH} ${LIBRECRYPTO} ${LIBCRYPT}
+DPADD=		${LIBSSH} ${LIBCRYPTO} ${LIBCRYPT}
 
 CFLAGS+=	-I${.CURDIR}/../../../../crypto/openssh
 CFLAGS+=	-I${.CURDIR}/../../../../crypto/libressl/include
diff --git a/lib/libradius/Makefile b/lib/libradius/Makefile
index 14273df0fc..48fe6d270e 100644
--- a/lib/libradius/Makefile
+++ b/lib/libradius/Makefile
@@ -28,7 +28,7 @@ LIB=		radius
 SRCS=		radlib.c
 INCS=		radlib.h radlib_vs.h
 
-DPADD=		${LIBRECRYPTO}
+DPADD=		${LIBCRYPTO}
 LDADD=		-lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-DWITH_SSL -I${.CURDIR}/../../crypto/libressl/include
diff --git a/lib/libressl/Makefile b/lib/libressl/Makefile
index d351302f44..16801bed55 100644
--- a/lib/libressl/Makefile
+++ b/lib/libressl/Makefile
@@ -24,7 +24,7 @@ INCS=	dtls1.h srtp.h ssl.h ssl2.h ssl23.h ssl3.h tls1.h
 INCSDIR=	${INCLUDEDIR}/priv/openssl
 
 LDADD=		-lprivate_crypto
-DPADD=		${LIBRECRYPTO}
+DPADD=		${LIBCRYPTO}
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 
 .PATH:	${LSSL_SRC} ${LIBRESSL_SRC}/include/openssl
diff --git a/libexec/dma/dma/Makefile b/libexec/dma/dma/Makefile
index 75acef9a31..15b4244975 100644
--- a/libexec/dma/dma/Makefile
+++ b/libexec/dma/dma/Makefile
@@ -10,7 +10,7 @@ CFLAGS+=	-DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME
 CFLAGS+=	-DCONF_PATH='"/etc/dma"'
 CFLAGS+=	-DLIBEXEC_PATH='"/usr/libexec"' -DDMA_VERSION='"v0.9+"'
 
-DPADD=		${LIBRESSL} ${LIBRECRYPTO}
+DPADD=		${LIBSSL} ${LIBCRYPTO}
 LDADD=		-lprivate_ssl -lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../../crypto/libressl/include
diff --git a/libexec/telnetd/Makefile b/libexec/telnetd/Makefile
index a73ebe5a08..cea81ba88a 100644
--- a/libexec/telnetd/Makefile
+++ b/libexec/telnetd/Makefile
@@ -27,7 +27,7 @@ CFLAGS+=	-I${_SHLIBDIRPREFIX}/usr/include/priv/ncurses
 
 CFLAGS+=	-DAUTHENTICATION -DENCRYPTION
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
-DPADD+=		${LIBRECRYPTO} ${LIBCRYPT} ${LIBPAM}
+DPADD+=		${LIBCRYPTO} ${LIBCRYPT} ${LIBPAM}
 LDADD+=		-lprivate_crypto -lcrypt ${MINUSLPAM}
 
 .include <bsd.prog.mk>
diff --git a/sbin/cryptdisks/Makefile b/sbin/cryptdisks/Makefile
index 8651a64e4d..3af45a0ea9 100644
--- a/sbin/cryptdisks/Makefile
+++ b/sbin/cryptdisks/Makefile
@@ -8,7 +8,7 @@ LDADD=		-lcryptsetup -lluks -ldm -ltcplay -lprop -lutil
 DPADD=		${LIBCRYPTSETUP} ${LIBLUKS} ${LIBDM} ${LIBTCPLAY}
 DPADD+=		${LIBPROP} ${LIBUTIL}
 
-DPADD+=		${LIBRECRYPTO}
+DPADD+=		${LIBCRYPTO}
 LDADD+=		-lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
diff --git a/sbin/hammer/Makefile b/sbin/hammer/Makefile
index 2a6fdeebd6..5175f2aa3f 100644
--- a/sbin/hammer/Makefile
+++ b/sbin/hammer/Makefile
@@ -11,7 +11,7 @@ MAN=	hammer.8
 
 CFLAGS+= -I${.CURDIR}/../../sys
 LDADD=	-lm -lutil -lhammer -lprivate_crypto
-DPADD=	${LIBM} ${LIBUTIL} ${LIBHAMMER} ${LIBRECRYPTO}
+DPADD=	${LIBM} ${LIBUTIL} ${LIBHAMMER} ${LIBCRYPTO}
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 
 .PATH: ${.CURDIR}/../../sys/libkern
diff --git a/sbin/hammer2/Makefile b/sbin/hammer2/Makefile
index a647f3c9c9..57249d9166 100644
--- a/sbin/hammer2/Makefile
+++ b/sbin/hammer2/Makefile
@@ -15,7 +15,7 @@ CFLAGS+= -pthread
 LDADD=	-ldmsg -lm -lutil
 DPADD=	${LIBDMSG} ${LIBM} ${LIBUTIL}
 
-DPADD+=		${LIBRECRYPTO}
+DPADD+=		${LIBCRYPTO}
 LDADD+=		-lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
diff --git a/sbin/init/Makefile b/sbin/init/Makefile
index 06ecd58a12..af37e28684 100644
--- a/sbin/init/Makefile
+++ b/sbin/init/Makefile
@@ -10,7 +10,7 @@ INSTALLFLAGS= -b -B.bak
 INSTALLFLAGS+= -fschg
 .endif
 CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT -DSUPPORT_UTMPX
-DPADD=	${LIBUTIL} ${LIBCRYPT} ${LIBRECRYPTO}
+DPADD=	${LIBUTIL} ${LIBCRYPT} ${LIBCRYPTO}
 LDADD=	-lutil -lcrypt -lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 
diff --git a/sbin/iscontrol/Makefile b/sbin/iscontrol/Makefile
index 252033c2c9..314ecbbc73 100644
--- a/sbin/iscontrol/Makefile
+++ b/sbin/iscontrol/Makefile
@@ -2,7 +2,7 @@
 
 SRCS= iscontrol.c pdu.c fsm.c config.c login.c auth_subr.c misc.c
 PROG= iscontrol
-DPADD= ${LIBCAM} ${LIBMD} ${LIBRECRYPTO}
+DPADD= ${LIBCAM} ${LIBMD} ${LIBCRYPTO}
 LDADD= -lcam -lmd -lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
diff --git a/sbin/md5/Makefile b/sbin/md5/Makefile
index d5bb7dcb03..243cba9f63 100644
--- a/sbin/md5/Makefile
+++ b/sbin/md5/Makefile
@@ -15,7 +15,7 @@ MLINKS=	md5.1 rmd160.1 \
 	md5.1 sha256.1 \
 	md5.1 sha512.1
 
-DPADD=	${LIBMD} ${LIBRECRYPTO}
+DPADD=	${LIBMD} ${LIBCRYPTO}
 LDADD=	-lmd -lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
diff --git a/sbin/ping6/Makefile b/sbin/ping6/Makefile
index 33328d93ee..50462bca99 100644
--- a/sbin/ping6/Makefile
+++ b/sbin/ping6/Makefile
@@ -9,7 +9,7 @@ BINOWN=	root
 BINMODE=4555
 
 LDADD=	-lipsec -lm -lmd -lprivate_crypto
-DPADD= ${LIBIPSEC} ${LIBM} ${LIBMD} ${LIBRECRYPTO}
+DPADD= ${LIBIPSEC} ${LIBM} ${LIBMD} ${LIBCRYPTO}
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
 NO_STRICT_ALIASING=
diff --git a/sbin/tcplay/Makefile b/sbin/tcplay/Makefile
index 175bd00de0..936ff068c8 100644
--- a/sbin/tcplay/Makefile
+++ b/sbin/tcplay/Makefile
@@ -15,7 +15,7 @@ SRCS+=		main.c
 LDADD=		-ldm -lprop -lutil
 DPADD=		${LIBDM} ${LIBPROP} ${LIBUTIL}
 
-DPADD+=		${LIBRECRYPTO}
+DPADD+=		${LIBCRYPTO}
 LDADD+=		-lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk
index 6402ec6d36..4760495079 100644
--- a/share/mk/bsd.libnames.mk
+++ b/share/mk/bsd.libnames.mk
@@ -19,8 +19,7 @@ LIBCAM?=	${DESTDIR}${LIBDIR}/libcam.a
 LIBCIPHER?=	${DESTDIR}${LIBDIR}/libcipher.a
 LIBCOMPAT?=	${DESTDIR}${LIBDIR}/libcompat.a
 LIBCRYPT?=	${DESTDIR}${LIBDIR}/libcrypt.a
-LIBCRYPTO?=	${DESTDIR}${LIBDIR}/libcrypto.a
-LIBRECRYPTO?=	${DESTDIR}${LIBDIR}/priv/libprivate_crypto.a
+LIBCRYPTO?=	${DESTDIR}${LIBDIR}/priv/libprivate_crypto.a
 LIBCRYPTSETUP?=	${DESTDIR}${LIBDIR}/libcryptsetup.a
 LIBDEVATTR?=	${DESTDIR}${LIBDIR}/libdevattr.a
 LIBDEVINFO?=	${DESTDIR}${LIBDIR}/libdevinfo.a
@@ -66,7 +65,7 @@ MINUSLPAM?=	-lpam
 LIBPAM+=	${LIBSSH}
 MINUSLPAM+=	-lprivate_ssh
 LIBPAM+=	${LIBRADIUS} ${LIBTACPLUS} ${LIBOPIE} ${LIBYPCLNT} \
-		${LIBCRYPT} ${LIBMD} ${LIBRECRYPTO} ${LIBUTIL}
+		${LIBCRYPT} ${LIBMD} ${LIBCRYPTO} ${LIBUTIL}
 MINUSLPAM+=	-lradius -ltacplus -lopie -lypclnt \
 		-lcrypt -lmd -lprivate_crypto -lutil
 LDFLAGSPAM+=	${PRIVATELIB_LDFLAGS}
@@ -85,8 +84,7 @@ LIBSBUF?=	${DESTDIR}${LIBDIR}/libsbuf.a
 LIBSDP?=	${DESTDIR}${LIBDIR}/libsdp.a
 LIBSMB?=	${DESTDIR}${LIBDIR}/libsmb.a
 LIBSSH?=	${DESTDIR}${LIBDIR}/priv/libprivate_ssh.a
-LIBSSL?=	${DESTDIR}${LIBDIR}/libssl.a
-LIBRESSL?=	${DESTDIR}${LIBDIR}/priv/libprivate_ssl.a
+LIBSSL?=	${DESTDIR}${LIBDIR}/priv/libprivate_ssl.a
 LIBSTAND?=	${DESTDIR}${LIBDIR}/libstand.a
 LIBTACPLUS?=	${DESTDIR}${LIBDIR}/libtacplus.a
 LIBTCPLAY?=	${DESTDIR}${LIBDIR}/libtcplay.a
diff --git a/tools/tools/net80211/w00t/Makefile.inc b/tools/tools/net80211/w00t/Makefile.inc
index 929c55fba7..84257f3abe 100644
--- a/tools/tools/net80211/w00t/Makefile.inc
+++ b/tools/tools/net80211/w00t/Makefile.inc
@@ -6,7 +6,7 @@ DPADD=		${W00T}/libw00t.a ${LIBZ}
 LDADD=		-lw00t -lz
 LDFLAGS=	-L${W00T}
 
-DPADD+=		${LIBRECRYPTO}
+DPADD+=		${LIBCRYPTO}
 LDADD+=		-lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../../../../crypto/libressl/include
diff --git a/usr.bin/bdes/Makefile b/usr.bin/bdes/Makefile
index 4df13295c5..fcbd7ef5e8 100644
--- a/usr.bin/bdes/Makefile
+++ b/usr.bin/bdes/Makefile
@@ -5,7 +5,7 @@ PROG=	bdes
 
 WARNS?=	2
 
-DPADD=		${LIBRECRYPTO}
+DPADD=		${LIBCRYPTO}
 LDADD=		-lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
diff --git a/usr.bin/chkey/Makefile b/usr.bin/chkey/Makefile
index ed95fada3d..e4e1f89c5d 100644
--- a/usr.bin/chkey/Makefile
+++ b/usr.bin/chkey/Makefile
@@ -8,7 +8,7 @@ CFLAGS+=-DYP -I${.CURDIR}/../newkey
 DPADD=	${LIBRPCSVC}
 LDADD=	-lrpcsvc
 
-DPADD+=		${LIBRECRYPTO}
+DPADD+=		${LIBCRYPTO}
 LDADD+=		-lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
diff --git a/usr.bin/cpio/Makefile b/usr.bin/cpio/Makefile
index 1044065503..29ddd7be98 100644
--- a/usr.bin/cpio/Makefile
+++ b/usr.bin/cpio/Makefile
@@ -1,7 +1,7 @@
 PROG=	bsdcpio
 SRCS=	cmdline.c cpio.c
 SRCS+=	err.c line_reader.c passphrase.c
-DPADD=	${LIBARCHIVE} ${LIBBZ2} ${LIBLZMA} ${LIBMD} ${LIBRECRYPTO} ${LIBZ}
+DPADD=	${LIBARCHIVE} ${LIBBZ2} ${LIBLZMA} ${LIBMD} ${LIBCRYPTO} ${LIBZ}
 LDADD=	-larchive -lbz2 -llzma -lmd -lprivate_crypto -lz
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 
diff --git a/usr.bin/dc/Makefile b/usr.bin/dc/Makefile
index fe5e2a4e03..63f051cb71 100644
--- a/usr.bin/dc/Makefile
+++ b/usr.bin/dc/Makefile
@@ -4,7 +4,7 @@ PROG=	dc
 SRCS=	dc.c bcode.c inout.c mem.c stack.c
 WARNS?=	2
 
-DPADD=		${LIBRECRYPTO}
+DPADD=		${LIBCRYPTO}
 LDADD=		-lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
diff --git a/usr.bin/drill/Makefile b/usr.bin/drill/Makefile
index f189e94766..8eb24a7623 100644
--- a/usr.bin/drill/Makefile
+++ b/usr.bin/drill/Makefile
@@ -8,7 +8,7 @@ WARNS?= 2
 .PATH:	${.CURDIR}/../../contrib/ldns/drill
 
 LDADD=		-lprivate_ldns -lprivate_crypto
-DPADD=		${LIBLDNS} ${LIBRECRYPTO}
+DPADD=		${LIBLDNS} ${LIBCRYPTO}
 CFLAGS+=	-I${.CURDIR} -I${LDNS} -I${LDNS}/drill -I${LDNSBASE}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
 LDFLAGS+=	-rpath /usr/lib/priv ${PRIVATELIB_LDFLAGS}
diff --git a/usr.bin/fetch/Makefile b/usr.bin/fetch/Makefile
index d7f412cd9f..f0c342d3e6 100644
--- a/usr.bin/fetch/Makefile
+++ b/usr.bin/fetch/Makefile
@@ -4,7 +4,7 @@ PROG=		fetch
 DPADD=		${LIBFETCH}
 LDADD=		-lfetch
 
-DPADD+=		${LIBRESSL} ${LIBRECRYPTO}
+DPADD+=		${LIBSSL} ${LIBCRYPTO}
 LDADD+=		-lprivate_ssl -lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
diff --git a/usr.bin/ftp/Makefile b/usr.bin/ftp/Makefile
index 1c82914475..51a919e7ee 100644
--- a/usr.bin/ftp/Makefile
+++ b/usr.bin/ftp/Makefile
@@ -28,7 +28,7 @@ LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 
 CFLAGS+=	-DWITH_SSL -I${.CURDIR}/../../crypto/libressl/include
 LDADD+=		-lprivate_ssl -lprivate_crypto
-DPADD+=		${LIBRESSL} ${LIBRECRYPTO}
+DPADD+=		${LIBSSL} ${LIBCRYPTO}
 
 LINKS=	${BINDIR}/ftp ${BINDIR}/pftp \
 	${BINDIR}/ftp ${BINDIR}/gate-ftp
diff --git a/usr.bin/nc/Makefile b/usr.bin/nc/Makefile
index 804040c161..9fb7255885 100644
--- a/usr.bin/nc/Makefile
+++ b/usr.bin/nc/Makefile
@@ -20,7 +20,7 @@ CFLAGS+=-DHAVE_ARC4RANDOM_BUF -DHAVE_STRTONUM	\
 	-I${.CURDIR}/../../crypto/libressl/include		\
 	-I${.CURDIR}/../../crypto/libressl/include/compat
 
-DPADD=	${LIBRECRYPTO} ${LIBRESSL}
+DPADD=	${LIBCRYPTO} ${LIBSSL}
 LDADD=	-lprivate_ssl -lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 
diff --git a/usr.bin/newkey/Makefile b/usr.bin/newkey/Makefile
index 6f1ff4d510..5b59c5c6a2 100644
--- a/usr.bin/newkey/Makefile
+++ b/usr.bin/newkey/Makefile
@@ -10,7 +10,7 @@ MAN= newkey.8
 DPADD=	${LIBRPCSVC}
 LDADD=	-lrpcsvc
 
-DPADD+=		${LIBRECRYPTO}
+DPADD+=		${LIBCRYPTO}
 LDADD+=		-lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
diff --git a/usr.bin/openssl/Makefile b/usr.bin/openssl/Makefile
index d84e8d4204..0042011cd4 100644
--- a/usr.bin/openssl/Makefile
+++ b/usr.bin/openssl/Makefile
@@ -5,7 +5,7 @@ WARNS?=	2
 
 .include "${.CURDIR}/../../lib/librecrypto/Makefile.inc"
 
-DPADD+=		${LIBRESSL} ${LIBRECRYPTO}
+DPADD+=		${LIBSSL} ${LIBCRYPTO}
 LDADD+=		-lprivate_ssl -lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
diff --git a/usr.bin/opiekey/Makefile b/usr.bin/opiekey/Makefile
index 955ad5ae0a..e629c6e67e 100644
--- a/usr.bin/opiekey/Makefile
+++ b/usr.bin/opiekey/Makefile
@@ -9,7 +9,7 @@ CFLAGS+=-I${OPIE_DIST}
 CFLAGS+=-DINSECURE_OVERRIDE
 WARNS?=	3
 
-DPADD=	${LIBOPIE} ${LIBMD} ${LIBRECRYPTO}
+DPADD=	${LIBOPIE} ${LIBMD} ${LIBCRYPTO}
 LDADD=	-lopie -lmd -lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 
diff --git a/usr.bin/opiepasswd/Makefile b/usr.bin/opiepasswd/Makefile
index 52c27bf33c..6dd2f38c95 100644
--- a/usr.bin/opiepasswd/Makefile
+++ b/usr.bin/opiepasswd/Makefile
@@ -9,7 +9,7 @@ CFLAGS+=-I${OPIE_DIST}
 CFLAGS+=-DINSECURE_OVERRIDE
 WARNS?=	3
 
-DPADD=	${LIBOPIE} ${LIBMD} ${LIBRECRYPTO}
+DPADD=	${LIBOPIE} ${LIBMD} ${LIBCRYPTO}
 LDADD=	-lopie -lmd -lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 
diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile
index b8d828ef64..3738924a65 100644
--- a/usr.bin/tar/Makefile
+++ b/usr.bin/tar/Makefile
@@ -1,7 +1,7 @@
 PROG=	bsdtar
 SRCS=	bsdtar.c cmdline.c creation_set.c read.c subst.c util.c write.c
 SRCS+=	err.c line_reader.c passphrase.c
-DPADD=	${LIBARCHIVE} ${LIBBZ2} ${LIBLZMA} ${LIBMD} ${LIBRECRYPTO} ${LIBZ}
+DPADD=	${LIBARCHIVE} ${LIBBZ2} ${LIBLZMA} ${LIBMD} ${LIBCRYPTO} ${LIBZ}
 LDADD=	-larchive -lbz2 -llzma -lmd -lprivate_crypto -lz
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 
diff --git a/usr.bin/telnet/Makefile b/usr.bin/telnet/Makefile
index 5cbb6461fa..1d5e9d1307 100644
--- a/usr.bin/telnet/Makefile
+++ b/usr.bin/telnet/Makefile
@@ -26,7 +26,7 @@ DPADD+=		${LIBIPSEC}
 LDADD+=		-lipsec
 
 CFLAGS+=	-DENCRYPTION -DAUTHENTICATION
-DPADD+=		${LIBRECRYPTO} ${LIBCRYPT} ${LIBPAM}
+DPADD+=		${LIBCRYPTO} ${LIBCRYPT} ${LIBPAM}
 LDADD+=		-lprivate_crypto -lcrypt ${MINUSLPAM}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
 
diff --git a/usr.sbin/802_11/Makefile.crypto b/usr.sbin/802_11/Makefile.crypto
index efb909650a..6a16f81176 100644
--- a/usr.sbin/802_11/Makefile.crypto
+++ b/usr.sbin/802_11/Makefile.crypto
@@ -1,7 +1,7 @@
 # $FreeBSD: head/usr.sbin/wpa/Makefile.crypto 252726 2013-07-04 21:12:58Z rpaulo $
 
 SRCS+=		crypto_openssl.c random.c sha1-prf.c sha256-prf.c
-DPADD+=		${LIBRESSL} ${LIBRECRYPTO}
+DPADD+=		${LIBSSL} ${LIBCRYPTO}
 LDADD+=		-lprivate_ssl -lprivate_crypto
 CFLAGS+= 	-DCONFIG_SHA256 -I${.CURDIR}/../../../crypto/libressl/include
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
diff --git a/usr.sbin/keyserv/Makefile b/usr.sbin/keyserv/Makefile
index c1602b40cf..153fe87ae6 100644
--- a/usr.sbin/keyserv/Makefile
+++ b/usr.sbin/keyserv/Makefile
@@ -14,7 +14,7 @@ CFLAGS+= -DKEYSERV_RANDOM -DBROKEN_DES -I.
 DPADD=	${LIBRPCSVC}
 LDADD=	-lrpcsvc
 
-DPADD+=		${LIBRECRYPTO}
+DPADD+=		${LIBCRYPTO}
 LDADD+=		-lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
diff --git a/usr.sbin/mtree/Makefile b/usr.sbin/mtree/Makefile
index 30b2b5466b..0c352936d8 100644
--- a/usr.sbin/mtree/Makefile
+++ b/usr.sbin/mtree/Makefile
@@ -11,7 +11,7 @@ SRCS=	compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c
 .if !defined(BOOTSTRAPPING)
 SRCS+=	sha1hl.c
 CFLAGS+= -DUSE_MD5 -DUSE_SHA1 -DUSE_RMD160
-DPADD=  ${LIBMD} ${LIBRECRYPTO}
+DPADD=  ${LIBMD} ${LIBCRYPTO}
 LDADD=  -lmd -lprivate_crypto
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+= 	-I${.CURDIR}/../../crypto/libressl/include
diff --git a/usr.sbin/ppp/Makefile b/usr.sbin/ppp/Makefile
index e286a28324..28037523d7 100644
--- a/usr.sbin/ppp/Makefile
+++ b/usr.sbin/ppp/Makefile
@@ -59,7 +59,7 @@ CFLAGS+=-DNODES
 .else
 SRCS+=		chap_ms.c mppe.c
 LDADD+= 	-lprivate_crypto
-DPADD+= 	${LIBRECRYPTO}
+DPADD+= 	${LIBCRYPTO}
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
 .endif
@@ -69,7 +69,7 @@ CFLAGS+=-DNORADIUS
 .else
 SRCS+=	radius.c
 LDADD+=	-lradius -lprivate_crypto
-DPADD+= ${LIBRADIUS} ${LIBRECRYPTO}
+DPADD+= ${LIBRADIUS} ${LIBCRYPTO}
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
 .endif
 
diff --git a/usr.sbin/tcpdump/Makefile b/usr.sbin/tcpdump/Makefile
index c267689c1d..e5c220cc61 100644
--- a/usr.sbin/tcpdump/Makefile
+++ b/usr.sbin/tcpdump/Makefile
@@ -51,7 +51,7 @@ CFLAGS+=	-DINET6 -DHAVE_GETNAMEINFO
 
 DPADD=	${LIBL} ${LIBPCAP}
 LDADD=	-ll -lpcap
-DPADD+=		${LIBRECRYPTO}
+DPADD+=		${LIBCRYPTO}
 LDADD+=		-lprivate_crypto
 CFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
 LDFLAGS+=	${PRIVATELIB_LDFLAGS}
diff --git a/usr.sbin/uefisign/Makefile b/usr.sbin/uefisign/Makefile
index a9ab3ac885..15833921b7 100644
--- a/usr.sbin/uefisign/Makefile
+++ b/usr.sbin/uefisign/Makefile
@@ -5,7 +5,7 @@ SRCS=	uefisign.c child.c pe.c
 MAN=	uefisign.8
 
 LDADD=	-lprivate_crypto
-DPADD=	${LIBRECRYPTO}
+DPADD=	${LIBCRYPTO}
 LDFLAGS+= ${PRIVATELIB_LDFLAGS}
 CFLAGS+= -I${.CURDIR}/../../crypto/libressl/include
 
-- 
2.15.1

