switch everyone to openssl.old trunk
authorchristos <christos@NetBSD.org>
Sun, 04 Feb 2018 03:19:51 +0000
branchtrunk
changeset 274957 24b437595f28
parent 274956 3ea87843f2bf
child 274958 0551fb0455d4
switch everyone to openssl.old
crypto/Makefile.openssl
crypto/external/bsd/Makefile
crypto/external/bsd/heimdal/Makefile.inc
crypto/external/bsd/heimdal/lib/libhx509/Makefile
crypto/external/bsd/libsaslc/lib/Makefile
crypto/external/bsd/netpgp/lib/netpgp/Makefile
crypto/external/bsd/netpgp/libpaa/Makefile
crypto/external/bsd/openssh/lib/Makefile
crypto/external/cpl/trousers/lib/libtspi/Makefile
external/bsd/bind/Makefile.inc
external/bsd/fetch/lib/Makefile
external/bsd/libarchive/lib/libarchive/Makefile
external/bsd/libevent/lib/libevent_openssl/Makefile
external/bsd/nsd/Makefile.inc
external/bsd/openldap/lib/libldap/Makefile.libldap
external/bsd/unbound/Makefile.inc
lib/Makefile
lib/libpam/modules/pam_afslog/Makefile
lib/libpam/modules/pam_krb5/Makefile
lib/libpam/modules/pam_ksu/Makefile
lib/libpam/modules/pam_ssh/Makefile
lib/libradius/Makefile
share/mk/bsd.own.mk
--- a/crypto/Makefile.openssl	Sun Feb 04 01:41:05 2018 +0000
+++ b/crypto/Makefile.openssl	Sun Feb 04 03:19:51 2018 +0000
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile.openssl,v 1.10 2009/09/23 04:02:28 tls Exp $
+#	$NetBSD: Makefile.openssl,v 1.11 2018/02/04 03:19:51 christos Exp $
 
 .ifndef _MAKEFILE_OPENSSL_INCLUDED
 _MAKEFILE_OPENSSL_INCLUDED=1
 
 .include <bsd.own.mk>
 
-OPENSSLSRC=	${CRYPTODIST}/external/bsd/openssl/dist
+OPENSSLSRC=	${CRYPTODIST}/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/dist
 CPPFLAGS+=	-DOPENSSLDIR=\"/etc/openssl\"
 CPPFLAGS+=	-DENGINESDIR=\"/usr/lib/openssl\"
 CPPFLAGS+=	-DDSO_DLFCN -DHAVE_DLFCN_H
--- a/crypto/external/bsd/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/crypto/external/bsd/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,7 +1,7 @@
-#	$NetBSD: Makefile,v 1.12 2013/02/12 20:31:14 christos Exp $
+#	$NetBSD: Makefile,v 1.13 2018/02/04 03:19:51 christos Exp $
 
 .include <bsd.own.mk>
 
-SUBDIR+= openssl .WAIT heimdal netpgp .WAIT openssh libsaslc
+SUBDIR+= ${EXTERNAL_OPENSSL_SUBDDIR} .WAIT heimdal netpgp .WAIT openssh libsaslc
 
 .include <bsd.subdir.mk>
--- a/crypto/external/bsd/heimdal/Makefile.inc	Sun Feb 04 01:41:05 2018 +0000
+++ b/crypto/external/bsd/heimdal/Makefile.inc	Sun Feb 04 03:19:51 2018 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile.inc,v 1.3 2014/03/04 21:08:08 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.4 2018/02/04 03:19:51 christos Exp $
 
 HEIMBASE?=	${NETBSDSRCDIR}/crypto/external/bsd/heimdal
 HEIMDIST=	${HEIMBASE}/dist
 
-SSLBASE?=	${NETBSDSRCDIR}/crypto/external/bsd/openssl
+SSLBASE?=	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}
 
 LIBVERSDIR!=	cd ${HEIMBASE}/lib/libvers && ${PRINTOBJDIR}
 LIBVERS=	${LIBVERSDIR}/libvers.a
--- a/crypto/external/bsd/heimdal/lib/libhx509/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/crypto/external/bsd/heimdal/lib/libhx509/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2017/01/28 21:31:52 christos Exp $
+# $NetBSD: Makefile,v 1.6 2018/02/04 03:19:51 christos Exp $
 
 NOLINT=		# defined
 
@@ -9,7 +9,7 @@
 
 LIB=		hx509
 
-SSLBASE=	${NETBSDSRCDIR}/crypto/external/bsd/openssl
+SSLBASE=	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}
 
 LIBDPLIBS+=	asn1	${HEIMBASE}/lib/libasn1		\
 		com_err	${HEIMBASE}/lib/libcom_err	\
--- a/crypto/external/bsd/libsaslc/lib/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/crypto/external/bsd/libsaslc/lib/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2013/09/11 23:04:09 joerg Exp $
+# $NetBSD: Makefile,v 1.9 2018/02/04 03:19:52 christos Exp $
 
 .include <bsd.own.mk>
 
@@ -54,8 +54,8 @@
 INCS+= saslc.h
 INCSDIR=/usr/include
 
-LIBDPLIBS+= crypto ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
-LIBDPLIBS+= ssl ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libssl
+LIBDPLIBS+= crypto ${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto
+LIBDPLIBS+= ssl ${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libssl
 .if (${MKKERBEROS} != "no")
 LIBDPLIBS+= gssapi ${NETBSDSRCDIR}/crypto/external/bsd/heimdal/lib/libgssapi
 .endif
--- a/crypto/external/bsd/netpgp/lib/netpgp/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/crypto/external/bsd/netpgp/lib/netpgp/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2014/12/05 04:52:02 agc Exp $
+# $NetBSD: Makefile,v 1.3 2018/02/04 03:19:52 christos Exp $
 
 .include <bsd.own.mk>
 
@@ -20,7 +20,7 @@
 INCS+= netpgp.h
 INCSDIR=/usr/include
 
-OPENSSL=${NETBSDSRCDIR}/crypto/external/bsd/openssl
+OPENSSL=${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}
 LIBDPLIBS+=	mj		${.CURDIR}/../../libmj
 LIBDPLIBS+=	crypto		${OPENSSL}/lib/libcrypto
 LIBDPLIBS+=	z		${NETBSDSRCDIR}/lib/libz
--- a/crypto/external/bsd/netpgp/libpaa/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/crypto/external/bsd/netpgp/libpaa/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2012/07/10 19:38:17 christos Exp $
+#	$NetBSD: Makefile,v 1.3 2018/02/04 03:19:52 christos Exp $
 
 .include <bsd.own.mk>
 
@@ -11,7 +11,7 @@
 
 LIBDPLIBS+=	mj	${.CURDIR}/../libmj
 LIBDPLIBS+=	netpgp	${.CURDIR}/../lib
-LIBDPLIBS+=	crypto	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
+LIBDPLIBS+=	crypto	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto
 LIBDPLIBS+=	z	${NETBSDSRCDIR}/lib/libz
 LIBDPLIBS+=	bz2	${NETBSDSRCDIR}/lib/libbz2
 
--- a/crypto/external/bsd/openssh/lib/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/crypto/external/bsd/openssh/lib/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.23 2017/10/07 21:14:59 christos Exp $
+#	$NetBSD: Makefile,v 1.24 2018/02/04 03:19:52 christos Exp $
 
 .include <bsd.own.mk>
 
@@ -101,7 +101,7 @@
 CPPFLAGS+=	-I${SSHDIST}
 .PATH:		${SSHDIST}
 
-LIBDPLIBS+=	crypto	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto \
+LIBDPLIBS+=	crypto	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto \
 		crypt	${NETBSDSRCDIR}/lib/libcrypt \
 		z	${NETBSDSRCDIR}/lib/libz
 
--- a/crypto/external/cpl/trousers/lib/libtspi/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/crypto/external/cpl/trousers/lib/libtspi/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2012/01/28 02:15:26 christos Exp $
+# $NetBSD: Makefile,v 1.2 2018/02/04 03:19:52 christos Exp $
 .include "../Makefile.inc"
 
 CPPFLAGS+=-DAPPID=\"TSPI\" -DVAR_PREFIX=\"/var\" -DETC_PREFIX=\"/etc\"
@@ -18,12 +18,12 @@
 
 TSPI=${DIST}/src/tspi 
 TRSPI=${DIST}/src/trspi 
-.PATH.c: ${TSPI} ${TSPI}/rpc ${TSPI}/rpc/tcstp ${TSPI}/ps ${TRSPI} ${TRSPI}/crypto/openssl
+.PATH.c: ${TSPI} ${TSPI}/rpc ${TSPI}/rpc/tcstp ${TSPI}/ps ${TRSPI} ${TRSPI}/crypto/${EXTERNAL_OPENSSL_SUBDIR}
 
 SHLIB_MAJOR=3
 SHLIB_MINOR=0
 
-LIBDPLIBS+=	crypto	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
+LIBDPLIBS+=	crypto	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto
 LIB=tspi
 SRCS=\
 hosttable.c \
--- a/external/bsd/bind/Makefile.inc	Sun Feb 04 01:41:05 2018 +0000
+++ b/external/bsd/bind/Makefile.inc	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.27 2017/09/04 19:57:53 snj Exp $
+#	$NetBSD: Makefile.inc,v 1.28 2018/02/04 03:19:52 christos Exp $
 
 .if !defined(BIND9_MAKEFILE_INC)
 BIND9_MAKEFILE_INC=yes
@@ -107,11 +107,7 @@
 LDADD+= -lcrypto -lcrypt
 DPADD+= ${LIBCRYPTO} ${LIBCRYPT}
 .else
-.if exists(${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto)
-LIBDPLIBS+=	crypto ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
-.else
-LIBDPLIBS+=	crypto ${NETBSDSRCDIR}/lib/libcrypto
-.endif
+LIBDPLIBS+=	crypto ${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto
 .endif
 .endif
 
--- a/external/bsd/fetch/lib/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/external/bsd/fetch/lib/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2017/05/21 15:28:39 riastradh Exp $
+# $NetBSD: Makefile,v 1.11 2018/02/04 03:19:52 christos Exp $
 
 LIB=		fetch
 SRCS=		fetch.c common.c ftp.c http.c file.c
@@ -17,8 +17,8 @@
 
 CPPFLAGS+=	-DWITH_SSL
 
-LIBDPLIBS+=	ssl	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libssl \
-		crypto	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
+LIBDPLIBS+=	ssl	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libssl \
+		crypto	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto
 
 CLEANFILES+=	ftperr.h httperr.h
 
--- a/external/bsd/libarchive/lib/libarchive/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/external/bsd/libarchive/lib/libarchive/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2017/05/21 22:32:56 kamil Exp $
+#	$NetBSD: Makefile,v 1.8 2018/02/04 03:19:52 christos Exp $
 
 .include <bsd.init.mk>
 
@@ -8,7 +8,7 @@
 
 
 LIBDPLIBS+=	bz2	${NETBSDSRCDIR}/lib/libbz2 \
-		crypto	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto \
+		crypto	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto \
 		expat	${NETBSDSRCDIR}/external/mit/expat/lib/libexpat \
 		lzma	${NETBSDSRCDIR}/external/public-domain/xz/lib \
 		z	${NETBSDSRCDIR}/lib/libz
--- a/external/bsd/libevent/lib/libevent_openssl/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/external/bsd/libevent/lib/libevent_openssl/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2013/09/11 23:04:10 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2018/02/04 03:19:52 christos Exp $
 
 .include <bsd.own.mk>
 
@@ -9,7 +9,7 @@
 
 LIBDPLIBS+= \
 	event	${.CURDIR}/../libevent \
-	crypto	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto \
-	ssl	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libssl
+	crypto	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto \
+	ssl	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libssl
 
 .include <bsd.lib.mk>
--- a/external/bsd/nsd/Makefile.inc	Sun Feb 04 01:41:05 2018 +0000
+++ b/external/bsd/nsd/Makefile.inc	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.2 2017/07/12 12:55:41 christos Exp $
+# $NetBSD: Makefile.inc,v 1.3 2018/02/04 03:19:52 christos Exp $
 
 .include <bsd.own.mk>
 
@@ -15,8 +15,8 @@
 .endif
 
 DPLIBS+= event ${NETBSDSRCDIR}/external/bsd/libevent/lib/libevent
-DPLIBS+= ssl ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libssl
-DPLIBS+= crypto ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
+DPLIBS+= ssl ${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libssl
+DPLIBS+= crypto ${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto
 DPLIBS+= crypt ${NETBSDSRCDIR}/lib/libcrypt
 DPLIBS+= util ${NETBSDSRCDIR}/lib/libutil
 DPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
--- a/external/bsd/openldap/lib/libldap/Makefile.libldap	Sun Feb 04 01:41:05 2018 +0000
+++ b/external/bsd/openldap/lib/libldap/Makefile.libldap	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.libldap,v 1.8 2017/05/21 15:28:39 riastradh Exp $
+#	$NetBSD: Makefile.libldap,v 1.9 2018/02/04 03:19:52 christos Exp $
 
 .include "../../openldap.mk"
 
@@ -23,5 +23,5 @@
 
 LIBDPLIBS+=	lber	${.CURDIR}/../liblber
 
-LIBDPLIBS+=	crypto	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
-LIBDPLIBS+=	ssl	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libssl
+LIBDPLIBS+=	crypto	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto
+LIBDPLIBS+=	ssl	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libssl
--- a/external/bsd/unbound/Makefile.inc	Sun Feb 04 01:41:05 2018 +0000
+++ b/external/bsd/unbound/Makefile.inc	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.3 2017/03/14 21:11:12 roy Exp $
+# $NetBSD: Makefile.inc,v 1.4 2018/02/04 03:19:53 christos Exp $
 
 USE_FORT?= yes  # network client/server
 UNBOUND:=${.PARSEDIR}/dist
@@ -7,8 +7,8 @@
 
 CPPFLAGS += -D_OPENBSD_SOURCE
 
-DPLIBS+= ssl ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libssl
-DPLIBS+= crypto ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
+DPLIBS+= ssl ${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libssl
+DPLIBS+= crypto ${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto
 DPLIBS+= crypt ${NETBSDSRCDIR}/lib/libcrypt
 DPLIBS+= util ${NETBSDSRCDIR}/lib/libutil
 DPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
--- a/lib/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/lib/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.253 2017/10/10 19:28:33 christos Exp $
+#	$NetBSD: Makefile,v 1.254 2018/02/04 03:19:53 christos Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include <bsd.own.mk>
@@ -133,7 +133,7 @@
 SUBDIR+=	libnpf		# depends on libprop
 .endif
 
-SUBDIR+=	../crypto/external/bsd/openssl/lib # depends on libcrypt
+SUBDIR+=	../crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib # depends on libcrypt
 SUBDIR+=	../external/bsd/file/lib	# depends on libz
 
 .if (${MKISCSI} != "no")
--- a/lib/libpam/modules/pam_afslog/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/lib/libpam/modules/pam_afslog/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2011/04/15 18:05:45 elric Exp $
+# $NetBSD: Makefile,v 1.7 2018/02/04 03:19:53 christos Exp $
 
 LIB=	pam_afslog
 SRCS=	pam_afslog.c
@@ -11,6 +11,6 @@
 	roken	${NETBSDSRCDIR}/crypto/external/bsd/heimdal/lib/libroken \
 	com_err	${NETBSDSRCDIR}/crypto/external/bsd/heimdal/lib/libcom_err \
 	crypt	${.CURDIR}/../../../libcrypt \
-	crypto	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
+	crypto	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto
 
 .include "${.CURDIR}/../mod.mk"
--- a/lib/libpam/modules/pam_krb5/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/lib/libpam/modules/pam_krb5/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2011/05/26 12:56:30 joerg Exp $
+# $NetBSD: Makefile,v 1.12 2018/02/04 03:19:53 christos Exp $
 # Copyright 2001 FreeBSD, Inc.
 # All rights reserved.
 #
@@ -35,7 +35,7 @@
 	roken	${NETBSDSRCDIR}/crypto/external/bsd/heimdal/lib/libroken \
 	com_err	${NETBSDSRCDIR}/crypto/external/bsd/heimdal/lib/libcom_err \
 	crypt	${.CURDIR}/../../../libcrypt \
-	crypto	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
+	crypto	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto
 
 CWARNFLAGS.clang=	-Wno-format-security
 
--- a/lib/libpam/modules/pam_ksu/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/lib/libpam/modules/pam_ksu/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2011/05/26 12:56:30 joerg Exp $
+# $NetBSD: Makefile,v 1.12 2018/02/04 03:19:53 christos Exp $
 # Copyright 2002 FreeBSD, Inc.
 # All rights reserved.
 #
@@ -35,7 +35,7 @@
 	roken	${NETBSDSRCDIR}/crypto/external/bsd/heimdal/lib/libroken \
 	com_err	${NETBSDSRCDIR}/crypto/external/bsd/heimdal/lib/libcom_err \
 	crypt	${.CURDIR}/../../../libcrypt \
-	crypto	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
+	crypto	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto
 
 CWARNFLAGS.clang=	-Wno-format-security
 
--- a/lib/libpam/modules/pam_ssh/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/lib/libpam/modules/pam_ssh/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2009/07/20 18:01:41 christos Exp $
+# $NetBSD: Makefile,v 1.11 2018/02/04 03:19:53 christos Exp $
 # PAM module for SSH
 # $FreeBSD: src/lib/libpam/modules/pam_ssh/Makefile,v 1.18 2004/08/06 07:27:04 cperciva Exp $
 
@@ -18,6 +18,6 @@
 
 LIBDPLIBS+=	ssh	${NETBSDSRCDIR}/crypto/external/bsd/openssh/lib \
 		crypt	${.CURDIR}/../../../libcrypt \
-		crypto	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
+		crypto	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto
 
 .include "${.CURDIR}/../mod.mk"
--- a/lib/libradius/Makefile	Sun Feb 04 01:41:05 2018 +0000
+++ b/lib/libradius/Makefile	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2017/05/21 15:28:41 riastradh Exp $
+# $NetBSD: Makefile,v 1.13 2018/02/04 03:19:53 christos Exp $
 
 USE_FORT?= yes	# network protocol library
 
@@ -12,7 +12,7 @@
 CPPFLAGS+=	-I.
 
 CPPFLAGS+=	-DWITH_SSL
-LIBDPLIBS+=crypto ${.CURDIR}/../../crypto/external/bsd/openssl/lib/libcrypto
+LIBDPLIBS+=crypto ${.CURDIR}/../../crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto
 
 SRCS=	radlib.c
 INCS=	radlib.h radlib_vs.h
--- a/share/mk/bsd.own.mk	Sun Feb 04 01:41:05 2018 +0000
+++ b/share/mk/bsd.own.mk	Sun Feb 04 03:19:51 2018 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1030 2018/02/02 01:02:41 mrg Exp $
+#	$NetBSD: bsd.own.mk,v 1.1031 2018/02/04 03:19:53 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -91,6 +91,23 @@
 MKGCCCMDS?=	no
 .endif
 
+#
+# What OpenSSL is used?
+# 
+.if ${MACHINE} == "amd64"
+HAVE_OPENSSL?=  10
+.else
+HAVE_OPENSSL?=  10
+.endif
+
+.if ${HAVE_OPENSSL} == 11
+EXTERNAL_OPENSSL_SUBDIR=openssl
+.elif ${HAVE_OPENSSL} == 10
+EXTERNAL_OPENSSL_SUBDIR=openssl.old
+.else
+EXTERNAL_OPENSSL_SUBDIR=/does/not/exist
+.endif
+
 .if !empty(MACHINE_ARCH:Mearm*)
 _LIBC_COMPILER_RT.${MACHINE_ARCH}=	yes
 .endif