Merge commit 'd6bad11a3bf576a29fa54e5741224374f0ac43a6' into master

Upgrade cros_sdk to version 13506.0.0.

BUG=b/170152381
TEST=local presubmit

Signed-off-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Change-Id: I082590713f9536b5382bf863f8a661cfd8f9bd92
diff --git a/dev-libs/libevent/Manifest b/dev-libs/libevent/Manifest
new file mode 100644
index 0000000..1320c60
--- /dev/null
+++ b/dev-libs/libevent/Manifest
@@ -0,0 +1 @@
+DIST libevent-2.1.11.tar.gz 1082234 BLAKE2B c6721589834bff027a8149ee0076e1877fba000d1712a405e20030192d9c81b892d0930bc1a4774650bef4cb08c60ac81b5928dc17346492ae7e4ded2125579a SHA512 9d0517b117f128f4f196b19a810524814bab75fa967d533063aaa619d3cf2dca97b443edd5805b764da2993d8e37caa536dce39f68ffcc2a88d32a89204c2de3
diff --git a/dev-libs/libevent/libevent-2.1.11.ebuild b/dev-libs/libevent/libevent-2.1.11.ebuild
new file mode 100644
index 0000000..2cb506a
--- /dev/null
+++ b/dev-libs/libevent/libevent-2.1.11.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit multilib-minimal
+
+DESCRIPTION="Library to execute a function when a specific event occurs on a file descriptor"
+HOMEPAGE="
+	https://libevent.org/
+	https://github.com/libevent/libevent/
+"
+SRC_URI="
+	https://github.com/${PN}/${PN}/releases/download/release-${PV/_/-}-stable/${P/_/-}-stable.tar.gz -> ${P}.tar.gz
+"
+LICENSE="BSD"
+
+SLOT="0/2.1-7"
+KEYWORDS="*"
+IUSE="debug libressl +ssl static-libs test +threads"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	ssl? (
+		!libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
+		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+	)
+"
+RDEPEND="
+	${DEPEND}
+	!<=dev-libs/9libs-1.0
+"
+MULTILIB_WRAPPED_HEADERS=(
+	/usr/include/event2/event-config.h
+)
+S=${WORKDIR}/${P/_/-}-stable
+
+multilib_src_configure() {
+	# fix out-of-source builds
+	mkdir -p test || die
+
+	ECONF_SOURCE="${S}" \
+	econf \
+		--disable-samples \
+		$(use_enable debug debug-mode) \
+		$(use_enable debug malloc-replacement) \
+		$(use_enable ssl openssl) \
+		$(use_enable static-libs static) \
+		$(use_enable test libevent-regress) \
+		$(use_enable threads thread-support)
+}
+
+src_test() {
+	# The test suite doesn't quite work (see bug #406801 for the latest
+	# installment in a riveting series of reports).
+	:
+	# emake -C test check | tee "${T}"/tests
+}
+
+DOCS=( ChangeLog{,-1.4,-2.0} )
+
+multilib_src_install_all() {
+	einstalldocs
+	find "${ED}" -name '*.la' -delete || die
+}
diff --git a/dev-libs/libevent/metadata.xml b/dev-libs/libevent/metadata.xml
new file mode 100644
index 0000000..78451cc
--- /dev/null
+++ b/dev-libs/libevent/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>jer@gentoo.org</email>
+<name>Jeroen Roovers</name>
+</maintainer>
+<upstream>
+<remote-id type="cpe">cpe:/a:niels_provos:libevent</remote-id>
+<remote-id type="github">libevent/libevent</remote-id>
+<remote-id type="sourceforge">levent</remote-id>
+</upstream>
+<use>
+<flag name="clock-gettime">Disable use of clock_gettime even if it is available</flag>
+<flag name="debug">Support for running in debug mode</flag>
+<flag name="malloc-replacement">Support for replacing the memory management functions</flag>
+<flag name="mbedtls">Support for <pkg>net-libs/mbedtls</pkg> encryption</flag>
+<flag name="ssl">Support for <pkg>dev-libs/openssl</pkg> encryption</flag>
+<flag name="verbose-debug">Support for verbose debug logging</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-libs/libyaml/Manifest b/dev-libs/libyaml/Manifest
index 11ddaac..7ea6967 100644
--- a/dev-libs/libyaml/Manifest
+++ b/dev-libs/libyaml/Manifest
@@ -1 +1 @@
-DIST yaml-0.1.4.tar.gz 471759 RMD160 5051545022ffa4c78e63fed6f3af30f90e931497 SHA1 e0e5e09192ab10a607e3da2970db492118f560f2 SHA256 7bf81554ae5ab2d9b6977da398ea789722e0db75b86bffdaeb4e66d961de6a37
+DIST libyaml-0.2.2.tar.gz 79465 BLAKE2B fd37cac256b40b0c5daa32584d271448e5e1c196a7fa7eeda753fb962c7d916b3c415425170d70db67c3f114b27d03fdd67fb4e380c04027198a601e1bd5a094 SHA512 455494591014a97c4371a1f372ad09f0d6e487e4f1d3419c98e9cd2f16d43a0cf9a0787d7250bebee8b8d400df4626f5acd81e90139e54fa574a66ec84964c06
diff --git a/dev-libs/libyaml/libyaml-0.1.4.ebuild b/dev-libs/libyaml/libyaml-0.1.4.ebuild
deleted file mode 100644
index a08813e..0000000
--- a/dev-libs/libyaml/libyaml-0.1.4.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libyaml/libyaml-0.1.4.ebuild,v 1.10 2012/07/27 12:36:56 grobian Exp $
-
-EAPI=4
-
-inherit eutils autotools-utils
-
-MY_P="${P/lib}"
-
-DESCRIPTION="YAML 1.1 parser and emitter written in C"
-HOMEPAGE="http://pyyaml.org/wiki/LibYAML"
-SRC_URI="http://pyyaml.org/download/${PN}/${MY_P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="*"
-IUSE="doc examples test static-libs"
-
-S="${WORKDIR}/${MY_P}"
-
-DOCS="README"
-
-src_prepare() {
-	# conditionally remove tests
-	if use test; then
-		sed -i -e 's: tests::g' Makefile*
-	fi
-}
-
-src_install() {
-	autotools-utils_src_install
-	use doc && dohtml -r doc/html/.
-	if use examples ; then
-		docompress -x /usr/share/doc/${PF}/examples
-		insinto /usr/share/doc/${PF}/examples
-		doins tests/example-*.c
-	fi
-}
diff --git a/dev-libs/libyaml/libyaml-0.2.2.ebuild b/dev-libs/libyaml/libyaml-0.2.2.ebuild
new file mode 100644
index 0000000..1ad09ff
--- /dev/null
+++ b/dev-libs/libyaml/libyaml-0.2.2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools libtool
+
+DESCRIPTION="YAML 1.1 parser and emitter written in C"
+HOMEPAGE="https://github.com/yaml/libyaml"
+SRC_URI="https://github.com/yaml/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="*"
+IUSE="doc static-libs test"
+RESTRICT="!test? ( test )"
+
+DEPEND="doc? ( app-doc/doxygen )"
+
+src_prepare() {
+	default
+
+	# conditionally remove tests
+	if ! use test; then
+		sed -i -e 's: tests::g' Makefile* || die
+	fi
+
+	elibtoolize  # for FreeMiNT
+	eautoreconf
+}
+
+src_configure() {
+	econf $(use_enable static-libs static)
+}
+
+src_compile() {
+	emake
+	use doc && emake html
+}
+
+src_install() {
+	use doc && HTML_DOCS=( doc/html/. )
+	default
+	find "${D}" -name '*.la' -delete || die
+}
diff --git a/dev-libs/libyaml/metadata.xml b/dev-libs/libyaml/metadata.xml
index 15dcec1..cee379b 100644
--- a/dev-libs/libyaml/metadata.xml
+++ b/dev-libs/libyaml/metadata.xml
@@ -1,12 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-	<maintainer>
-		<email>sbriesen@gentoo.org</email>
-		<name>Stefan Briesenick</name>
+	<maintainer type="person">
+		<email>chutzpah@gentoo.org</email>
+		<name>Patrick McLean</name>
 	</maintainer>
-	<longdescription lang="en">
-		LibYAML is a YAML 1.1 parser and emitter written in C.
-		It's in an early stage of development.
-	</longdescription>
 </pkgmetadata>
diff --git a/dev-python/netifaces/Manifest b/dev-python/netifaces/Manifest
index dd0ec5f..12acf02 100644
--- a/dev-python/netifaces/Manifest
+++ b/dev-python/netifaces/Manifest
@@ -1 +1,2 @@
 DIST netifaces-0.10.6.tar.gz 25166 BLAKE2B ada66ee2c0a20570d97a9375ce6212c9e7a8765d338b70aceb768912a340dadbf93311aa5cc5a23dd3953f98787be41457c60ffd0f8726cfd4955545709019e1 SHA512 2c892062286007a8330c2cddc148ea21d1fd24aec32b5f25b8fe905933c651f8c532596f523f0bb7edb3a143e9a491ec49d60f75efad4407273ac2647b579b1e
+DIST netifaces-0.10.9.tar.gz 28844 BLAKE2B abbe36ef82c5fa70bac60abe4c7bda671f8bc009567dfd38fcf2084bac5b09cbd42cc16c5c8023f3219129892f8def296e3cad8f9241d8c904a9c362c8077aa6 SHA512 8fc593de4d2cbda46a3e2430ede031360f1abfc64d47d00fbec09f3395fd83479bf29d97cb6834b1df06850c9ac2745c9344b6814f34be5975d4d5df98e05e87
diff --git a/dev-python/netifaces/netifaces-0.10.6.ebuild b/dev-python/netifaces/netifaces-0.10.9.ebuild
similarity index 72%
rename from dev-python/netifaces/netifaces-0.10.6.ebuild
rename to dev-python/netifaces/netifaces-0.10.9.ebuild
index a5b662f..fbaa712 100644
--- a/dev-python/netifaces/netifaces-0.10.6.ebuild
+++ b/dev-python/netifaces/netifaces-0.10.9.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} )
+PYTHON_COMPAT=( pypy3 python3_{6,7,8} )
 
 inherit distutils-r1
 
@@ -18,9 +18,5 @@
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="*"
-IUSE=""
-
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-RDEPEND=""
 
 PATCHES=( "${FILESDIR}"/${PN}-0.10.4-remove-osx-fix.patch )
diff --git a/eclass/user-info.eclass b/eclass/user-info.eclass
new file mode 100644
index 0000000..15e9238
--- /dev/null
+++ b/eclass/user-info.eclass
@@ -0,0 +1,158 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: user-info.eclass
+# @MAINTAINER:
+# base-system@gentoo.org (Linux)
+# MichaƂ Górny <mgorny@gentoo.org> (NetBSD)
+# @BLURB: Read-only access to user and group information
+
+if [[ -z ${_USER_INFO_ECLASS} ]]; then
+_USER_INFO_ECLASS=1
+
+# @FUNCTION: egetent
+# @USAGE: <database> <key>
+# @DESCRIPTION:
+# Small wrapper for getent (Linux), nidump (< Mac OS X 10.5),
+# dscl (Mac OS X 10.5), and pw (FreeBSD) used in enewuser()/enewgroup().
+#
+# Supported databases: group passwd
+egetent() {
+	local db=$1 key=$2
+
+	[[ $# -ge 3 ]] && die "usage: egetent <database> <key>"
+
+	case ${db} in
+	passwd|group) ;;
+	*) die "sorry, database '${db}' not yet supported; file a bug" ;;
+	esac
+
+	case ${CHOST} in
+	*-freebsd*|*-dragonfly*)
+		case ${db} in
+		passwd) db="user" ;;
+		*) ;;
+		esac
+
+		# lookup by uid/gid
+		local opts
+		if [[ ${key} == [[:digit:]]* ]] ; then
+			[[ ${db} == "user" ]] && opts="-u" || opts="-g"
+		fi
+
+		pw show ${db} ${opts} "${key}" -q
+		;;
+	*-openbsd*)
+		grep "${key}:\*:" /etc/${db}
+		;;
+	*)
+		# ignore nscd output if we're not running as root
+		type -p nscd >/dev/null && nscd -i "${db}" 2>/dev/null
+		getent "${db}" "${key}"
+		;;
+	esac
+}
+
+# @FUNCTION: egetusername
+# @USAGE: <uid>
+# @DESCRIPTION:
+# Gets the username for given UID.
+egetusername() {
+	[[ $# -eq 1 ]] || die "usage: egetusername <uid>"
+
+	egetent passwd "$1" | cut -d: -f1
+}
+
+# @FUNCTION: egetgroupname
+# @USAGE: <gid>
+# @DESCRIPTION:
+# Gets the group name for given GID.
+egetgroupname() {
+	[[ $# -eq 1 ]] || die "usage: egetgroupname <gid>"
+
+	egetent group "$1" | cut -d: -f1
+}
+
+# @FUNCTION: egethome
+# @USAGE: <user>
+# @DESCRIPTION:
+# Gets the home directory for the specified user.
+egethome() {
+	local pos
+
+	[[ $# -eq 1 ]] || die "usage: egethome <user>"
+
+	case ${CHOST} in
+	*-freebsd*|*-dragonfly*)
+		pos=9
+		;;
+	*)	# Linux, NetBSD, OpenBSD, etc...
+		pos=6
+		;;
+	esac
+
+	egetent passwd "$1" | cut -d: -f${pos}
+}
+
+# @FUNCTION: egetshell
+# @USAGE: <user>
+# @DESCRIPTION:
+# Gets the shell for the specified user.
+egetshell() {
+	local pos
+
+	[[ $# -eq 1 ]] || die "usage: egetshell <user>"
+
+	case ${CHOST} in
+	*-freebsd*|*-dragonfly*)
+		pos=10
+		;;
+	*)	# Linux, NetBSD, OpenBSD, etc...
+		pos=7
+		;;
+	esac
+
+	egetent passwd "$1" | cut -d: -f${pos}
+}
+
+# @FUNCTION: egetcomment
+# @USAGE: <user>
+# @DESCRIPTION:
+# Gets the comment field for the specified user.
+egetcomment() {
+	local pos
+
+	[[ $# -eq 1 ]] || die "usage: egetcomment <user>"
+
+	case ${CHOST} in
+	*-freebsd*|*-dragonfly*)
+		pos=8
+		;;
+	*)	# Linux, NetBSD, OpenBSD, etc...
+		pos=5
+		;;
+	esac
+
+	egetent passwd "$1" | cut -d: -f${pos}
+}
+
+# @FUNCTION: egetgroups
+# @USAGE: <user>
+# @DESCRIPTION:
+# Gets all the groups user belongs to.  The primary group is returned
+# first, then all supplementary groups.  Groups are ','-separated.
+egetgroups() {
+	[[ $# -eq 1 ]] || die "usage: egetgroups <user>"
+
+	local egroups_arr
+	read -r -a egroups_arr < <(id -G -n "$1")
+
+	local g groups=${egroups_arr[0]}
+	# sort supplementary groups to make comparison possible
+	while read -r g; do
+		[[ -n ${g} ]] && groups+=",${g}"
+	done < <(printf '%s\n' "${egroups_arr[@]:1}" | sort)
+	echo "${groups}"
+}
+
+fi
diff --git a/metadata/md5-cache/dev-libs/libevent-2.1.11 b/metadata/md5-cache/dev-libs/libevent-2.1.11
new file mode 100644
index 0000000..879c65c
--- /dev/null
+++ b/metadata/md5-cache/dev-libs/libevent-2.1.11
@@ -0,0 +1,14 @@
+DEFINED_PHASES=compile configure install test
+DEPEND=ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) )
+DESCRIPTION=Library to execute a function when a specific event occurs on a file descriptor
+EAPI=7
+HOMEPAGE=https://libevent.org/ https://github.com/libevent/libevent/
+IUSE=debug libressl +ssl static-libs test +threads abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 abi_arm_32 abi_arm_64
+KEYWORDS=*
+LICENSE=BSD
+RDEPEND=ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) ) !<=dev-libs/9libs-1.0
+RESTRICT=!test? ( test )
+SLOT=0/2.1-7
+SRC_URI=https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz -> libevent-2.1.11.tar.gz
+_eclasses_=multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multilib-build	1979aa0ff4d356d32507ca4650d9f37d	multilib-minimal	8bddda43703ba94d8341f4e247f97566	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=d4488e7a18ad52edd980c36c1748f2d9
diff --git a/metadata/md5-cache/dev-libs/libyaml-0.2.2 b/metadata/md5-cache/dev-libs/libyaml-0.2.2
new file mode 100644
index 0000000..817f312
--- /dev/null
+++ b/metadata/md5-cache/dev-libs/libyaml-0.2.2
@@ -0,0 +1,14 @@
+BDEPEND=>=app-portage/elt-patches-20170815
+DEFINED_PHASES=compile configure install prepare
+DEPEND=doc? ( app-doc/doxygen ) !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
+DESCRIPTION=YAML 1.1 parser and emitter written in C
+EAPI=7
+HOMEPAGE=https://github.com/yaml/libyaml
+IUSE=doc static-libs test
+KEYWORDS=*
+LICENSE=MIT
+RESTRICT=!test? ( test )
+SLOT=0
+SRC_URI=https://github.com/yaml/libyaml/archive/0.2.2.tar.gz -> libyaml-0.2.2.tar.gz
+_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	libtool	f143db5a74ccd9ca28c1234deffede96	multilib	2477ebe553d3e4d2c606191fe6c33602	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=4813101fc2bbab4a1d68db053f3e7a5a
diff --git a/metadata/md5-cache/net-misc/openssh-8.1_p1-r1 b/metadata/md5-cache/net-misc/openssh-8.1_p1-r1
deleted file mode 100644
index 6d5d4d3..0000000
--- a/metadata/md5-cache/net-misc/openssh-8.1_p1-r1
+++ /dev/null
@@ -1,16 +0,0 @@
-BDEPEND=virtual/pkgconfig sys-devel/autoconf >=app-portage/elt-patches-20170815 virtual/pkgconfig
-DEFINED_PHASES=configure install postinst preinst prepare pretend test
-DEPEND=!static? ( audit? ( sys-process/audit ) ldns? ( net-libs/ldns !bindist? ( net-libs/ldns[ecdsa,ssl(+)] ) bindist? ( net-libs/ldns[-ecdsa,ssl(+)] ) ) libedit? ( dev-libs/libedit:= ) sctp? ( net-misc/lksctp-tools ) selinux? ( >=sys-libs/libselinux-1.28 ) ssl? ( !libressl? ( || ( ( >=dev-libs/openssl-1.0.1:0[bindist=] <dev-libs/openssl-1.1.0:0[bindist=] ) >=dev-libs/openssl-1.1.0g:0[bindist=] ) dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) ) >=sys-libs/zlib-1.2.3:= ) pam? ( sys-libs/pam ) kerberos? ( virtual/krb5 ) static? ( audit? ( sys-process/audit[static-libs(+)] ) ldns? ( net-libs/ldns[static-libs(+)] !bindist? ( net-libs/ldns[ecdsa,ssl(+)] ) bindist? ( net-libs/ldns[-ecdsa,ssl(+)] ) ) libedit? ( dev-libs/libedit:=[static-libs(+)] ) sctp? ( net-misc/lksctp-tools[static-libs(+)] ) selinux? ( >=sys-libs/libselinux-1.28[static-libs(+)] ) ssl? ( !libressl? ( || ( ( >=dev-libs/openssl-1.0.1:0[bindist=] <dev-libs/openssl-1.1.0:0[bindist=] ) >=dev-libs/openssl-1.1.0g:0[bindist=] ) dev-libs/openssl:0=[static-libs(+)] ) libressl? ( dev-libs/libressl:0=[static-libs(+)] ) ) >=sys-libs/zlib-1.2.3:=[static-libs(+)] ) virtual/os-headers sys-apps/baselayout !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Port of OpenBSD's free SSH release
-EAPI=7
-HOMEPAGE=https://www.openssh.com/
-IUSE=abi_mips_n32 audit bindist debug hpn kerberos kernel_linux ldns libedit libressl livecd pam +pie sctp selinux +ssl static test X X509 xmss
-KEYWORDS=*
-LICENSE=BSD GPL-2
-RDEPEND=!static? ( audit? ( sys-process/audit ) ldns? ( net-libs/ldns !bindist? ( net-libs/ldns[ecdsa,ssl(+)] ) bindist? ( net-libs/ldns[-ecdsa,ssl(+)] ) ) libedit? ( dev-libs/libedit:= ) sctp? ( net-misc/lksctp-tools ) selinux? ( >=sys-libs/libselinux-1.28 ) ssl? ( !libressl? ( || ( ( >=dev-libs/openssl-1.0.1:0[bindist=] <dev-libs/openssl-1.1.0:0[bindist=] ) >=dev-libs/openssl-1.1.0g:0[bindist=] ) dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) ) >=sys-libs/zlib-1.2.3:= ) pam? ( sys-libs/pam ) kerberos? ( virtual/krb5 ) pam? ( >=sys-auth/pambase-20081028 ) userland_GNU? ( virtual/shadow ) X? ( x11-apps/xauth ) sys-apps/baselayout
-REQUIRED_USE=ldns? ( ssl ) pie? ( !static ) static? ( !kerberos !pam ) X509? ( !sctp ssl ) test? ( ssl )
-RESTRICT=!test? ( test )
-SLOT=0
-SRC_URI=mirror://openbsd/OpenSSH/portable/openssh-8.1p1.tar.gz sctp? ( https://dev.gentoo.org/~chutzpah/dist/openssh/openssh-8.1p1-sctp-1.2.patch.xz ) hpn? ( mirror://sourceforge/hpnssh/HPN-SSH%2014v16%207.8p1/openssh-7_8_P1-hpn-DynWinNoneSwitch-14.16.diff mirror://sourceforge/hpnssh/HPN-SSH%2014v16%207.8p1/openssh-7_8_P1-hpn-AES-CTR-14.16.diff ) X509? ( https://roumenpetrov.info/openssh/x509-12.3/openssh-8.1p1+x509-12.3.diff.gz )
-_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	eutils	06133990e861be0fe60c2b428fd025d9	flag-o-matic	5d5921a298e95441da2f85be419894c0	libtool	f143db5a74ccd9ca28c1234deffede96	multilib	2477ebe553d3e4d2c606191fe6c33602	pam	3f746974e1cc47cabe3bd488c08cdc8e	systemd	71fd8d2065d102753fb9e4d20eaf3e9f	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	user	7c566af8c48023219fd63246e88d6621
-_md5_=984901b41ae162e8fb6e3878d0024707
diff --git a/metadata/md5-cache/net-misc/openssh-8.3_p1-r4 b/metadata/md5-cache/net-misc/openssh-8.3_p1-r4
new file mode 100644
index 0000000..181cc94
--- /dev/null
+++ b/metadata/md5-cache/net-misc/openssh-8.3_p1-r4
@@ -0,0 +1,16 @@
+BDEPEND=virtual/pkgconfig sys-devel/autoconf >=app-portage/elt-patches-20170815 virtual/pkgconfig
+DEFINED_PHASES=configure install postinst preinst prepare pretend test
+DEPEND=acct-group/sshd acct-user/sshd !static? ( audit? ( sys-process/audit ) ldns? ( net-libs/ldns !bindist? ( net-libs/ldns[ecdsa,ssl(+)] ) bindist? ( net-libs/ldns[-ecdsa,ssl(+)] ) ) libedit? ( dev-libs/libedit:= ) sctp? ( net-misc/lksctp-tools ) security-key? ( >=dev-libs/libfido2-1.4.0:= ) selinux? ( >=sys-libs/libselinux-1.28 ) ssl? ( !libressl? ( || ( ( >=dev-libs/openssl-1.0.1:0[bindist=] <dev-libs/openssl-1.1.0:0[bindist=] ) >=dev-libs/openssl-1.1.0g:0[bindist=] ) dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) ) virtual/libcrypt:= >=sys-libs/zlib-1.2.3:= ) pam? ( sys-libs/pam ) kerberos? ( virtual/krb5 ) static? ( audit? ( sys-process/audit[static-libs(+)] ) ldns? ( net-libs/ldns[static-libs(+)] !bindist? ( net-libs/ldns[ecdsa,ssl(+)] ) bindist? ( net-libs/ldns[-ecdsa,ssl(+)] ) ) libedit? ( dev-libs/libedit:=[static-libs(+)] ) sctp? ( net-misc/lksctp-tools[static-libs(+)] ) security-key? ( >=dev-libs/libfido2-1.4.0:=[static-libs(+)] ) selinux? ( >=sys-libs/libselinux-1.28[static-libs(+)] ) ssl? ( !libressl? ( || ( ( >=dev-libs/openssl-1.0.1:0[bindist=] <dev-libs/openssl-1.1.0:0[bindist=] ) >=dev-libs/openssl-1.1.0g:0[bindist=] ) dev-libs/openssl:0=[static-libs(+)] ) libressl? ( dev-libs/libressl:0=[static-libs(+)] ) ) virtual/libcrypt:=[static-libs(+)] >=sys-libs/zlib-1.2.3:=[static-libs(+)] ) virtual/os-headers !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
+DESCRIPTION=Port of OpenBSD's free SSH release
+EAPI=7
+HOMEPAGE=https://www.openssh.com/
+IUSE=abi_mips_n32 audit bindist debug hpn kerberos kernel_linux ldns libedit libressl livecd pam +pie +scp sctp security-key selinux +ssl static test X X509 xmss
+KEYWORDS=*
+LICENSE=BSD GPL-2
+RDEPEND=acct-group/sshd acct-user/sshd !static? ( audit? ( sys-process/audit ) ldns? ( net-libs/ldns !bindist? ( net-libs/ldns[ecdsa,ssl(+)] ) bindist? ( net-libs/ldns[-ecdsa,ssl(+)] ) ) libedit? ( dev-libs/libedit:= ) sctp? ( net-misc/lksctp-tools ) security-key? ( >=dev-libs/libfido2-1.4.0:= ) selinux? ( >=sys-libs/libselinux-1.28 ) ssl? ( !libressl? ( || ( ( >=dev-libs/openssl-1.0.1:0[bindist=] <dev-libs/openssl-1.1.0:0[bindist=] ) >=dev-libs/openssl-1.1.0g:0[bindist=] ) dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) ) virtual/libcrypt:= >=sys-libs/zlib-1.2.3:= ) pam? ( sys-libs/pam ) kerberos? ( virtual/krb5 ) pam? ( >=sys-auth/pambase-20081028 ) userland_GNU? ( !prefix? ( sys-apps/shadow ) ) X? ( x11-apps/xauth )
+REQUIRED_USE=ldns? ( ssl ) pie? ( !static ) static? ( !kerberos !pam ) X509? ( !sctp !security-key ssl !xmss ) xmss? ( || ( ssl libressl ) ) test? ( ssl )
+RESTRICT=!test? ( test )
+SLOT=0
+SRC_URI=mirror://openbsd/OpenSSH/portable/openssh-8.3p1.tar.gz sctp? ( https://dev.gentoo.org/~chutzpah/dist/openssh/openssh-8.3p1-sctp-1.2.patch.xz ) hpn? ( mirror://sourceforge/hpnssh/HPN-SSH%2014v20%208.1p1/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff mirror://sourceforge/hpnssh/HPN-SSH%2014v20%208.1p1/openssh-8_1_P1-hpn-AES-CTR-14.20.diff mirror://sourceforge/hpnssh/HPN-SSH%2014v20%208.1p1/openssh-8_1_P1-hpn-PeakTput-14.20.diff ) X509? ( https://roumenpetrov.info/openssh/x509-12.5.1/openssh-8.3p1+x509-12.5.1.diff.gz )
+_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	eutils	06133990e861be0fe60c2b428fd025d9	flag-o-matic	5d5921a298e95441da2f85be419894c0	libtool	f143db5a74ccd9ca28c1234deffede96	multilib	2477ebe553d3e4d2c606191fe6c33602	pam	3f746974e1cc47cabe3bd488c08cdc8e	systemd	71fd8d2065d102753fb9e4d20eaf3e9f	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	user-info	a2abd4e2f4c3b9b06d64bf1329359a02
+_md5_=9a9ba71ec6abd698d29311a9d36f892f
diff --git a/metadata/md5-cache/net-nds/rpcbind-1.2.5 b/metadata/md5-cache/net-nds/rpcbind-1.2.5
new file mode 100644
index 0000000..ecbee0c
--- /dev/null
+++ b/metadata/md5-cache/net-nds/rpcbind-1.2.5
@@ -0,0 +1,14 @@
+DEFINED_PHASES=configure install prepare
+DEPEND=>=net-libs/libtirpc-0.2.3:= systemd? ( sys-apps/systemd:= ) tcpd? ( sys-apps/tcp-wrappers ) virtual/pkgconfig virtual/pkgconfig
+DESCRIPTION=portmap replacement which supports RPC over various protocols
+EAPI=6
+HOMEPAGE=https://sourceforge.net/projects/rpcbind/
+IUSE=debug remotecalls selinux systemd tcpd warmstarts
+KEYWORDS=*
+LICENSE=BSD
+RDEPEND=>=net-libs/libtirpc-0.2.3:= systemd? ( sys-apps/systemd:= ) tcpd? ( sys-apps/tcp-wrappers ) selinux? ( sec-policy/selinux-rpcbind )
+REQUIRED_USE=systemd? ( warmstarts )
+SLOT=0
+SRC_URI=mirror://sourceforge/rpcbind/rpcbind-1.2.5.tar.bz2
+_eclasses_=multilib	2477ebe553d3e4d2c606191fe6c33602	systemd	71fd8d2065d102753fb9e4d20eaf3e9f	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=9502f806dd134d737842c71f12797b07
diff --git a/net-misc/openssh/Manifest b/net-misc/openssh/Manifest
index 8748152..c1a2e5a 100644
--- a/net-misc/openssh/Manifest
+++ b/net-misc/openssh/Manifest
@@ -1,5 +1,6 @@
-DIST openssh-7_8_P1-hpn-AES-CTR-14.16.diff 29231 BLAKE2B e25877c5e22f674e6db5a0bc107e5daa2509fe762fb14ce7bb2ce9a115e8177a93340c1d19247b6c2c854b7e1f9ae9af9fd932e5fa9c0a6b2ba438cd11a42991 SHA512 1867fb94c29a51294a71a3ec6a299757565a7cda5696118b0b346ed9c78f2c81bb1b888cff5e3418776b2fa277a8f070c5eb9327bb005453e2ffd72d35cdafa7
-DIST openssh-7_8_P1-hpn-DynWinNoneSwitch-14.16.diff 43356 BLAKE2B 776fa140d64a16c339b46a7c773258d2f4fe44e48b16abccad1a8757a51cb6362722fc5f42c39159af12849f5c88cf574de64815085c97157e16653f18d4909b SHA512 53f2752b7aa02719c8dfe0fe0ef16e874101ba2ba87924aa1122cd445ece218ca09c22abaa3377307f25d459579bc28d3854e2402c71b794db65d58cdd1ebc08
-DIST openssh-8.1p1+x509-12.3.diff.gz 689934 BLAKE2B 57a302a25bec1d630b9c36f74ab490e11c97f9bcbaf8f527e46ae7fd5bade19feb3d8853079870b5c08b70a55e289cf4bf7981c11983973fa588841aeb21e650 SHA512 8d7c321423940f5a78a51a25ad5373f5db17a4a8ca7e85041e503998e0823ad22068bc652e907e9f5787858d45ce438a4bba18240fa72e088eb10b903e96b192
-DIST openssh-8.1p1-sctp-1.2.patch.xz 7672 BLAKE2B f1aa0713fcb114d8774bd8d524d106401a9d7c2c73a05fbde200ccbdd2562b3636ddd2d0bc3eae9f04b4d7c729c3dafd814ae8c530a76c4a0190fae71d1edcd2 SHA512 2bffab0bbae5a4c1875e0cc229bfd83d8565bd831309158cd489d8b877556c69b936243888a181bd9ff302e19f2c174156781574294d260b6384c464d003d566
-DIST openssh-8.1p1.tar.gz 1625894 BLAKE2B d525be921a6f49420a58df5ac434d43a0c85e0f6bf8428ecebf04117c50f473185933e6e4485e506ac614f71887a513b9962d7b47969ba785da8e3a38f767322 SHA512 b987ea4ffd4ab0c94110723860273b06ed8ffb4d21cbd99ca144a4722dc55f4bf86f6253d500386b6bee7af50f066e2aa2dd095d50746509a10e11221d39d925
+DIST openssh-8.3p1+x509-12.5.1.diff.gz 803054 BLAKE2B ec88959b4e3328e70d6f136f3d5bebced2e555de3ea40f55c535ca8a30a0eed84d177ad966e5bda46e1fc61d42141b13e96d068f5abfd069ae81b131dfb5a66c SHA512 28166a1a1aeff0c65f36263c0009e82cda81fc8f4efe3d11fabd0312d199a4f935476cf7074fbce68787d2fec0fd42f00fef383bf856a5767ce9d0ca6bbc8ef0
+DIST openssh-8.3p1-sctp-1.2.patch.xz 7668 BLAKE2B abbc65253d842c09a04811bdbafc175c5226996cdd190812b47ce9646853cd5c1b21d733e719b481cce9c7f4dc00894b6d6be732e311850963df23b9dc55a0e6 SHA512 4e0cc1707663f902dfbf331a431325da78759cc757a4aaae33e0c7f64f21830ec805168d8ae4d47a65a20c235fa534679e288f922df2b24655b7d1ee9a3bf014
+DIST openssh-8.3p1.tar.gz 1706358 BLAKE2B 0b53d92caa4a0f4cb40eee671ac889753d320b7c8e44df159a81dd8163c3663f07fa648f5dc506fb27d31893acf9701b997598c50bf204acf54172d72825a4d8 SHA512 b5232f7c85bf59ae2ff9d17b030117012e257e3b8c0d5ac60bb139a85b1fbf298b40f2e04203a2e13ca7273053ed668b9dedd54d3a67a7cb8e8e58c0228c5f40
+DIST openssh-8_1_P1-hpn-AES-CTR-14.20.diff 29935 BLAKE2B 79101c43601e41306c957481c0680a63357d93bededdf12a32229d50acd9c1f46a386cbb91282e9e7d7bb26a9f276f5a675fd2de7662b7cbd073322b172d3bca SHA512 94f011b7e654630e968a378375aa54fa1fde087b4426d0f2225813262e6667a1073814d6a83e9005f97b371c536e462e614bfe726b092ffed8229791592ca221
+DIST openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff 42696 BLAKE2B d8ac7fa1a4e4d1877acdedeaee80172da469b5a62d0aaa43d6ed46c578e7893577b9d563835d89ca2044867fc561ad3f562bf504c025cf4c78421cf3d24397e9 SHA512 768db7cca8839df4441afcb08457d13d32625b31859da527c3d7f1a92d17a4ec81d6987db00879c394bbe59589e57b10bfd98899a167ffed65ab367b1fd08739
+DIST openssh-8_1_P1-hpn-PeakTput-14.20.diff 2012 BLAKE2B e42c43128f1d82b4de1517e6a9219947da03cecb607f1bc45f0728547f17601a6ce2ec819b6434890efd19ceaf4d20cb98183596ab5ee79e104a52cda7db9cdc SHA512 238f9419efd3be80bd700f6ae7e210e522d747c363c4e670364f5191f144ae3aa8d1b1539c0bf87b3de36743aa73e8101c53c0ef1c6472d209569be389e7814d
diff --git a/net-misc/openssh/files/openssh-7.9_p1-hpn-openssl-1.1.patch b/net-misc/openssh/files/openssh-7.9_p1-hpn-openssl-1.1.patch
deleted file mode 100644
index 78b7545..0000000
--- a/net-misc/openssh/files/openssh-7.9_p1-hpn-openssl-1.1.patch
+++ /dev/null
@@ -1,91 +0,0 @@
---- openssh-7.9p1.orig/cipher-ctr-mt.c	2018-10-24 20:48:00.909255466 -0000
-+++ openssh-7.9p1/cipher-ctr-mt.c	2018-10-24 20:48:17.378155144 -0000
-@@ -46,7 +46,7 @@
-
- /*-------------------- TUNABLES --------------------*/
- /* maximum number of threads and queues */
--#define MAX_THREADS      32
-+#define MAX_THREADS      32
- #define MAX_NUMKQ        (MAX_THREADS * 2)
-
- /* Number of pregen threads to use */
-@@ -435,7 +435,7 @@
- 		destp.u += AES_BLOCK_SIZE;
- 		srcp.u += AES_BLOCK_SIZE;
- 		len -= AES_BLOCK_SIZE;
--		ssh_ctr_inc(ctx->iv, AES_BLOCK_SIZE);
-+		ssh_ctr_inc(c->aes_counter, AES_BLOCK_SIZE);
-
- 		/* Increment read index, switch queues on rollover */
- 		if ((ridx = (ridx + 1) % KQLEN) == 0) {
-@@ -481,8 +481,6 @@
- 	/* get the number of cores in the system */
- 	/* if it's not linux it currently defaults to 2 */
- 	/* divide by 2 to get threads for each direction (MODE_IN||MODE_OUT) */
--	/* NB: assigning a float to an int discards the remainder which is */
--	/* acceptable (and wanted) in this case */
- #ifdef __linux__
- 	cipher_threads = sysconf(_SC_NPROCESSORS_ONLN) / 2;
- #endif /*__linux__*/
-@@ -551,16 +550,16 @@
- 	}
-
- 	if (iv != NULL) {
--		memcpy(ctx->iv, iv, AES_BLOCK_SIZE);
-+		memcpy(c->aes_counter, iv, AES_BLOCK_SIZE);
- 		c->state |= HAVE_IV;
- 	}
-
- 	if (c->state == (HAVE_KEY | HAVE_IV)) {
- 		/* Clear queues */
--		memcpy(c->q[0].ctr, ctx->iv, AES_BLOCK_SIZE);
-+		memcpy(c->q[0].ctr, c->aes_counter, AES_BLOCK_SIZE);
- 		c->q[0].qstate = KQINIT;
- 		for (i = 1; i < numkq; i++) {
--			memcpy(c->q[i].ctr, ctx->iv, AES_BLOCK_SIZE);
-+			memcpy(c->q[i].ctr, c->aes_counter, AES_BLOCK_SIZE);
- 			ssh_ctr_add(c->q[i].ctr, i * KQLEN, AES_BLOCK_SIZE);
- 			c->q[i].qstate = KQEMPTY;
- 		}
-@@ -644,8 +643,22 @@
- const EVP_CIPHER *
- evp_aes_ctr_mt(void)
- {
-+# if OPENSSL_VERSION_NUMBER >= 0x10100000UL && !defined(LIBRESSL_VERSION_NUMBER)
-+	static EVP_CIPHER *aes_ctr;
-+	aes_ctr = EVP_CIPHER_meth_new(NID_undef, 16/*block*/, 16/*key*/);
-+	EVP_CIPHER_meth_set_iv_length(aes_ctr, AES_BLOCK_SIZE);
-+	EVP_CIPHER_meth_set_init(aes_ctr, ssh_aes_ctr_init);
-+	EVP_CIPHER_meth_set_cleanup(aes_ctr, ssh_aes_ctr_cleanup);
-+	EVP_CIPHER_meth_set_do_cipher(aes_ctr, ssh_aes_ctr);
-+#  ifndef SSH_OLD_EVP
-+	EVP_CIPHER_meth_set_flags(aes_ctr, EVP_CIPH_CBC_MODE
-+				      | EVP_CIPH_VARIABLE_LENGTH
-+				      | EVP_CIPH_ALWAYS_CALL_INIT
-+				      | EVP_CIPH_CUSTOM_IV);
-+#  endif /*SSH_OLD_EVP*/
-+	return (aes_ctr);
-+# else /*earlier version of openssl*/
- 	static EVP_CIPHER aes_ctr;
--
- 	memset(&aes_ctr, 0, sizeof(EVP_CIPHER));
- 	aes_ctr.nid = NID_undef;
- 	aes_ctr.block_size = AES_BLOCK_SIZE;
-@@ -654,11 +667,12 @@
- 	aes_ctr.init = ssh_aes_ctr_init;
- 	aes_ctr.cleanup = ssh_aes_ctr_cleanup;
- 	aes_ctr.do_cipher = ssh_aes_ctr;
--#ifndef SSH_OLD_EVP
--	aes_ctr.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH |
--	    EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV;
--#endif
--	return &aes_ctr;
-+#  ifndef SSH_OLD_EVP
-+        aes_ctr.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH |
-+		EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV;
-+#  endif /*SSH_OLD_EVP*/
-+        return &aes_ctr;
-+# endif /*OPENSSH_VERSION_NUMBER*/
- }
-
- #endif /* defined(WITH_OPENSSL) */
diff --git a/net-misc/openssh/files/openssh-7.9_p1-hpn-sctp-glue.patch b/net-misc/openssh/files/openssh-7.9_p1-hpn-sctp-glue.patch
deleted file mode 100644
index a7d51ad..0000000
--- a/net-misc/openssh/files/openssh-7.9_p1-hpn-sctp-glue.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- dd/openssh-7_8_P1-hpn-DynWinNoneSwitch-14.16.diff.orig	2018-09-12 18:18:51.851536374 -0700
-+++ dd/openssh-7_8_P1-hpn-DynWinNoneSwitch-14.16.diff	2018-09-12 18:19:01.116475099 -0700
-@@ -1190,14 +1190,3 @@
-  # Example of overriding settings on a per-user basis
-  #Match User anoncvs
-  #	X11Forwarding no
--diff --git a/version.h b/version.h
--index f1bbf00..21a70c2 100644
----- a/version.h
--+++ b/version.h
--@@ -3,4 +3,5 @@
-- #define SSH_VERSION	"OpenSSH_7.8"
-- 
-- #define SSH_PORTABLE	"p1"
---#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
--+#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE SSH_HPN
--+ 
diff --git a/net-misc/openssh/files/openssh-8.0_p1-hpn-14.20-X509-glue.patch b/net-misc/openssh/files/openssh-8.0_p1-hpn-14.20-X509-glue.patch
new file mode 100644
index 0000000..167adfc
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.0_p1-hpn-14.20-X509-glue.patch
@@ -0,0 +1,111 @@
+diff -ur a/openssh-8_1_P1-hpn-AES-CTR-14.20.diff b/openssh-8_1_P1-hpn-AES-CTR-14.20.diff
+--- a/openssh-8_1_P1-hpn-AES-CTR-14.20.diff	2020-02-04 15:49:15.746095444 -0800
++++ b/openssh-8_1_P1-hpn-AES-CTR-14.20.diff	2020-02-04 15:49:54.181853707 -0800
+@@ -4,8 +4,8 @@
+ +++ b/Makefile.in
+ @@ -42,7 +42,7 @@ CC=@CC@
+  LD=@LD@
+- CFLAGS=@CFLAGS@
+- CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
++ CFLAGS=@CFLAGS@ $(CFLAGS_EXTRA)
++ CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ @LDAP_CPPFLAGS@ $(PATHS) @DEFS@
+ -LIBS=@LIBS@
+ +LIBS=@LIBS@ -lpthread
+  K5LIBS=@K5LIBS@
+@@ -803,8 +803,8 @@
+  ssh_packet_set_connection(struct ssh *ssh, int fd_in, int fd_out)
+  {
+  	struct session_state *state;
+--	const struct sshcipher *none = cipher_by_name("none");
+-+	struct sshcipher *none = cipher_by_name("none");
++-	const struct sshcipher *none = cipher_none();
+++	struct sshcipher *none = cipher_none();
+  	int r;
+  
+  	if (none == NULL) {
+@@ -948,9 +948,9 @@
+  	/* Portable-specific options */
+  	sUsePAM,
+ +	sDisableMTAES,
+- 	/* Standard Options */
+- 	sPort, sHostKeyFile, sLoginGraceTime,
+- 	sPermitRootLogin, sLogFacility, sLogLevel,
++ 	/* X.509 Standard Options */
++ 	sHostbasedAlgorithms,
++ 	sPubkeyAlgorithms,
+ @@ -643,6 +647,7 @@ static struct {
+  	{ "trustedusercakeys", sTrustedUserCAKeys, SSHCFG_ALL },
+  	{ "authorizedprincipalsfile", sAuthorizedPrincipalsFile, SSHCFG_ALL },
+diff -ur a/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff b/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff
+--- a/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff	2020-02-04 15:41:42.512910357 -0800
++++ b/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff	2020-02-04 15:56:40.323299499 -0800
+@@ -382,7 +382,7 @@
+ @@ -884,6 +884,10 @@ kex_choose_conf(struct ssh *ssh)
+  	int nenc, nmac, ncomp;
+  	u_int mode, ctos, need, dh_need, authlen;
+- 	int r, first_kex_follows;
++ 	int r, first_kex_follows = 0;
+ +	int auth_flag;
+ +
+ +	auth_flag = packet_authentication_state(ssh);
+@@ -391,8 +391,8 @@
+  	debug2("local %s KEXINIT proposal", kex->server ? "server" : "client");
+  	if ((r = kex_buf2prop(kex->my, NULL, &my)) != 0)
+ @@ -954,6 +958,14 @@ kex_choose_conf(struct ssh *ssh)
+- 			peer[ncomp] = NULL;
+- 			goto out;
++ 			else
++ 				fatal("Pre-authentication none cipher requests are not allowed.");
+  		}
+ +		debug("REQUESTED ENC.NAME is '%s'", newkeys->enc.name);
+ +		if (strcmp(newkeys->enc.name, "none") == 0) {
+@@ -1169,15 +1169,3 @@
+  # Example of overriding settings on a per-user basis
+  #Match User anoncvs
+  #	X11Forwarding no
+-diff --git a/version.h b/version.h
+-index 6b3fadf8..ec1d2e27 100644
+---- a/version.h
+-+++ b/version.h
+-@@ -3,4 +3,6 @@
+- #define SSH_VERSION	"OpenSSH_8.1"
+- 
+- #define SSH_PORTABLE	"p1"
+--#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
+-+#define SSH_HPN         "-hpn14v20"
+-+#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE SSH_HPN
+-+ 
+diff -ur a/openssh-8_1_P1-hpn-PeakTput-14.20.diff b/openssh-8_1_P1-hpn-PeakTput-14.20.diff
+--- a/openssh-8_1_P1-hpn-PeakTput-14.20.diff	2020-02-04 15:41:42.512910357 -0800
++++ b/openssh-8_1_P1-hpn-PeakTput-14.20.diff	2020-02-04 16:02:42.203023609 -0800
+@@ -12,9 +12,9 @@
+  static long stalled;		/* how long we have been stalled */
+  static int bytes_per_second;	/* current speed in bytes per second */
+ @@ -127,6 +129,7 @@ refresh_progress_meter(int force_update)
++ 	off_t bytes_left;
+  	int cur_speed;
+- 	int hours, minutes, seconds;
+- 	int file_len;
++ 	int len;
+ +	off_t delta_pos;
+  
+  	if ((!force_update && !alarm_fired && !win_resized) || !can_output())
+@@ -33,12 +33,12 @@
+ @@ -166,7 +173,7 @@ refresh_progress_meter(int force_update)
+  
+  	/* filename */
+- 	buf[0] = '\0';
+--	file_len = win_size - 36;
+-+	file_len = win_size - 45;
+- 	if (file_len > 0) {
+- 		buf[0] = '\r';
+- 		snmprintf(buf+1, sizeof(buf)-1, &file_len, "%-*s",
++ 	if (win_size > 36) {
++-		int file_len = win_size - 36;
+++		int file_len = win_size - 45;
++ 		snmprintf(buf+1, sizeof(buf)-1, &file_len, "%-*s ",
++ 		    file_len, file);
++ 	}
+ @@ -191,6 +198,15 @@ refresh_progress_meter(int force_update)
+  	    (off_t)bytes_per_second);
+  	strlcat(buf, "/s ", win_size);
diff --git a/net-misc/openssh/files/openssh-8.0_p1-hpn-X509-glue.patch b/net-misc/openssh/files/openssh-8.0_p1-hpn-X509-glue.patch
deleted file mode 100644
index 2a9d3bd..0000000
--- a/net-misc/openssh/files/openssh-8.0_p1-hpn-X509-glue.patch
+++ /dev/null
@@ -1,114 +0,0 @@
---- a/openssh-7_8_P1-hpn-DynWinNoneSwitch-14.16.diff	2019-04-18 17:07:59.413376785 -0700
-+++ b/openssh-7_8_P1-hpn-DynWinNoneSwitch-14.16.diff	2019-04-18 20:05:12.622588051 -0700
-@@ -382,7 +382,7 @@
- @@ -822,6 +822,10 @@ kex_choose_conf(struct ssh *ssh)
-  	int nenc, nmac, ncomp;
-  	u_int mode, ctos, need, dh_need, authlen;
-- 	int r, first_kex_follows;
-+ 	int r, first_kex_follows = 0;
- +	int auth_flag;
- +
- +	auth_flag = packet_authentication_state(ssh);
-@@ -441,6 +441,39 @@
-  int	 ssh_packet_get_state(struct ssh *, struct sshbuf *);
-  int	 ssh_packet_set_state(struct ssh *, struct sshbuf *);
-  
-+diff --git a/packet.c b/packet.c
-+index dcf35e6..9433f08 100644
-+--- a/packet.c
-++++ b/packet.c
-+@@ -920,6 +920,14 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
-+ 	return 0;
-+ }
-+ 
-++/* this supports the forced rekeying required for the NONE cipher */
-++int rekey_requested = 0;
-++void
-++packet_request_rekeying(void)
-++{
-++        rekey_requested = 1;
-++}
-++
-+ #define MAX_PACKETS	(1U<<31)
-+ static int
-+ ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
-+@@ -946,6 +954,13 @@ ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
-+ 	if (state->p_send.packets == 0 && state->p_read.packets == 0)
-+ 		return 0;
-+ 
-++        /* used to force rekeying when called for by the none
-++         * cipher switch and aes-mt-ctr methods -cjr */
-++        if (rekey_requested == 1) {
-++                rekey_requested = 0;
-++                return 1;
-++        }
-++	
-+ 	/* Time-based rekeying */
-+ 	if (state->rekey_interval != 0 &&
-+ 	    (int64_t)state->rekey_time + state->rekey_interval <= monotime())
- diff --git a/readconf.c b/readconf.c
- index db5f2d5..33f18c9 100644
- --- a/readconf.c
-@@ -453,10 +486,9 @@
-  
-  /* Format of the configuration file:
-  
--@@ -166,6 +167,8 @@ typedef enum {
-+@@ -166,5 +167,7 @@ typedef enum {
-  	oTunnel, oTunnelDevice,
-  	oLocalCommand, oPermitLocalCommand, oRemoteCommand,
-- 	oDisableMTAES,
- +	oTcpRcvBufPoll, oTcpRcvBuf, oHPNDisabled, oHPNBufferSize,
- +	oNoneEnabled, oNoneSwitch,
-  	oVisualHostKey,
-@@ -592,10 +624,9 @@
-  	int	ip_qos_interactive;	/* IP ToS/DSCP/class for interactive */
-  	int	ip_qos_bulk;		/* IP ToS/DSCP/class for bulk traffic */
-  	SyslogFacility log_facility;	/* Facility for system logging. */
--@@ -111,7 +115,10 @@ typedef struct {
-+@@ -111,6 +115,9 @@ typedef struct {
-  	int	enable_ssh_keysign;
-  	int64_t rekey_limit;
-- 	int     disable_multithreaded; /*disable multithreaded aes-ctr*/
- +	int     none_switch;    /* Use none cipher */
- +	int     none_enabled;   /* Allow none to be used */
-  	int	rekey_interval;
-@@ -650,10 +681,8 @@
-  
-  	/* Portable-specific options */
-  	if (options->use_pam == -1)
--@@ -391,6 +400,43 @@ fill_default_server_options(ServerOptions *options)
-+@@ -391,4 +400,41 @@ fill_default_server_options(ServerOptions *options)
-  		options->permit_tun = SSH_TUNMODE_NO;
-- 	if (options->disable_multithreaded == -1)
-- 		options->disable_multithreaded = 0;
- +	if (options->none_enabled == -1)
- +		options->none_enabled = 0;
- +	if (options->hpn_disabled == -1)
-@@ -1095,9 +1124,9 @@
- +			fprintf(stderr, "NONE cipher switch disabled when a TTY is allocated\n");
- +		}
- +	}
-+ 	debug("Authentication succeeded (%s).", authctxt.method->name);
-+ }
-  
-- #ifdef WITH_OPENSSL
-- 	if (options.disable_multithreaded == 0) {
- diff --git a/sshd.c b/sshd.c
- index a738c3a..b32dbe0 100644
- --- a/sshd.c
-@@ -1181,14 +1210,3 @@
-  # Example of overriding settings on a per-user basis
-  #Match User anoncvs
-  #	X11Forwarding no
--diff --git a/version.h b/version.h
--index f1bbf00..21a70c2 100644
----- a/version.h
--+++ b/version.h
--@@ -3,4 +3,5 @@
-- #define SSH_VERSION	"OpenSSH_7.8"
-- 
-- #define SSH_PORTABLE	"p1"
---#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
--+#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE SSH_HPN
--+ 
diff --git a/net-misc/openssh/files/openssh-8.1_p1-Add-POLLOUT-when-connecting-in-non-blocking-mode.patch b/net-misc/openssh/files/openssh-8.1_p1-Add-POLLOUT-when-connecting-in-non-blocking-mode.patch
deleted file mode 100644
index ac8c130..0000000
--- a/net-misc/openssh/files/openssh-8.1_p1-Add-POLLOUT-when-connecting-in-non-blocking-mode.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From: Mattias Nissler <mnissler@chromium.org>
-To: openssh-unix-dev@mindrot.org
-Subject: [PATCH] Add POLLOUT when connect()ing in non-blocking mode.
-Date: Thu, 21 Nov 2019 00:34:50 +0100
-
-With the current POLLIN as the only requested event, there won't be a
-poll event reported when the TCP connection has been established
-successfully, but only after receiving data from the other side. This
-is a problem when connecting to servers that don't send their
-identification string immediately, e.g. the sslh multiplexer waits for
-the first client packet to identify the requested service. To make
-this work better and be consistent with blocking connect(), also
-request POLLOUT events such that poll() returns once the TCP
-connection has come up.
----
- misc.c | 20 +++++++++++++++-----
- 1 file changed, 15 insertions(+), 5 deletions(-)
-
- Here is a reproduction of the issue:
-
-  (cr) mnissler@toroa ~ $ uname -r
-  4.19.67-2rodete2-amd64
-  (cr) mnissler@toroa ~ $ /usr/sbin/sslh -V
-  sslh-fork v1.18
-  (cr) mnissler@toroa ~ $ ssh -V
-  OpenSSH_8.1p1-hpn14v16, OpenSSL 1.0.2t  10 Sep 2019
-
-  Start sslh with a timeout of 2 seconds:
-
-  (cr) mnissler@toroa ~ $ /usr/sbin/sslh -p localhost:2222 -t 2 --ssh localhost:22 -f &
-  [1] 251851
-  sslh-fork v1.18 started
-
-  When passing ConnectTimeout=2, the client doesn't notice the TCP
-  connection coming up so the connection times out after 2 seconds:
-
-  (cr) mnissler@toroa ~ $ ssh -v -o ConnectTimeout=2 -p 2222 localhost
-  OpenSSH_8.1p1-hpn14v16, OpenSSL 1.0.2t  10 Sep 2019
-  debug1: Reading configuration data /home/mnissler/.ssh/config
-  debug1: Reading configuration data /etc/ssh/ssh_config
-  debug1: Connecting to localhost [::1] port 2222.
-  debug1: connect to address ::1 port 2222: Connection timed out
-  debug1: Connecting to localhost [127.0.0.1] port 2222.
-  debug1: connect to address 127.0.0.1 port 2222: Connection timed out
-  ssh: connect to host localhost port 2222: Connection timed out
-  ssh:connection from localhost:37766 to localhost:2222 forwarded from localhost:41614 to localhost:ssh
-
-  Increasing ConnectTimeout to 3, the connection comes up
-  successfully, but only after the sslh timeout expires, which causes
-  unnecessary delay:
-
-  (cr) mnissler@toroa ~ $ ssh -v -o ConnectTimeout=3 -p 2222 localhost
-  OpenSSH_8.1p1-hpn14v16, OpenSSL 1.0.2t  10 Sep 2019
-  debug1: Reading configuration data /home/mnissler/.ssh/config
-  debug1: Reading configuration data /etc/ssh/ssh_config
-  debug1: Connecting to localhost [::1] port 2222.
-  <<< hangs for 2 seconds here >>>
-  debug1: fd 3 clearing O_NONBLOCK
-  debug1: Connection established.
-
---- a/misc.c
-+++ b/misc.c
-@@ -238,12 +238,12 @@ set_rdomain(int fd, const char *name)
- }
- 
- /*
-- * Wait up to *timeoutp milliseconds for fd to be readable. Updates
-+ * Wait up to *timeoutp milliseconds for events on fd. Updates
-  * *timeoutp with time remaining.
-  * Returns 0 if fd ready or -1 on timeout or error (see errno).
-  */
--int
--waitrfd(int fd, int *timeoutp)
-+static int
-+waitfd(int fd, int *timeoutp, short events)
- {
- 	struct pollfd pfd;
- 	struct timeval t_start;
-@@ -251,7 +251,7 @@ waitrfd(int fd, int *timeoutp)
- 
- 	monotime_tv(&t_start);
- 	pfd.fd = fd;
--	pfd.events = POLLIN;
-+	pfd.events = events;
- 	for (; *timeoutp >= 0;) {
- 		r = poll(&pfd, 1, *timeoutp);
- 		oerrno = errno;
-@@ -269,6 +269,16 @@ waitrfd(int fd, int *timeoutp)
- 	return -1;
- }
- 
-+/*
-+ * Wait up to *timeoutp milliseconds for fd to be readable. Updates
-+ * *timeoutp with time remaining.
-+ * Returns 0 if fd ready or -1 on timeout or error (see errno).
-+ */
-+int
-+waitrfd(int fd, int *timeoutp) {
-+	return waitfd(fd, timeoutp, POLLIN);
-+}
-+
- /*
-  * Attempt a non-blocking connect(2) to the specified address, waiting up to
-  * *timeoutp milliseconds for the connection to complete. If the timeout is
-@@ -295,7 +305,7 @@ timeout_connect(int sockfd, const struct sockaddr *serv_addr,
- 	} else if (errno != EINPROGRESS)
- 		return -1;
- 
--	if (waitrfd(sockfd, timeoutp) == -1)
-+	if (waitfd(sockfd, timeoutp, POLLIN | POLLOUT) == -1)
- 		return -1;
- 
- 	/* Completed or failed */
--- 
-2.24.0.432.g9d3f5f5b63-goog
diff --git a/net-misc/openssh/files/openssh-8.1_p1-hpn-14.20-glue.patch b/net-misc/openssh/files/openssh-8.1_p1-hpn-14.20-glue.patch
new file mode 100644
index 0000000..90fa248
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.1_p1-hpn-14.20-glue.patch
@@ -0,0 +1,105 @@
+diff -ur a/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff b/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff
+--- a/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff	2020-02-04 14:55:30.408567718 -0800
++++ b/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff	2020-02-04 15:16:14.646567224 -0800
+@@ -409,18 +409,10 @@
+ index 817da43b..b2bcf78f 100644
+ --- a/packet.c
+ +++ b/packet.c
+-@@ -925,6 +925,24 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
++@@ -925,6 +925,16 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
+  	return 0;
+  }
+  
+-+/* this supports the forced rekeying required for the NONE cipher */
+-+int rekey_requested = 0;
+-+void
+-+packet_request_rekeying(void)
+-+{
+-+	rekey_requested = 1;
+-+}
+-+
+ +/* used to determine if pre or post auth when rekeying for aes-ctr
+ + * and none cipher switch */
+ +int
+@@ -434,20 +426,6 @@
+  #define MAX_PACKETS	(1U<<31)
+  static int
+  ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
+-@@ -951,6 +969,13 @@ ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
+- 	if (state->p_send.packets == 0 && state->p_read.packets == 0)
+- 		return 0;
+- 
+-+	/* used to force rekeying when called for by the none
+-+         * cipher switch methods -cjr */
+-+        if (rekey_requested == 1) {
+-+                rekey_requested = 0;
+-+                return 1;
+-+        }
+-+
+- 	/* Time-based rekeying */
+- 	if (state->rekey_interval != 0 &&
+- 	    (int64_t)state->rekey_time + state->rekey_interval <= monotime())
+ diff --git a/packet.h b/packet.h
+ index 8ccfd2e0..1ad9bc06 100644
+ --- a/packet.h
+@@ -476,9 +454,9 @@
+  /* Format of the configuration file:
+  
+ @@ -167,6 +168,8 @@ typedef enum {
+- 	oHashKnownHosts,
+  	oTunnel, oTunnelDevice,
+  	oLocalCommand, oPermitLocalCommand, oRemoteCommand,
++ 	oDisableMTAES,
+ +	oTcpRcvBufPoll, oTcpRcvBuf, oHPNDisabled, oHPNBufferSize,
+ +	oNoneEnabled, oNoneSwitch,
+  	oVisualHostKey,
+@@ -615,9 +593,9 @@
+  	int	ip_qos_bulk;		/* IP ToS/DSCP/class for bulk traffic */
+  	SyslogFacility log_facility;	/* Facility for system logging. */
+ @@ -112,7 +116,10 @@ typedef struct {
+- 
+  	int	enable_ssh_keysign;
+  	int64_t rekey_limit;
++ 	int     disable_multithreaded; /*disable multithreaded aes-ctr*/
+ +	int     none_switch;    /* Use none cipher */
+ +	int     none_enabled;   /* Allow none to be used */
+  	int	rekey_interval;
+@@ -700,9 +678,9 @@
+ +			options->hpn_buffer_size = CHAN_TCP_WINDOW_DEFAULT;
+ +	}
+ +
++ 	if (options->disable_multithreaded == -1)
++ 		options->disable_multithreaded = 0;
+  	if (options->ip_qos_interactive == -1)
+- 		options->ip_qos_interactive = IPTOS_DSCP_AF21;
+- 	if (options->ip_qos_bulk == -1)
+ @@ -486,6 +532,8 @@ typedef enum {
+  	sPasswordAuthentication, sKbdInteractiveAuthentication,
+  	sListenAddress, sAddressFamily,
+@@ -1079,11 +1057,11 @@
+  	xxx_host = host;
+  	xxx_hostaddr = hostaddr;
+  
+-@@ -422,6 +433,28 @@ ssh_userauth2(struct ssh *ssh, const char *local_user,
++@@ -422,7 +433,28 @@ ssh_userauth2(struct ssh *ssh, const char *local_user,
+  
+  	if (!authctxt.success)
+  		fatal("Authentication failed.");
+-+
++ 
+ +	/*
+ +	 * If the user wants to use the none cipher, do it post authentication
+ +	 * and only if the right conditions are met -- both of the NONE commands
+@@ -1105,9 +1083,9 @@
+ +		}
+ +	}
+ +
+- 	debug("Authentication succeeded (%s).", authctxt.method->name);
+- }
+- 
++ #ifdef WITH_OPENSSL
++ 	if (options.disable_multithreaded == 0) {
++ 		/* if we are using aes-ctr there can be issues in either a fork or sandbox
+ diff --git a/sshd.c b/sshd.c
+ index 11571c01..23a06022 100644
+ --- a/sshd.c
diff --git a/net-misc/openssh/files/openssh-8.1_p1-hpn-14.20-sctp-glue.patch b/net-misc/openssh/files/openssh-8.1_p1-hpn-14.20-sctp-glue.patch
new file mode 100644
index 0000000..3f5c7a4
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.1_p1-hpn-14.20-sctp-glue.patch
@@ -0,0 +1,19 @@
+diff -ur a/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff b/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff
+--- a/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff	2020-02-04 14:55:30.408567718 -0800
++++ b/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff	2020-02-04 16:36:51.394069720 -0800
+@@ -1191,15 +1191,3 @@
+  # Example of overriding settings on a per-user basis
+  #Match User anoncvs
+  #	X11Forwarding no
+-diff --git a/version.h b/version.h
+-index 6b3fadf8..ec1d2e27 100644
+---- a/version.h
+-+++ b/version.h
+-@@ -3,4 +3,6 @@
+- #define SSH_VERSION	"OpenSSH_8.1"
+- 
+- #define SSH_PORTABLE	"p1"
+--#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
+-+#define SSH_HPN         "-hpn14v20"
+-+#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE SSH_HPN
+-+ 
diff --git a/net-misc/openssh/files/openssh-8.1_p1-hpn-glue.patch b/net-misc/openssh/files/openssh-8.1_p1-hpn-glue.patch
deleted file mode 100644
index 0ad814f..0000000
--- a/net-misc/openssh/files/openssh-8.1_p1-hpn-glue.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-Only in b: .openssh-7_8_P1-hpn-AES-CTR-14.16.diff.un~
-Only in b: .openssh-7_8_P1-hpn-DynWinNoneSwitch-14.16.diff.un~
-diff -ru a/openssh-7_8_P1-hpn-AES-CTR-14.16.diff b/openssh-7_8_P1-hpn-AES-CTR-14.16.diff
---- a/openssh-7_8_P1-hpn-AES-CTR-14.16.diff	2019-10-10 13:48:31.513603947 -0700
-+++ b/openssh-7_8_P1-hpn-AES-CTR-14.16.diff	2019-10-10 13:50:15.012495676 -0700
-@@ -17,8 +17,8 @@
-  	canohost.o channels.o cipher.o cipher-aes.o cipher-aesctr.o \
- -	cipher-ctr.o cleanup.o \
- +	cipher-ctr.o cleanup.o cipher-ctr-mt.o \
-- 	compat.o crc32.o fatal.o hostfile.o \
-- 	log.o match.o moduli.o nchan.o packet.o opacket.o \
-+ 	compat.o fatal.o hostfile.o \
-+ 	log.o match.o moduli.o nchan.o packet.o \
-  	readpass.o ttymodes.o xmalloc.o addrmatch.o \
- diff --git a/cipher-ctr-mt.c b/cipher-ctr-mt.c
- new file mode 100644
-@@ -998,7 +998,7 @@
- +		 * so we repoint the define to the multithreaded evp. To start the threads we
- +		 * then force a rekey
- +		 */
--+		const void *cc = ssh_packet_get_send_context(active_state);
-++		const void *cc = ssh_packet_get_send_context(ssh);
- +		
- +		/* only do this for the ctr cipher. otherwise gcm mode breaks. Don't know why though */
- +		if (strstr(cipher_ctx_name(cc), "ctr")) {
-@@ -1028,7 +1028,7 @@
- +		 * so we repoint the define to the multithreaded evp. To start the threads we
- +		 * then force a rekey
- +		 */
--+		const void *cc = ssh_packet_get_send_context(active_state);
-++		const void *cc = ssh_packet_get_send_context(ssh);
- +		
- +		/* only rekey if necessary. If we don't do this gcm mode cipher breaks */
- +		if (strstr(cipher_ctx_name(cc), "ctr")) {
-diff -ru a/openssh-7_8_P1-hpn-DynWinNoneSwitch-14.16.diff b/openssh-7_8_P1-hpn-DynWinNoneSwitch-14.16.diff
---- a/openssh-7_8_P1-hpn-DynWinNoneSwitch-14.16.diff	2019-10-10 13:47:54.801642144 -0700
-+++ b/openssh-7_8_P1-hpn-DynWinNoneSwitch-14.16.diff	2019-10-10 15:58:05.085803333 -0700
-@@ -162,24 +162,24 @@
-  }
-  
- +static int
--+channel_tcpwinsz(void)
-++channel_tcpwinsz(struct ssh *ssh)
- +{
- +	u_int32_t tcpwinsz = 0;
- +	socklen_t optsz = sizeof(tcpwinsz);
- +	int ret = -1;
- +
- +	/* if we aren't on a socket return 128KB */
--+	if (!packet_connection_is_on_socket())
-++	if (!ssh_packet_connection_is_on_socket(ssh))
- +		return 128 * 1024;
- +
--+	ret = getsockopt(packet_get_connection_in(),
-++	ret = getsockopt(ssh_packet_get_connection_in(ssh),
- +			 SOL_SOCKET, SO_RCVBUF, &tcpwinsz, &optsz);
- +	/* return no more than SSHBUF_SIZE_MAX (currently 256MB) */
- +	if ((ret == 0) && tcpwinsz > SSHBUF_SIZE_MAX)
- +		tcpwinsz = SSHBUF_SIZE_MAX;
- +
- +	debug2("tcpwinsz: tcp connection %d, Receive window: %d",
--+	       packet_get_connection_in(), tcpwinsz);
-++	       ssh_packet_get_connection_in(ssh), tcpwinsz);
- +	return tcpwinsz;
- +}
- +
-@@ -191,7 +191,7 @@
-  	    c->local_window < c->local_window_max/2) &&
-  	    c->local_consumed > 0) {
- +		u_int addition = 0;
--+		u_int32_t tcpwinsz = channel_tcpwinsz();
-++		u_int32_t tcpwinsz = channel_tcpwinsz(ssh);
- +		/* adjust max window size if we are in a dynamic environment */
- +		if (c->dynamic_window && (tcpwinsz > c->local_window_max)) {
- +			/* grow the window somewhat aggressively to maintain pressure */
-@@ -409,18 +409,10 @@
- index dcf35e6..da4ced0 100644
- --- a/packet.c
- +++ b/packet.c
--@@ -920,6 +920,24 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
-+@@ -920,6 +920,16 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
-  	return 0;
-  }
-  
--+/* this supports the forced rekeying required for the NONE cipher */
--+int rekey_requested = 0;
--+void
--+packet_request_rekeying(void)
--+{
--+	rekey_requested = 1;
--+}
--+
- +/* used to determine if pre or post auth when rekeying for aes-ctr
- + * and none cipher switch */
- +int
-@@ -434,20 +426,6 @@
-  #define MAX_PACKETS	(1U<<31)
-  static int
-  ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
--@@ -946,6 +964,13 @@ ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
-- 	if (state->p_send.packets == 0 && state->p_read.packets == 0)
-- 		return 0;
-- 
--+	/* used to force rekeying when called for by the none
--+         * cipher switch methods -cjr */
--+        if (rekey_requested == 1) {
--+                rekey_requested = 0;
--+                return 1;
--+        }
--+
-- 	/* Time-based rekeying */
-- 	if (state->rekey_interval != 0 &&
-- 	    (int64_t)state->rekey_time + state->rekey_interval <= monotime())
- diff --git a/packet.h b/packet.h
- index 170203c..f4d9df2 100644
- --- a/packet.h
-@@ -476,9 +454,9 @@
-  /* Format of the configuration file:
-  
- @@ -166,6 +167,8 @@ typedef enum {
-- 	oHashKnownHosts,
-  	oTunnel, oTunnelDevice,
-  	oLocalCommand, oPermitLocalCommand, oRemoteCommand,
-+ 	oDisableMTAES,
- +	oTcpRcvBufPoll, oTcpRcvBuf, oHPNDisabled, oHPNBufferSize,
- +	oNoneEnabled, oNoneSwitch,
-  	oVisualHostKey,
-@@ -615,9 +593,9 @@
-  	int	ip_qos_bulk;		/* IP ToS/DSCP/class for bulk traffic */
-  	SyslogFacility log_facility;	/* Facility for system logging. */
- @@ -111,7 +115,10 @@ typedef struct {
-- 
-  	int	enable_ssh_keysign;
-  	int64_t rekey_limit;
-+ 	int     disable_multithreaded; /*disable multithreaded aes-ctr*/
- +	int     none_switch;    /* Use none cipher */
- +	int     none_enabled;   /* Allow none to be used */
-  	int	rekey_interval;
-@@ -633,7 +611,7 @@
-  	off_t i, statbytes;
-  	size_t amt, nr;
-  	int fd = -1, haderr, indx;
---	char *last, *name, buf[2048], encname[PATH_MAX];
-+-	char *last, *name, buf[PATH_MAX + 128], encname[PATH_MAX];
- +	char *last, *name, buf[16384], encname[PATH_MAX];
-  	int len;
-  
-@@ -673,9 +651,9 @@
-  	/* Portable-specific options */
-  	if (options->use_pam == -1)
- @@ -391,6 +400,43 @@ fill_default_server_options(ServerOptions *options)
-- 	}
-- 	if (options->permit_tun == -1)
-  		options->permit_tun = SSH_TUNMODE_NO;
-+ 	if (options->disable_multithreaded == -1)
-+ 		options->disable_multithreaded = 0;
- +	if (options->none_enabled == -1)
- +		options->none_enabled = 0;
- +	if (options->hpn_disabled == -1)
-@@ -1092,7 +1070,7 @@
-  	xxx_host = host;
-  	xxx_hostaddr = hostaddr;
-  
--@@ -412,6 +423,28 @@ ssh_userauth2(const char *local_user, const char *server_user, char *host,
-+@@ -412,6 +423,27 @@ ssh_userauth2(const char *local_user, const char *server_user, char *host,
-  
-  	if (!authctxt.success)
-  		fatal("Authentication failed.");
-@@ -1108,7 +1086,7 @@
- +			memcpy(&myproposal, &myproposal_default, sizeof(myproposal));
- +			myproposal[PROPOSAL_ENC_ALGS_STOC] = "none";
- +			myproposal[PROPOSAL_ENC_ALGS_CTOS] = "none";
--+			kex_prop2buf(active_state->kex->my, myproposal);
-++			kex_prop2buf(ssh->kex->my, myproposal);
- +			packet_request_rekeying();
- +			fprintf(stderr, "WARNING: ENABLED NONE CIPHER\n");
- +		} else {
-@@ -1117,23 +1095,13 @@
- +			fprintf(stderr, "NONE cipher switch disabled when a TTY is allocated\n");
- +		}
- +	}
--+
-- 	debug("Authentication succeeded (%s).", authctxt.method->name);
-- }
-  
-+ #ifdef WITH_OPENSSL
-+ 	if (options.disable_multithreaded == 0) {
- diff --git a/sshd.c b/sshd.c
- index a738c3a..b32dbe0 100644
- --- a/sshd.c
- +++ b/sshd.c
--@@ -373,7 +373,7 @@ sshd_exchange_identification(struct ssh *ssh, int sock_in, int sock_out)
-- 	char remote_version[256];	/* Must be at least as big as buf. */
-- 
-- 	xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s\r\n",
---	    PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION,
--+	    PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_RELEASE,
-- 	    *options.version_addendum == '\0' ? "" : " ",
-- 	    options.version_addendum);
-- 
- @@ -1037,6 +1037,8 @@ listen_on_addrs(struct listenaddr *la)
-  	int ret, listen_sock;
-  	struct addrinfo *ai;
-@@ -1217,11 +1185,10 @@
- index f1bbf00..21a70c2 100644
- --- a/version.h
- +++ b/version.h
--@@ -3,4 +3,6 @@
-+@@ -3,4 +3,5 @@
-  #define SSH_VERSION	"OpenSSH_7.8"
-  
-  #define SSH_PORTABLE	"p1"
- -#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
--+#define SSH_HPN         "-hpn14v16"
- +#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE SSH_HPN
- + 
diff --git a/net-misc/openssh/files/openssh-8.1_p1-tests-2020.patch b/net-misc/openssh/files/openssh-8.1_p1-tests-2020.patch
new file mode 100644
index 0000000..505e34d
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.1_p1-tests-2020.patch
@@ -0,0 +1,26 @@
+diff --git a/regress/cert-hostkey.sh b/regress/cert-hostkey.sh
+index 86ea6250..844adabc 100644
+--- a/regress/cert-hostkey.sh
++++ b/regress/cert-hostkey.sh
+@@ -252,7 +252,7 @@ test_one() {
+ test_one "user-certificate"	failure "-n $HOSTS"
+ test_one "empty principals"	success "-h"
+ test_one "wrong principals"	failure "-h -n foo"
+-test_one "cert not yet valid"	failure "-h -V20200101:20300101"
++test_one "cert not yet valid"	failure "-h -V20300101:20320101"
+ test_one "cert expired"		failure "-h -V19800101:19900101"
+ test_one "cert valid interval"	success "-h -V-1w:+2w"
+ test_one "cert has constraints"	failure "-h -Oforce-command=false"
+diff --git a/regress/cert-userkey.sh b/regress/cert-userkey.sh
+index 38c14a69..5cd02fc3 100644
+--- a/regress/cert-userkey.sh
++++ b/regress/cert-userkey.sh
+@@ -338,7 +338,7 @@ test_one() {
+ test_one "correct principal"	success "-n ${USER}"
+ test_one "host-certificate"	failure "-n ${USER} -h"
+ test_one "wrong principals"	failure "-n foo"
+-test_one "cert not yet valid"	failure "-n ${USER} -V20200101:20300101"
++test_one "cert not yet valid"	failure "-n ${USER} -V20300101:20320101"
+ test_one "cert expired"		failure "-n ${USER} -V19800101:19900101"
+ test_one "cert valid interval"	success "-n ${USER} -V-1w:+2w"
+ test_one "wrong source-address"	failure "-n ${USER} -Osource-address=10.0.0.0/8"
diff --git a/net-misc/openssh/files/openssh-8.2_p1-GSSAPI-dns.patch b/net-misc/openssh/files/openssh-8.2_p1-GSSAPI-dns.patch
new file mode 100644
index 0000000..d4db77b
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.2_p1-GSSAPI-dns.patch
@@ -0,0 +1,359 @@
+diff --git a/auth.c b/auth.c
+index 086b8ebb..a267353c 100644
+--- a/auth.c
++++ b/auth.c
+@@ -724,120 +724,6 @@ fakepw(void)
+ 	return (&fake);
+ }
+ 
+-/*
+- * Returns the remote DNS hostname as a string. The returned string must not
+- * be freed. NB. this will usually trigger a DNS query the first time it is
+- * called.
+- * This function does additional checks on the hostname to mitigate some
+- * attacks on legacy rhosts-style authentication.
+- * XXX is RhostsRSAAuthentication vulnerable to these?
+- * XXX Can we remove these checks? (or if not, remove RhostsRSAAuthentication?)
+- */
+-
+-static char *
+-remote_hostname(struct ssh *ssh)
+-{
+-	struct sockaddr_storage from;
+-	socklen_t fromlen;
+-	struct addrinfo hints, *ai, *aitop;
+-	char name[NI_MAXHOST], ntop2[NI_MAXHOST];
+-	const char *ntop = ssh_remote_ipaddr(ssh);
+-
+-	/* Get IP address of client. */
+-	fromlen = sizeof(from);
+-	memset(&from, 0, sizeof(from));
+-	if (getpeername(ssh_packet_get_connection_in(ssh),
+-	    (struct sockaddr *)&from, &fromlen) == -1) {
+-		debug("getpeername failed: %.100s", strerror(errno));
+-		return xstrdup(ntop);
+-	}
+-
+-	ipv64_normalise_mapped(&from, &fromlen);
+-	if (from.ss_family == AF_INET6)
+-		fromlen = sizeof(struct sockaddr_in6);
+-
+-	debug3("Trying to reverse map address %.100s.", ntop);
+-	/* Map the IP address to a host name. */
+-	if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name),
+-	    NULL, 0, NI_NAMEREQD) != 0) {
+-		/* Host name not found.  Use ip address. */
+-		return xstrdup(ntop);
+-	}
+-
+-	/*
+-	 * if reverse lookup result looks like a numeric hostname,
+-	 * someone is trying to trick us by PTR record like following:
+-	 *	1.1.1.10.in-addr.arpa.	IN PTR	2.3.4.5
+-	 */
+-	memset(&hints, 0, sizeof(hints));
+-	hints.ai_socktype = SOCK_DGRAM;	/*dummy*/
+-	hints.ai_flags = AI_NUMERICHOST;
+-	if (getaddrinfo(name, NULL, &hints, &ai) == 0) {
+-		logit("Nasty PTR record \"%s\" is set up for %s, ignoring",
+-		    name, ntop);
+-		freeaddrinfo(ai);
+-		return xstrdup(ntop);
+-	}
+-
+-	/* Names are stored in lowercase. */
+-	lowercase(name);
+-
+-	/*
+-	 * Map it back to an IP address and check that the given
+-	 * address actually is an address of this host.  This is
+-	 * necessary because anyone with access to a name server can
+-	 * define arbitrary names for an IP address. Mapping from
+-	 * name to IP address can be trusted better (but can still be
+-	 * fooled if the intruder has access to the name server of
+-	 * the domain).
+-	 */
+-	memset(&hints, 0, sizeof(hints));
+-	hints.ai_family = from.ss_family;
+-	hints.ai_socktype = SOCK_STREAM;
+-	if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
+-		logit("reverse mapping checking getaddrinfo for %.700s "
+-		    "[%s] failed.", name, ntop);
+-		return xstrdup(ntop);
+-	}
+-	/* Look for the address from the list of addresses. */
+-	for (ai = aitop; ai; ai = ai->ai_next) {
+-		if (getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop2,
+-		    sizeof(ntop2), NULL, 0, NI_NUMERICHOST) == 0 &&
+-		    (strcmp(ntop, ntop2) == 0))
+-				break;
+-	}
+-	freeaddrinfo(aitop);
+-	/* If we reached the end of the list, the address was not there. */
+-	if (ai == NULL) {
+-		/* Address not found for the host name. */
+-		logit("Address %.100s maps to %.600s, but this does not "
+-		    "map back to the address.", ntop, name);
+-		return xstrdup(ntop);
+-	}
+-	return xstrdup(name);
+-}
+-
+-/*
+- * Return the canonical name of the host in the other side of the current
+- * connection.  The host name is cached, so it is efficient to call this
+- * several times.
+- */
+-
+-const char *
+-auth_get_canonical_hostname(struct ssh *ssh, int use_dns)
+-{
+-	static char *dnsname;
+-
+-	if (!use_dns)
+-		return ssh_remote_ipaddr(ssh);
+-	else if (dnsname != NULL)
+-		return dnsname;
+-	else {
+-		dnsname = remote_hostname(ssh);
+-		return dnsname;
+-	}
+-}
+-
+ /*
+  * Runs command in a subprocess with a minimal environment.
+  * Returns pid on success, 0 on failure.
+diff --git a/canohost.c b/canohost.c
+index abea9c6e..4f4524d2 100644
+--- a/canohost.c
++++ b/canohost.c
+@@ -202,3 +202,117 @@ get_local_port(int sock)
+ {
+ 	return get_sock_port(sock, 1);
+ }
++
++/*
++ * Returns the remote DNS hostname as a string. The returned string must not
++ * be freed. NB. this will usually trigger a DNS query the first time it is
++ * called.
++ * This function does additional checks on the hostname to mitigate some
++ * attacks on legacy rhosts-style authentication.
++ * XXX is RhostsRSAAuthentication vulnerable to these?
++ * XXX Can we remove these checks? (or if not, remove RhostsRSAAuthentication?)
++ */
++
++static char *
++remote_hostname(struct ssh *ssh)
++{
++	struct sockaddr_storage from;
++	socklen_t fromlen;
++	struct addrinfo hints, *ai, *aitop;
++	char name[NI_MAXHOST], ntop2[NI_MAXHOST];
++	const char *ntop = ssh_remote_ipaddr(ssh);
++
++	/* Get IP address of client. */
++	fromlen = sizeof(from);
++	memset(&from, 0, sizeof(from));
++	if (getpeername(ssh_packet_get_connection_in(ssh),
++	    (struct sockaddr *)&from, &fromlen) < 0) {
++		debug("getpeername failed: %.100s", strerror(errno));
++		return strdup(ntop);
++	}
++
++	ipv64_normalise_mapped(&from, &fromlen);
++	if (from.ss_family == AF_INET6)
++		fromlen = sizeof(struct sockaddr_in6);
++
++	debug3("Trying to reverse map address %.100s.", ntop);
++	/* Map the IP address to a host name. */
++	if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name),
++	    NULL, 0, NI_NAMEREQD) != 0) {
++		/* Host name not found.  Use ip address. */
++		return strdup(ntop);
++	}
++
++	/*
++	 * if reverse lookup result looks like a numeric hostname,
++	 * someone is trying to trick us by PTR record like following:
++	 *	1.1.1.10.in-addr.arpa.	IN PTR	2.3.4.5
++	 */
++	memset(&hints, 0, sizeof(hints));
++	hints.ai_socktype = SOCK_DGRAM;	/*dummy*/
++	hints.ai_flags = AI_NUMERICHOST;
++	if (getaddrinfo(name, NULL, &hints, &ai) == 0) {
++		logit("Nasty PTR record \"%s\" is set up for %s, ignoring",
++		    name, ntop);
++		freeaddrinfo(ai);
++		return strdup(ntop);
++	}
++
++	/* Names are stored in lowercase. */
++	lowercase(name);
++
++	/*
++	 * Map it back to an IP address and check that the given
++	 * address actually is an address of this host.  This is
++	 * necessary because anyone with access to a name server can
++	 * define arbitrary names for an IP address. Mapping from
++	 * name to IP address can be trusted better (but can still be
++	 * fooled if the intruder has access to the name server of
++	 * the domain).
++	 */
++	memset(&hints, 0, sizeof(hints));
++	hints.ai_family = from.ss_family;
++	hints.ai_socktype = SOCK_STREAM;
++	if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
++		logit("reverse mapping checking getaddrinfo for %.700s "
++		    "[%s] failed.", name, ntop);
++		return strdup(ntop);
++	}
++	/* Look for the address from the list of addresses. */
++	for (ai = aitop; ai; ai = ai->ai_next) {
++		if (getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop2,
++		    sizeof(ntop2), NULL, 0, NI_NUMERICHOST) == 0 &&
++		    (strcmp(ntop, ntop2) == 0))
++				break;
++	}
++	freeaddrinfo(aitop);
++	/* If we reached the end of the list, the address was not there. */
++	if (ai == NULL) {
++		/* Address not found for the host name. */
++		logit("Address %.100s maps to %.600s, but this does not "
++		    "map back to the address.", ntop, name);
++		return strdup(ntop);
++	}
++	return strdup(name);
++}
++
++/*
++ * Return the canonical name of the host in the other side of the current
++ * connection.  The host name is cached, so it is efficient to call this
++ * several times.
++ */
++
++const char *
++auth_get_canonical_hostname(struct ssh *ssh, int use_dns)
++{
++	static char *dnsname;
++
++	if (!use_dns)
++		return ssh_remote_ipaddr(ssh);
++	else if (dnsname != NULL)
++		return dnsname;
++	else {
++		dnsname = remote_hostname(ssh);
++		return dnsname;
++	}
++}
+diff --git a/readconf.c b/readconf.c
+index f3cac6b3..adfd7a4e 100644
+--- a/readconf.c
++++ b/readconf.c
+@@ -160,6 +160,7 @@ typedef enum {
+ 	oClearAllForwardings, oNoHostAuthenticationForLocalhost,
+ 	oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
+ 	oAddressFamily, oGssAuthentication, oGssDelegateCreds,
++	oGssTrustDns,
+ 	oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
+ 	oSendEnv, oSetEnv, oControlPath, oControlMaster, oControlPersist,
+ 	oHashKnownHosts,
+@@ -205,9 +206,11 @@ static struct {
+ #if defined(GSSAPI)
+ 	{ "gssapiauthentication", oGssAuthentication },
+ 	{ "gssapidelegatecredentials", oGssDelegateCreds },
++	{ "gssapitrustdns", oGssTrustDns },
+ # else
+ 	{ "gssapiauthentication", oUnsupported },
+ 	{ "gssapidelegatecredentials", oUnsupported },
++	{ "gssapitrustdns", oUnsupported },
+ #endif
+ #ifdef ENABLE_PKCS11
+ 	{ "pkcs11provider", oPKCS11Provider },
+@@ -1033,6 +1036,10 @@ parse_time:
+ 		intptr = &options->gss_deleg_creds;
+ 		goto parse_flag;
+ 
++	case oGssTrustDns:
++		intptr = &options->gss_trust_dns;
++		goto parse_flag;
++
+ 	case oBatchMode:
+ 		intptr = &options->batch_mode;
+ 		goto parse_flag;
+@@ -1912,6 +1919,7 @@ initialize_options(Options * options)
+ 	options->challenge_response_authentication = -1;
+ 	options->gss_authentication = -1;
+ 	options->gss_deleg_creds = -1;
++	options->gss_trust_dns = -1;
+ 	options->password_authentication = -1;
+ 	options->kbd_interactive_authentication = -1;
+ 	options->kbd_interactive_devices = NULL;
+@@ -2061,6 +2069,8 @@ fill_default_options(Options * options)
+ 		options->gss_authentication = 0;
+ 	if (options->gss_deleg_creds == -1)
+ 		options->gss_deleg_creds = 0;
++	if (options->gss_trust_dns == -1)
++		options->gss_trust_dns = 0;
+ 	if (options->password_authentication == -1)
+ 		options->password_authentication = 1;
+ 	if (options->kbd_interactive_authentication == -1)
+diff --git a/readconf.h b/readconf.h
+index feedb3d2..c7139c1b 100644
+--- a/readconf.h
++++ b/readconf.h
+@@ -42,6 +42,7 @@ typedef struct {
+ 					/* Try S/Key or TIS, authentication. */
+ 	int     gss_authentication;	/* Try GSS authentication */
+ 	int     gss_deleg_creds;	/* Delegate GSS credentials */
++	int	gss_trust_dns;		/* Trust DNS for GSS canonicalization */
+ 	int     password_authentication;	/* Try password
+ 						 * authentication. */
+ 	int     kbd_interactive_authentication; /* Try keyboard-interactive auth. */
+diff --git a/ssh_config.5 b/ssh_config.5
+index 06a32d31..6871ff36 100644
+--- a/ssh_config.5
++++ b/ssh_config.5
+@@ -770,6 +770,16 @@ The default is
+ Forward (delegate) credentials to the server.
+ The default is
+ .Cm no .
++Note that this option applies to protocol version 2 connections using GSSAPI.
++.It Cm GSSAPITrustDns
++Set to
++.Dq yes to indicate that the DNS is trusted to securely canonicalize
++the name of the host being connected to. If
++.Dq no, the hostname entered on the
++command line will be passed untouched to the GSSAPI library.
++The default is
++.Dq no .
++This option only applies to protocol version 2 connections using GSSAPI.
+ .It Cm HashKnownHosts
+ Indicates that
+ .Xr ssh 1
+diff --git a/sshconnect2.c b/sshconnect2.c
+index af00fb30..652463c5 100644
+--- a/sshconnect2.c
++++ b/sshconnect2.c
+@@ -716,6 +716,13 @@ userauth_gssapi(struct ssh *ssh)
+ 	OM_uint32 min;
+ 	int r, ok = 0;
+ 	gss_OID mech = NULL;
++	const char *gss_host;
++
++	if (options.gss_trust_dns) {
++		extern const char *auth_get_canonical_hostname(struct ssh *ssh, int use_dns);
++		gss_host = auth_get_canonical_hostname(ssh, 1);
++	} else
++		gss_host = authctxt->host;
+ 
+ 	/* Try one GSSAPI method at a time, rather than sending them all at
+ 	 * once. */
+@@ -730,7 +737,7 @@ userauth_gssapi(struct ssh *ssh)
+ 		    elements[authctxt->mech_tried];
+ 		/* My DER encoding requires length<128 */
+ 		if (mech->length < 128 && ssh_gssapi_check_mechanism(&gssctxt,
+-		    mech, authctxt->host)) {
++		    mech, gss_host)) {
+ 			ok = 1; /* Mechanism works */
+ 		} else {
+ 			authctxt->mech_tried++;
diff --git a/net-misc/openssh/files/openssh-8.2_p1-X509-12.4.3-tests.patch b/net-misc/openssh/files/openssh-8.2_p1-X509-12.4.3-tests.patch
new file mode 100644
index 0000000..1c58d0d
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.2_p1-X509-12.4.3-tests.patch
@@ -0,0 +1,11 @@
+--- a/openbsd-compat/regress/Makefile.in	2020-02-15 10:59:01.210601434 -0700
++++ b/openbsd-compat/regress/Makefile.in	2020-02-15 10:59:18.753485852 -0700
+@@ -7,7 +7,7 @@
+ CC=@CC@
+ LD=@LD@
+ CFLAGS=@CFLAGS@
+-CPPFLAGS=-I. -I.. -I$(srcdir) -I$(srcdir)/.. @CPPFLAGS@ @DEFS@
++CPPFLAGS=-I. -I.. -I../.. -I$(srcdir) -I$(srcdir)/.. @CPPFLAGS@ @DEFS@
+ EXEEXT=@EXEEXT@
+ LIBCOMPAT=../libopenbsd-compat.a
+ LIBS=@LIBS@
diff --git a/net-misc/openssh/files/openssh-8.2_p1-X509-glue-12.4.3.patch b/net-misc/openssh/files/openssh-8.2_p1-X509-glue-12.4.3.patch
new file mode 100644
index 0000000..e73c499
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.2_p1-X509-glue-12.4.3.patch
@@ -0,0 +1,128 @@
+--- a/openssh-8.2p1+x509-12.4.3.diff	2020-03-21 11:15:05.939809371 -0700
++++ b/openssh-8.2p1+x509-12.4.3.diff	2020-03-21 11:23:15.424752355 -0700
+@@ -39298,16 +39298,15 @@
+  
+  install: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config
+  install-nokeys: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf
+-@@ -378,6 +379,8 @@
++@@ -378,6 +379,7 @@
+  	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)5
+  	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)8
+  	$(MKDIR_P) $(DESTDIR)$(libexecdir)
+ +	$(MKDIR_P) $(DESTDIR)$(sshcadir)
+-+	$(MKDIR_P) $(DESTDIR)$(piddir)
+  	$(MKDIR_P) -m 0755 $(DESTDIR)$(PRIVSEP_PATH)
+  	$(INSTALL) -m 0755 $(STRIP_OPT) ssh$(EXEEXT) $(DESTDIR)$(bindir)/ssh$(EXEEXT)
+  	$(INSTALL) -m 0755 $(STRIP_OPT) scp$(EXEEXT) $(DESTDIR)$(bindir)/scp$(EXEEXT)
+-@@ -386,11 +389,14 @@
++@@ -386,11 +388,14 @@
+  	$(INSTALL) -m 0755 $(STRIP_OPT) ssh-keygen$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT)
+  	$(INSTALL) -m 0755 $(STRIP_OPT) ssh-keyscan$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT)
+  	$(INSTALL) -m 0755 $(STRIP_OPT) sshd$(EXEEXT) $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
+@@ -39326,7 +39325,7 @@
+  	$(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
+  	$(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
+  	$(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
+-@@ -400,12 +406,12 @@
++@@ -400,12 +405,12 @@
+  	$(INSTALL) -m 644 moduli.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/moduli.5
+  	$(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5
+  	$(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5
+@@ -39340,7 +39339,7 @@
+  
+  install-sysconf:
+  	$(MKDIR_P) $(DESTDIR)$(sysconfdir)
+-@@ -463,10 +469,9 @@
++@@ -463,10 +468,9 @@
+  	-rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT)
+  	-rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT)
+  	-rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
+@@ -39354,7 +39353,7 @@
+  	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
+  	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
+  	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
+-@@ -478,7 +483,6 @@
++@@ -478,7 +482,6 @@
+  	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
+  	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
+  	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
+@@ -39362,7 +39361,7 @@
+  
+  regress-prep:
+  	$(MKDIR_P) `pwd`/regress/unittests/test_helper
+-@@ -491,11 +495,11 @@
++@@ -491,11 +494,11 @@
+  	$(MKDIR_P) `pwd`/regress/unittests/match
+  	$(MKDIR_P) `pwd`/regress/unittests/utf8
+  	$(MKDIR_P) `pwd`/regress/misc/kexfuzz
+@@ -39376,7 +39375,7 @@
+  
+  regress/modpipe$(EXEEXT): $(srcdir)/regress/modpipe.c $(REGRESSLIBS)
+  	$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/regress/modpipe.c \
+-@@ -546,8 +550,7 @@
++@@ -546,8 +549,7 @@
+  	regress/unittests/sshkey/tests.o \
+  	regress/unittests/sshkey/common.o \
+  	regress/unittests/sshkey/test_file.o \
+@@ -39406,7 +39405,7 @@
+  
+  regress/unittests/hostkeys/test_hostkeys$(EXEEXT): \
+      ${UNITTESTS_TEST_HOSTKEYS_OBJS} \
+-@@ -618,35 +619,18 @@
++@@ -618,35 +618,18 @@
+  	    -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
+  
+  MISC_KEX_FUZZ_OBJS=\
+@@ -39444,7 +39443,7 @@
+  	regress/unittests/sshbuf/test_sshbuf$(EXEEXT) \
+  	regress/unittests/sshkey/test_sshkey$(EXEEXT) \
+  	regress/unittests/bitmap/test_bitmap$(EXEEXT) \
+-@@ -657,36 +641,29 @@
++@@ -657,36 +640,29 @@
+  	regress/unittests/utf8/test_utf8$(EXEEXT) \
+  	regress/misc/kexfuzz/kexfuzz$(EXEEXT)
+  
+@@ -39501,7 +39500,7 @@
+  	TEST_SSH_IPV6="@TEST_SSH_IPV6@" ; \
+  	TEST_SSH_UTF8="@TEST_SSH_UTF8@" ; \
+  	TEST_SSH_ECC="@TEST_SSH_ECC@" ; \
+-@@ -708,8 +685,6 @@
++@@ -708,8 +684,6 @@
+  		TEST_SSH_SSHPKCS11HELPER="$${TEST_SSH_SSHPKCS11HELPER}" \
+  		TEST_SSH_SSHKEYSCAN="$${TEST_SSH_SSHKEYSCAN}" \
+  		TEST_SSH_SFTP="$${TEST_SSH_SFTP}" \
+@@ -39510,7 +39509,7 @@
+  		TEST_SSH_SFTPSERVER="$${TEST_SSH_SFTPSERVER}" \
+  		TEST_SSH_PLINK="$${TEST_SSH_PLINK}" \
+  		TEST_SSH_PUTTYGEN="$${TEST_SSH_PUTTYGEN}" \
+-@@ -717,17 +692,35 @@
++@@ -717,17 +691,35 @@
+  		TEST_SSH_IPV6="$${TEST_SSH_IPV6}" \
+  		TEST_SSH_UTF8="$${TEST_SSH_UTF8}" \
+  		TEST_SSH_ECC="$${TEST_SSH_ECC}" \
+@@ -39549,7 +39548,7 @@
+  
+  survey: survey.sh ssh
+  	@$(SHELL) ./survey.sh > survey
+-@@ -743,4 +736,8 @@
++@@ -743,4 +735,8 @@
+  		sh buildpkg.sh; \
+  	fi
+  
+@@ -98215,16 +98214,6 @@
+ +	return mbtowc(NULL, s, n);
+ +}
+ +#endif
+-diff -ruN openssh-8.2p1/version.h openssh-8.2p1+x509-12.4.3/version.h
+---- openssh-8.2p1/version.h	2020-02-14 02:40:54.000000000 +0200
+-+++ openssh-8.2p1+x509-12.4.3/version.h	2020-03-21 19:07:00.000000000 +0200
+-@@ -2,5 +2,4 @@
+- 
+- #define SSH_VERSION	"OpenSSH_8.2"
+- 
+--#define SSH_PORTABLE	"p1"
+--#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
+-+#define SSH_RELEASE	PACKAGE_STRING ", " SSH_VERSION "p1"
+ diff -ruN openssh-8.2p1/version.m4 openssh-8.2p1+x509-12.4.3/version.m4
+ --- openssh-8.2p1/version.m4	1970-01-01 02:00:00.000000000 +0200
+ +++ openssh-8.2p1+x509-12.4.3/version.m4	2020-03-21 19:07:00.000000000 +0200
diff --git a/net-misc/openssh/files/openssh-8.2_p1-hpn-14.20-X509-glue.patch b/net-misc/openssh/files/openssh-8.2_p1-hpn-14.20-X509-glue.patch
new file mode 100644
index 0000000..5af4534
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.2_p1-hpn-14.20-X509-glue.patch
@@ -0,0 +1,133 @@
+diff -ur '--exclude=*.un~' a/openssh-8_1_P1-hpn-AES-CTR-14.20.diff b/openssh-8_1_P1-hpn-AES-CTR-14.20.diff
+--- a/openssh-8_1_P1-hpn-AES-CTR-14.20.diff	2020-02-15 13:41:56.143193830 -0800
++++ b/openssh-8_1_P1-hpn-AES-CTR-14.20.diff	2020-02-15 13:46:40.060133610 -0800
+@@ -3,9 +3,9 @@
+ --- a/Makefile.in
+ +++ b/Makefile.in
+ @@ -42,7 +42,7 @@ CC=@CC@
+- CFLAGS_NOPIE=@CFLAGS_NOPIE@
+- CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
+- PICFLAG=@PICFLAG@
++ LD=@LD@
++ CFLAGS=@CFLAGS@ $(CFLAGS_EXTRA)
++ CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ @LDAP_CPPFLAGS@ $(PATHS) @DEFS@
+ -LIBS=@LIBS@
+ +LIBS=@LIBS@ -lpthread
+  K5LIBS=@K5LIBS@
+@@ -803,8 +803,8 @@
+  ssh_packet_set_connection(struct ssh *ssh, int fd_in, int fd_out)
+  {
+  	struct session_state *state;
+--	const struct sshcipher *none = cipher_by_name("none");
+-+	struct sshcipher *none = cipher_by_name("none");
++-	const struct sshcipher *none = cipher_none();
+++	struct sshcipher *none = cipher_none();
+  	int r;
+  
+  	if (none == NULL) {
+@@ -902,14 +902,14 @@
+  
+  /*
+ @@ -2118,6 +2125,8 @@ fill_default_options(Options * options)
+- 		options->canonicalize_hostname = SSH_CANONICALISE_NO;
+- 	if (options->fingerprint_hash == -1)
+  		options->fingerprint_hash = SSH_FP_HASH_DEFAULT;
++ 	if (options->update_hostkeys == -1)
++ 		options->update_hostkeys = 0;
+ +	if (options->disable_multithreaded == -1)
+ +		options->disable_multithreaded = 0;
+- #ifdef ENABLE_SK_INTERNAL
+  	if (options->sk_provider == NULL)
+- 		options->sk_provider = xstrdup("internal");
++ 		options->sk_provider = xstrdup("$SSH_SK_PROVIDER");
++  
+ diff --git a/readconf.h b/readconf.h
+ index 8e36bf32..c803eca7 100644
+ --- a/readconf.h
+@@ -948,9 +948,9 @@
+  	/* Portable-specific options */
+  	sUsePAM,
+ +	sDisableMTAES,
+- 	/* Standard Options */
+- 	sPort, sHostKeyFile, sLoginGraceTime,
+- 	sPermitRootLogin, sLogFacility, sLogLevel,
++ 	/* X.509 Standard Options */
++ 	sHostbasedAlgorithms,
++ 	sPubkeyAlgorithms,
+ @@ -643,6 +647,7 @@ static struct {
+  	{ "authorizedprincipalsfile", sAuthorizedPrincipalsFile, SSHCFG_ALL },
+  	{ "kexalgorithms", sKexAlgorithms, SSHCFG_GLOBAL },
+Only in b: openssh-8_1_P1-hpn-AES-CTR-14.20.diff.orig
+diff -ur '--exclude=*.un~' a/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff b/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff
+--- a/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff	2020-02-15 13:41:56.144193830 -0800
++++ b/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff	2020-02-15 13:45:36.665147504 -0800
+@@ -382,7 +382,7 @@
+ @@ -884,6 +884,10 @@ kex_choose_conf(struct ssh *ssh)
+  	int nenc, nmac, ncomp;
+  	u_int mode, ctos, need, dh_need, authlen;
+- 	int r, first_kex_follows;
++ 	int r, first_kex_follows = 0;
+ +	int auth_flag;
+ +
+ +	auth_flag = packet_authentication_state(ssh);
+@@ -391,8 +391,8 @@
+  	debug2("local %s KEXINIT proposal", kex->server ? "server" : "client");
+  	if ((r = kex_buf2prop(kex->my, NULL, &my)) != 0)
+ @@ -954,6 +958,14 @@ kex_choose_conf(struct ssh *ssh)
+- 			peer[ncomp] = NULL;
+- 			goto out;
++ 			else
++ 				fatal("Pre-authentication none cipher requests are not allowed.");
+  		}
+ +		debug("REQUESTED ENC.NAME is '%s'", newkeys->enc.name);
+ +		if (strcmp(newkeys->enc.name, "none") == 0) {
+@@ -1169,15 +1169,3 @@
+  # Example of overriding settings on a per-user basis
+  #Match User anoncvs
+  #	X11Forwarding no
+-diff --git a/version.h b/version.h
+-index 6b3fadf8..ec1d2e27 100644
+---- a/version.h
+-+++ b/version.h
+-@@ -3,4 +3,6 @@
+- #define SSH_VERSION	"OpenSSH_8.1"
+- 
+- #define SSH_PORTABLE	"p1"
+--#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
+-+#define SSH_HPN         "-hpn14v20"
+-+#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE SSH_HPN
+-+ 
+diff -ur '--exclude=*.un~' a/openssh-8_1_P1-hpn-PeakTput-14.20.diff b/openssh-8_1_P1-hpn-PeakTput-14.20.diff
+--- a/openssh-8_1_P1-hpn-PeakTput-14.20.diff	2020-02-15 13:41:43.834196317 -0800
++++ b/openssh-8_1_P1-hpn-PeakTput-14.20.diff	2020-02-15 13:45:36.665147504 -0800
+@@ -12,9 +12,9 @@
+  static long stalled;		/* how long we have been stalled */
+  static int bytes_per_second;	/* current speed in bytes per second */
+ @@ -127,6 +129,7 @@ refresh_progress_meter(int force_update)
++ 	off_t bytes_left;
+  	int cur_speed;
+- 	int hours, minutes, seconds;
+- 	int file_len;
++ 	int len;
+ +	off_t delta_pos;
+  
+  	if ((!force_update && !alarm_fired && !win_resized) || !can_output())
+@@ -33,12 +33,12 @@
+ @@ -166,7 +173,7 @@ refresh_progress_meter(int force_update)
+  
+  	/* filename */
+- 	buf[0] = '\0';
+--	file_len = win_size - 36;
+-+	file_len = win_size - 45;
+- 	if (file_len > 0) {
+- 		buf[0] = '\r';
+- 		snmprintf(buf+1, sizeof(buf)-1, &file_len, "%-*s",
++ 	if (win_size > 36) {
++-		int file_len = win_size - 36;
+++		int file_len = win_size - 45;
++ 		snmprintf(buf+1, sizeof(buf)-1, &file_len, "%-*s ",
++ 		    file_len, file);
++ 	}
+ @@ -191,6 +198,15 @@ refresh_progress_meter(int force_update)
+  	    (off_t)bytes_per_second);
+  	strlcat(buf, "/s ", win_size);
diff --git a/net-misc/openssh/files/openssh-8.2_p1-hpn-14.20-glue.patch b/net-misc/openssh/files/openssh-8.2_p1-hpn-14.20-glue.patch
new file mode 100644
index 0000000..b2163fe
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.2_p1-hpn-14.20-glue.patch
@@ -0,0 +1,151 @@
+diff -ur '--exclude=*.un~' a/openssh-8_1_P1-hpn-AES-CTR-14.20.diff b/openssh-8_1_P1-hpn-AES-CTR-14.20.diff
+--- a/openssh-8_1_P1-hpn-AES-CTR-14.20.diff	2020-02-15 12:50:44.413776914 -0800
++++ b/openssh-8_1_P1-hpn-AES-CTR-14.20.diff	2020-02-15 12:53:06.190742744 -0800
+@@ -3,9 +3,9 @@
+ --- a/Makefile.in
+ +++ b/Makefile.in
+ @@ -42,7 +42,7 @@ CC=@CC@
+- LD=@LD@
+- CFLAGS=@CFLAGS@
++ CFLAGS_NOPIE=@CFLAGS_NOPIE@
+  CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
++ PICFLAG=@PICFLAG@
+ -LIBS=@LIBS@
+ +LIBS=@LIBS@ -lpthread
+  K5LIBS=@K5LIBS@
+@@ -902,14 +902,14 @@
+  
+  /*
+ @@ -2118,6 +2125,8 @@ fill_default_options(Options * options)
++ 		options->canonicalize_hostname = SSH_CANONICALISE_NO;
++ 	if (options->fingerprint_hash == -1)
+  		options->fingerprint_hash = SSH_FP_HASH_DEFAULT;
+- 	if (options->update_hostkeys == -1)
+- 		options->update_hostkeys = 0;
+ +	if (options->disable_multithreaded == -1)
+ +		options->disable_multithreaded = 0;
+- 
+- 	/* Expand KEX name lists */
+- 	all_cipher = cipher_alg_list(',', 0);
++ #ifdef ENABLE_SK_INTERNAL
++ 	if (options->sk_provider == NULL)
++ 		options->sk_provider = xstrdup("internal");
+ diff --git a/readconf.h b/readconf.h
+ index 8e36bf32..c803eca7 100644
+ --- a/readconf.h
+@@ -952,9 +952,9 @@
+  	sPort, sHostKeyFile, sLoginGraceTime,
+  	sPermitRootLogin, sLogFacility, sLogLevel,
+ @@ -643,6 +647,7 @@ static struct {
+- 	{ "trustedusercakeys", sTrustedUserCAKeys, SSHCFG_ALL },
+  	{ "authorizedprincipalsfile", sAuthorizedPrincipalsFile, SSHCFG_ALL },
+  	{ "kexalgorithms", sKexAlgorithms, SSHCFG_GLOBAL },
++ 	{ "include", sInclude, SSHCFG_ALL },
+ +	{ "disableMTAES", sDisableMTAES, SSHCFG_ALL },
+  	{ "ipqos", sIPQoS, SSHCFG_ALL },
+  	{ "authorizedkeyscommand", sAuthorizedKeysCommand, SSHCFG_ALL },
+diff -ur '--exclude=*.un~' a/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff b/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff
+--- a/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff	2020-02-15 12:50:44.413776914 -0800
++++ b/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff	2020-02-15 12:51:19.541768656 -0800
+@@ -409,18 +409,10 @@
+ index 817da43b..b2bcf78f 100644
+ --- a/packet.c
+ +++ b/packet.c
+-@@ -925,6 +925,24 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
++@@ -925,6 +925,16 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
+  	return 0;
+  }
+  
+-+/* this supports the forced rekeying required for the NONE cipher */
+-+int rekey_requested = 0;
+-+void
+-+packet_request_rekeying(void)
+-+{
+-+	rekey_requested = 1;
+-+}
+-+
+ +/* used to determine if pre or post auth when rekeying for aes-ctr
+ + * and none cipher switch */
+ +int
+@@ -434,20 +426,6 @@
+  #define MAX_PACKETS	(1U<<31)
+  static int
+  ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
+-@@ -951,6 +969,13 @@ ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
+- 	if (state->p_send.packets == 0 && state->p_read.packets == 0)
+- 		return 0;
+- 
+-+	/* used to force rekeying when called for by the none
+-+         * cipher switch methods -cjr */
+-+        if (rekey_requested == 1) {
+-+                rekey_requested = 0;
+-+                return 1;
+-+        }
+-+
+- 	/* Time-based rekeying */
+- 	if (state->rekey_interval != 0 &&
+- 	    (int64_t)state->rekey_time + state->rekey_interval <= monotime())
+ diff --git a/packet.h b/packet.h
+ index 8ccfd2e0..1ad9bc06 100644
+ --- a/packet.h
+@@ -476,9 +454,9 @@
+  /* Format of the configuration file:
+  
+ @@ -167,6 +168,8 @@ typedef enum {
+- 	oHashKnownHosts,
+  	oTunnel, oTunnelDevice,
+  	oLocalCommand, oPermitLocalCommand, oRemoteCommand,
++ 	oDisableMTAES,
+ +	oTcpRcvBufPoll, oTcpRcvBuf, oHPNDisabled, oHPNBufferSize,
+ +	oNoneEnabled, oNoneSwitch,
+  	oVisualHostKey,
+@@ -615,9 +593,9 @@
+  	int	ip_qos_bulk;		/* IP ToS/DSCP/class for bulk traffic */
+  	SyslogFacility log_facility;	/* Facility for system logging. */
+ @@ -112,7 +116,10 @@ typedef struct {
+- 
+  	int	enable_ssh_keysign;
+  	int64_t rekey_limit;
++ 	int     disable_multithreaded; /*disable multithreaded aes-ctr*/
+ +	int     none_switch;    /* Use none cipher */
+ +	int     none_enabled;   /* Allow none to be used */
+  	int	rekey_interval;
+@@ -700,9 +678,9 @@
+ +			options->hpn_buffer_size = CHAN_TCP_WINDOW_DEFAULT;
+ +	}
+ +
++ 	if (options->disable_multithreaded == -1)
++ 		options->disable_multithreaded = 0;
+  	if (options->ip_qos_interactive == -1)
+- 		options->ip_qos_interactive = IPTOS_DSCP_AF21;
+- 	if (options->ip_qos_bulk == -1)
+ @@ -486,6 +532,8 @@ typedef enum {
+  	sPasswordAuthentication, sKbdInteractiveAuthentication,
+  	sListenAddress, sAddressFamily,
+@@ -1079,11 +1057,11 @@
+  	xxx_host = host;
+  	xxx_hostaddr = hostaddr;
+  
+-@@ -422,6 +433,28 @@ ssh_userauth2(struct ssh *ssh, const char *local_user,
++@@ -422,7 +433,28 @@ ssh_userauth2(struct ssh *ssh, const char *local_user,
+  
+  	if (!authctxt.success)
+  		fatal("Authentication failed.");
+-+
++ 
+ +	/*
+ +	 * If the user wants to use the none cipher, do it post authentication
+ +	 * and only if the right conditions are met -- both of the NONE commands
+@@ -1105,9 +1083,9 @@
+ +		}
+ +	}
+ +
+- 	debug("Authentication succeeded (%s).", authctxt.method->name);
+- }
+- 
++ #ifdef WITH_OPENSSL
++ 	if (options.disable_multithreaded == 0) {
++ 		/* if we are using aes-ctr there can be issues in either a fork or sandbox
+ diff --git a/sshd.c b/sshd.c
+ index 11571c01..23a06022 100644
+ --- a/sshd.c
diff --git a/net-misc/openssh/files/openssh-8.2_p1-hpn-14.20-libressl.patch b/net-misc/openssh/files/openssh-8.2_p1-hpn-14.20-libressl.patch
new file mode 100644
index 0000000..69dd22a
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.2_p1-hpn-14.20-libressl.patch
@@ -0,0 +1,20 @@
+--- a/openssh-8_1_P1-hpn-AES-CTR-14.20.diff	2020-04-17 10:31:37.392120799 -0700
++++ b/openssh-8_1_P1-hpn-AES-CTR-14.20.diff	2020-04-17 10:32:46.143684424 -0700
+@@ -672,7 +672,7 @@
+ +const EVP_CIPHER *
+ +evp_aes_ctr_mt(void)
+ +{
+-+# if OPENSSL_VERSION_NUMBER >= 0x10100000UL
+++# if (OPENSSL_VERSION_NUMBER >= 0x10100000UL || defined(HAVE_OPAQUE_STRUCTS)) && !defined(LIBRESSL_VERSION_NUMBER)
+ +	static EVP_CIPHER *aes_ctr;
+ +	aes_ctr = EVP_CIPHER_meth_new(NID_undef, 16/*block*/, 16/*key*/);
+ +	EVP_CIPHER_meth_set_iv_length(aes_ctr, AES_BLOCK_SIZE);
+@@ -701,7 +701,7 @@
+ +		EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV;
+ +#  endif /*SSH_OLD_EVP*/
+ +        return &aes_ctr;
+-+# endif /*OPENSSH_VERSION_NUMBER*/
+++# endif /*OPENSSL_VERSION_NUMBER*/
+ +}
+ +
+ +#endif /* defined(WITH_OPENSSL) */
diff --git a/net-misc/openssh/files/openssh-8.2_p1-hpn-14.20-sctp-glue.patch b/net-misc/openssh/files/openssh-8.2_p1-hpn-14.20-sctp-glue.patch
new file mode 100644
index 0000000..2397aad
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.2_p1-hpn-14.20-sctp-glue.patch
@@ -0,0 +1,19 @@
+diff -ur '--exclude=*.un~' a/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff b/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff
+--- a/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff	2020-02-15 12:10:00.321998279 -0800
++++ b/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff	2020-02-15 12:10:21.759980508 -0800
+@@ -1169,15 +1169,3 @@
+  # Example of overriding settings on a per-user basis
+  #Match User anoncvs
+  #	X11Forwarding no
+-diff --git a/version.h b/version.h
+-index 6b3fadf8..ec1d2e27 100644
+---- a/version.h
+-+++ b/version.h
+-@@ -3,4 +3,6 @@
+- #define SSH_VERSION	"OpenSSH_8.1"
+- 
+- #define SSH_PORTABLE	"p1"
+--#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
+-+#define SSH_HPN         "-hpn14v20"
+-+#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE SSH_HPN
+-+ 
diff --git a/net-misc/openssh/files/openssh-8.3_p1-X509-glue-12.5.1.patch b/net-misc/openssh/files/openssh-8.3_p1-X509-glue-12.5.1.patch
new file mode 100644
index 0000000..d1651bc
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.3_p1-X509-glue-12.5.1.patch
@@ -0,0 +1,35 @@
+Only in b: .openssh-8.3p1+x509-12.5.1.diff.un~
+diff -u a/openssh-8.3p1+x509-12.5.1.diff b/openssh-8.3p1+x509-12.5.1.diff
+--- a/openssh-8.3p1+x509-12.5.1.diff	2020-06-08 10:13:08.937543708 -0700
++++ b/openssh-8.3p1+x509-12.5.1.diff	2020-06-08 10:16:33.417271984 -0700
+@@ -35541,12 +35541,11 @@
+  
+  install: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config
+  install-nokeys: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf
+-@@ -382,6 +363,8 @@
++@@ -382,6 +363,7 @@
+  	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)5
+  	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)8
+  	$(MKDIR_P) $(DESTDIR)$(libexecdir)
+ +	$(MKDIR_P) $(DESTDIR)$(sshcadir)
+-+	$(MKDIR_P) $(DESTDIR)$(piddir)
+  	$(MKDIR_P) -m 0755 $(DESTDIR)$(PRIVSEP_PATH)
+  	$(INSTALL) -m 0755 $(STRIP_OPT) ssh$(EXEEXT) $(DESTDIR)$(bindir)/ssh$(EXEEXT)
+  	$(INSTALL) -m 0755 $(STRIP_OPT) scp$(EXEEXT) $(DESTDIR)$(bindir)/scp$(EXEEXT)
+@@ -97028,16 +97027,6 @@
+ +int	 asnmprintf(char **, size_t, int *, const char *, ...)
+  	     __attribute__((format(printf, 4, 5)));
+  void	 msetlocale(void);
+-diff -ruN openssh-8.3p1/version.h openssh-8.3p1+x509-12.5.1/version.h
+---- openssh-8.3p1/version.h	2020-05-27 03:38:00.000000000 +0300
+-+++ openssh-8.3p1+x509-12.5.1/version.h	2020-06-07 11:07:00.000000000 +0300
+-@@ -2,5 +2,4 @@
+- 
+- #define SSH_VERSION	"OpenSSH_8.3"
+- 
+--#define SSH_PORTABLE	"p1"
+--#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
+-+#define SSH_RELEASE	PACKAGE_STRING ", " SSH_VERSION "p1"
+ diff -ruN openssh-8.3p1/version.m4 openssh-8.3p1+x509-12.5.1/version.m4
+ --- openssh-8.3p1/version.m4	1970-01-01 02:00:00.000000000 +0200
+ +++ openssh-8.3p1+x509-12.5.1/version.m4	2020-06-07 11:07:00.000000000 +0300
diff --git a/net-misc/openssh/files/openssh-8.3_p1-hpn-14.20-glue.patch b/net-misc/openssh/files/openssh-8.3_p1-hpn-14.20-glue.patch
new file mode 100644
index 0000000..4414f9b
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.3_p1-hpn-14.20-glue.patch
@@ -0,0 +1,177 @@
+Only in b: .openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff.un~
+diff -ur a/openssh-8_1_P1-hpn-AES-CTR-14.20.diff b/openssh-8_1_P1-hpn-AES-CTR-14.20.diff
+--- a/openssh-8_1_P1-hpn-AES-CTR-14.20.diff	2020-05-27 13:52:27.704108928 -0700
++++ b/openssh-8_1_P1-hpn-AES-CTR-14.20.diff	2020-05-27 13:52:49.803967500 -0700
+@@ -3,9 +3,9 @@
+ --- a/Makefile.in
+ +++ b/Makefile.in
+ @@ -42,7 +42,7 @@ CC=@CC@
+- LD=@LD@
+- CFLAGS=@CFLAGS@
++ CFLAGS_NOPIE=@CFLAGS_NOPIE@
+  CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
++ PICFLAG=@PICFLAG@
+ -LIBS=@LIBS@
+ +LIBS=@LIBS@ -lpthread
+  K5LIBS=@K5LIBS@
+@@ -902,14 +902,14 @@
+  
+  /*
+ @@ -2118,6 +2125,8 @@ fill_default_options(Options * options)
++ 		options->canonicalize_hostname = SSH_CANONICALISE_NO;
++ 	if (options->fingerprint_hash == -1)
+  		options->fingerprint_hash = SSH_FP_HASH_DEFAULT;
+- 	if (options->update_hostkeys == -1)
+- 		options->update_hostkeys = 0;
+ +	if (options->disable_multithreaded == -1)
+ +		options->disable_multithreaded = 0;
+- 
+- 	/* Expand KEX name lists */
+- 	all_cipher = cipher_alg_list(',', 0);
++ #ifdef ENABLE_SK_INTERNAL
++ 	if (options->sk_provider == NULL)
++ 		options->sk_provider = xstrdup("internal");
+ diff --git a/readconf.h b/readconf.h
+ index 8e36bf32..c803eca7 100644
+ --- a/readconf.h
+@@ -952,9 +952,9 @@
+  	sPort, sHostKeyFile, sLoginGraceTime,
+  	sPermitRootLogin, sLogFacility, sLogLevel,
+ @@ -643,6 +647,7 @@ static struct {
+- 	{ "trustedusercakeys", sTrustedUserCAKeys, SSHCFG_ALL },
+  	{ "authorizedprincipalsfile", sAuthorizedPrincipalsFile, SSHCFG_ALL },
+  	{ "kexalgorithms", sKexAlgorithms, SSHCFG_GLOBAL },
++ 	{ "include", sInclude, SSHCFG_ALL },
+ +	{ "disableMTAES", sDisableMTAES, SSHCFG_ALL },
+  	{ "ipqos", sIPQoS, SSHCFG_ALL },
+  	{ "authorizedkeyscommand", sAuthorizedKeysCommand, SSHCFG_ALL },
+diff -ur a/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff b/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff
+--- a/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff	2020-05-27 13:52:27.705108921 -0700
++++ b/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff	2020-05-27 14:03:57.888683100 -0700
+@@ -409,18 +409,10 @@
+ index 817da43b..b2bcf78f 100644
+ --- a/packet.c
+ +++ b/packet.c
+-@@ -925,6 +925,24 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
++@@ -925,6 +925,16 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
+  	return 0;
+  }
+  
+-+/* this supports the forced rekeying required for the NONE cipher */
+-+int rekey_requested = 0;
+-+void
+-+packet_request_rekeying(void)
+-+{
+-+	rekey_requested = 1;
+-+}
+-+
+ +/* used to determine if pre or post auth when rekeying for aes-ctr
+ + * and none cipher switch */
+ +int
+@@ -434,20 +426,6 @@
+  #define MAX_PACKETS	(1U<<31)
+  static int
+  ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
+-@@ -951,6 +969,13 @@ ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
+- 	if (state->p_send.packets == 0 && state->p_read.packets == 0)
+- 		return 0;
+- 
+-+	/* used to force rekeying when called for by the none
+-+         * cipher switch methods -cjr */
+-+        if (rekey_requested == 1) {
+-+                rekey_requested = 0;
+-+                return 1;
+-+        }
+-+
+- 	/* Time-based rekeying */
+- 	if (state->rekey_interval != 0 &&
+- 	    (int64_t)state->rekey_time + state->rekey_interval <= monotime())
+ diff --git a/packet.h b/packet.h
+ index 8ccfd2e0..1ad9bc06 100644
+ --- a/packet.h
+@@ -476,9 +454,9 @@
+  /* Format of the configuration file:
+  
+ @@ -167,6 +168,8 @@ typedef enum {
+- 	oHashKnownHosts,
+  	oTunnel, oTunnelDevice,
+  	oLocalCommand, oPermitLocalCommand, oRemoteCommand,
++ 	oDisableMTAES,
+ +	oTcpRcvBufPoll, oTcpRcvBuf, oHPNDisabled, oHPNBufferSize,
+ +	oNoneEnabled, oNoneSwitch,
+  	oVisualHostKey,
+@@ -615,9 +593,9 @@
+  	int	ip_qos_bulk;		/* IP ToS/DSCP/class for bulk traffic */
+  	SyslogFacility log_facility;	/* Facility for system logging. */
+ @@ -112,7 +116,10 @@ typedef struct {
+- 
+  	int	enable_ssh_keysign;
+  	int64_t rekey_limit;
++ 	int     disable_multithreaded; /*disable multithreaded aes-ctr*/
+ +	int     none_switch;    /* Use none cipher */
+ +	int     none_enabled;   /* Allow none to be used */
+  	int	rekey_interval;
+@@ -700,9 +678,9 @@
+ +			options->hpn_buffer_size = CHAN_TCP_WINDOW_DEFAULT;
+ +	}
+ +
++ 	if (options->disable_multithreaded == -1)
++ 		options->disable_multithreaded = 0;
+  	if (options->ip_qos_interactive == -1)
+- 		options->ip_qos_interactive = IPTOS_DSCP_AF21;
+- 	if (options->ip_qos_bulk == -1)
+ @@ -486,6 +532,8 @@ typedef enum {
+  	sPasswordAuthentication, sKbdInteractiveAuthentication,
+  	sListenAddress, sAddressFamily,
+@@ -731,11 +709,10 @@
+  			*flags = keywords[i].flags;
+  			return keywords[i].opcode;
+  		}
+-@@ -1424,10 +1477,27 @@ process_server_config_line(ServerOptions *options, char *line,
+- 		multistate_ptr = multistate_flag;
++@@ -1424,12 +1477,28 @@ process_server_config_line(ServerOptions *options, char *line,
++ 		multistate_ptr = multistate_ignore_rhosts;
+  		goto parse_multistate;
+  
+-+
+ +	case sTcpRcvBufPoll:
+ +		intptr = &options->tcp_rcv_buf_poll;
+ +		goto parse_flag;
+@@ -750,7 +727,9 @@
+ +
+  	case sIgnoreUserKnownHosts:
+  		intptr = &options->ignore_user_known_hosts;
+- 		goto parse_flag;
++  parse_flag:
++ 		multistate_ptr = multistate_flag;
++ 		goto parse_multistate;
+  
+ +	case sNoneEnabled:
+ +		intptr = &options->none_enabled;
+@@ -1079,11 +1058,11 @@
+  	xxx_host = host;
+  	xxx_hostaddr = hostaddr;
+  
+-@@ -422,6 +433,28 @@ ssh_userauth2(struct ssh *ssh, const char *local_user,
++@@ -422,7 +433,28 @@ ssh_userauth2(struct ssh *ssh, const char *local_user,
+  
+  	if (!authctxt.success)
+  		fatal("Authentication failed.");
+-+
++ 
+ +	/*
+ +	 * If the user wants to use the none cipher, do it post authentication
+ +	 * and only if the right conditions are met -- both of the NONE commands
+@@ -1105,9 +1084,9 @@
+ +		}
+ +	}
+ +
+- 	debug("Authentication succeeded (%s).", authctxt.method->name);
+- }
+- 
++ #ifdef WITH_OPENSSL
++ 	if (options.disable_multithreaded == 0) {
++ 		/* if we are using aes-ctr there can be issues in either a fork or sandbox
+ diff --git a/sshd.c b/sshd.c
+ index 11571c01..23a06022 100644
+ --- a/sshd.c
diff --git a/net-misc/openssh/files/openssh-8.3_p1-sha2-include.patch b/net-misc/openssh/files/openssh-8.3_p1-sha2-include.patch
new file mode 100644
index 0000000..6bd7166
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.3_p1-sha2-include.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.in b/Makefile.in
+index c9e4294d..2dbfac24 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -44,7 +44,7 @@ CC=@CC@
+ LD=@LD@
+ CFLAGS=@CFLAGS@
+ CFLAGS_NOPIE=@CFLAGS_NOPIE@
+-CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
++CPPFLAGS=-I. -I$(srcdir) -I$(srcdir)/openbsd-compat @CPPFLAGS@ $(PATHS) @DEFS@
+ PICFLAG=@PICFLAG@
+ LIBS=@LIBS@
+ K5LIBS=@K5LIBS@
diff --git a/net-misc/openssh/files/sshd.confd b/net-misc/openssh/files/sshd.confd
deleted file mode 100644
index 28952b4..0000000
--- a/net-misc/openssh/files/sshd.confd
+++ /dev/null
@@ -1,21 +0,0 @@
-# /etc/conf.d/sshd: config file for /etc/init.d/sshd
-
-# Where is your sshd_config file stored?
-
-SSHD_CONFDIR="/etc/ssh"
-
-
-# Any random options you want to pass to sshd.
-# See the sshd(8) manpage for more info.
-
-SSHD_OPTS=""
-
-
-# Pid file to use (needs to be absolute path).
-
-#SSHD_PIDFILE="/var/run/sshd.pid"
-
-
-# Path to the sshd binary (needs to be absolute path).
-
-#SSHD_BINARY="/usr/sbin/sshd"
diff --git a/net-misc/openssh/files/sshd.initd b/net-misc/openssh/files/sshd.initd
deleted file mode 100644
index c5df469..0000000
--- a/net-misc/openssh/files/sshd.initd
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_commands="checkconfig"
-extra_started_commands="reload"
-
-: ${SSHD_CONFDIR:=${RC_PREFIX%/}/etc/ssh}
-: ${SSHD_CONFIG:=${SSHD_CONFDIR}/sshd_config}
-: ${SSHD_PIDFILE:=${RC_PREFIX%/}/run/${SVCNAME}.pid}
-: ${SSHD_BINARY:=${RC_PREFIX%/}/usr/sbin/sshd}
-: ${SSHD_KEYGEN_BINARY:=${RC_PREFIX%/}/usr/bin/ssh-keygen}
-
-command="${SSHD_BINARY}"
-pidfile="${SSHD_PIDFILE}"
-command_args="${SSHD_OPTS} -o PidFile=${pidfile} -f ${SSHD_CONFIG}"
-
-# Wait one second (length chosen arbitrarily) to see if sshd actually
-# creates a PID file, or if it crashes for some reason like not being
-# able to bind to the address in ListenAddress (bug 617596).
-: ${SSHD_SSD_OPTS:=--wait 1000}
-start_stop_daemon_args="${SSHD_SSD_OPTS}"
-
-depend() {
-	# Entropy can be used by ssh-keygen, among other things, but
-	# is not strictly required (bug 470020).
-	use logger dns entropy
-	if [ "${rc_need+set}" = "set" ] ; then
-		: # Do nothing, the user has explicitly set rc_need
-	else
-		local x warn_addr
-		for x in $(awk '/^ListenAddress/{ print $2 }' "$SSHD_CONFIG" 2>/dev/null) ; do
-			case "${x}" in
-				0.0.0.0|0.0.0.0:*) ;;
-				::|\[::\]*) ;;
-				*) warn_addr="${warn_addr} ${x}" ;;
-			esac
-		done
-		if [ -n "${warn_addr}" ] ; then
-			need net
-			ewarn "You are binding an interface in ListenAddress statement in your sshd_config!"
-			ewarn "You must add rc_need=\"net.FOO\" to your ${RC_PREFIX%/}/etc/conf.d/sshd"
-			ewarn "where FOO is the interface(s) providing the following address(es):"
-			ewarn "${warn_addr}"
-		fi
-	fi
-}
-
-checkconfig() {
-	checkpath --mode 0755 --directory "${RC_PREFIX%/}/var/empty"
-
-	if [ ! -e "${SSHD_CONFIG}" ] ; then
-		eerror "You need an ${SSHD_CONFIG} file to run sshd"
-		eerror "There is a sample file in /usr/share/doc/openssh"
-		return 1
-	fi
-
-	${SSHD_KEYGEN_BINARY} -A || return 2
-
-	"${command}" -t ${command_args} || return 3
-}
-
-start_pre() {
-	# If this isn't a restart, make sure that the user's config isn't
-	# busted before we try to start the daemon (this will produce
-	# better error messages than if we just try to start it blindly).
-	#
-	# If, on the other hand, this *is* a restart, then the stop_pre
-	# action will have ensured that the config is usable and we don't
-	# need to do that again.
-	if [ "${RC_CMD}" != "restart" ] ; then
-		checkconfig || return $?
-	fi
-}
-
-stop_pre() {
-	# If this is a restart, check to make sure the user's config
-	# isn't busted before we stop the running daemon.
-	if [ "${RC_CMD}" = "restart" ] ; then
-		checkconfig || return $?
-	fi
-}
-
-reload() {
-	checkconfig || return $?
-	ebegin "Reloading ${SVCNAME}"
-	start-stop-daemon --signal HUP --pidfile "${pidfile}"
-	eend $?
-}
diff --git a/net-misc/openssh/files/sshd.rc6.4 b/net-misc/openssh/files/sshd.rc6.4
deleted file mode 100644
index 5e30142..0000000
--- a/net-misc/openssh/files/sshd.rc6.4
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_commands="checkconfig"
-extra_started_commands="reload"
-
-: ${SSHD_CONFDIR:=/etc/ssh}
-: ${SSHD_CONFIG:=${SSHD_CONFDIR}/sshd_config}
-: ${SSHD_PIDFILE:=/var/run/${SVCNAME}.pid}
-: ${SSHD_BINARY:=/usr/sbin/sshd}
-
-depend() {
-	use logger dns
-	if [ "${rc_need+set}" = "set" ] ; then
-		: # Do nothing, the user has explicitly set rc_need
-	else
-		local x warn_addr
-		for x in $(awk '/^ListenAddress/{ print $2 }' "$SSHD_CONFIG" 2>/dev/null) ; do
-			case "${x}" in
-				0.0.0.0|0.0.0.0:*) ;;
-				::|\[::\]*) ;;
-				*) warn_addr="${warn_addr} ${x}" ;;
-			esac
-		done
-		if [ -n "${warn_addr}" ] ; then
-			need net
-			ewarn "You are binding an interface in ListenAddress statement in your sshd_config!"
-			ewarn "You must add rc_need=\"net.FOO\" to your /etc/conf.d/sshd"
-			ewarn "where FOO is the interface(s) providing the following address(es):"
-			ewarn "${warn_addr}"
-		fi
-	fi
-}
-
-checkconfig() {
-	if [ ! -d /var/empty ] ; then
-		mkdir -p /var/empty || return 1
-	fi
-
-	if [ ! -e "${SSHD_CONFIG}" ] ; then
-		eerror "You need an ${SSHD_CONFIG} file to run sshd"
-		eerror "There is a sample file in /usr/share/doc/openssh"
-		return 1
-	fi
-
-	ssh-keygen -A || return 1
-
-	[ "${SSHD_PIDFILE}" != "/var/run/sshd.pid" ] \
-		&& SSHD_OPTS="${SSHD_OPTS} -o PidFile=${SSHD_PIDFILE}"
-	[ "${SSHD_CONFIG}" != "/etc/ssh/sshd_config" ] \
-		&& SSHD_OPTS="${SSHD_OPTS} -f ${SSHD_CONFIG}"
-
-	"${SSHD_BINARY}" -t ${SSHD_OPTS} || return 1
-}
-
-start() {
-	checkconfig || return 1
-
-	ebegin "Starting ${SVCNAME}"
-	start-stop-daemon --start --exec "${SSHD_BINARY}" \
-	    --pidfile "${SSHD_PIDFILE}" \
-	    -- ${SSHD_OPTS}
-	eend $?
-}
-
-stop() {
-	if [ "${RC_CMD}" = "restart" ] ; then
-		checkconfig || return 1
-	fi
-
-	ebegin "Stopping ${SVCNAME}"
-	start-stop-daemon --stop --exec "${SSHD_BINARY}" \
-	    --pidfile "${SSHD_PIDFILE}" --quiet
-	eend $?
-}
-
-reload() {
-	checkconfig || return 1
-	ebegin "Reloading ${SVCNAME}"
-	start-stop-daemon --signal HUP \
-	    --exec "${SSHD_BINARY}" --pidfile "${SSHD_PIDFILE}"
-	eend $?
-}
diff --git a/net-misc/openssh/metadata.xml b/net-misc/openssh/metadata.xml
index 82a556e..9ce34e6 100644
--- a/net-misc/openssh/metadata.xml
+++ b/net-misc/openssh/metadata.xml
@@ -5,10 +5,6 @@
     <email>base-system@gentoo.org</email>
     <name>Gentoo Base System</name>
   </maintainer>
-  <maintainer type="person">
-    <email>robbat2@gentoo.org</email>
-    <description>LPK issues. Only assign if it's a direct LPK issue. Do not directly assign for anything else.</description>
-  </maintainer>
   <longdescription>
 OpenSSH is a FREE version of the SSH protocol suite of network connectivity tools that 
 increasing numbers of people on the Internet are coming to rely on. Many users of telnet, 
@@ -25,11 +21,11 @@
 </longdescription>
   <use>
     <flag name="bindist">Disable EC/RC5 algorithms in OpenSSL for patent reasons.</flag>
+    <flag name="scp">Enable scp command with known security problems. See bug 733802</flag>
     <flag name="hpn">Enable high performance ssh</flag>
-    <flag name="ldap">Add support for storing SSH public keys in LDAP</flag>
     <flag name="ldns">Use LDNS for DNSSEC/SSHFP validation.</flag>
     <flag name="livecd">Enable root password logins for live-cd environment.</flag>
-    <flag name="ssh1">Support the legacy/weak SSH1 protocol</flag>
+    <flag name="security-key">Include builtin U2F/FIDO support</flag>
     <flag name="ssl">Enable additional crypto algorithms via OpenSSL</flag>
     <flag name="X509">Adds support for X.509 certificate authentication</flag>
     <flag name="xmss">Enable XMSS post-quantum authentication algorithm</flag>
diff --git a/net-misc/openssh/openssh-8.1_p1-r1.ebuild b/net-misc/openssh/openssh-8.3_p1-r4.ebuild
similarity index 71%
rename from net-misc/openssh/openssh-8.1_p1-r1.ebuild
rename to net-misc/openssh/openssh-8.3_p1-r4.ebuild
index 44d778f..55be19d 100644
--- a/net-misc/openssh/openssh-8.1_p1-r1.ebuild
+++ b/net-misc/openssh/openssh-8.3_p1-r4.ebuild
@@ -1,26 +1,27 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-inherit user flag-o-matic multilib autotools pam systemd
+inherit user-info flag-o-matic multilib autotools pam systemd toolchain-funcs
 
 # Make it more portable between straight releases
 # and _p? releases.
 PARCH=${P/_}
-#HPN_PV="${PV^^}"
-HPN_PV="7.8_P1"
 
-HPN_VER="14.16"
+# PV to USE for HPN patches
+#HPN_PV="${PV^^}"
+HPN_PV="8.1_P1"
+
+HPN_VER="14.20"
 HPN_PATCHES=(
 	${PN}-${HPN_PV/./_}-hpn-DynWinNoneSwitch-${HPN_VER}.diff
 	${PN}-${HPN_PV/./_}-hpn-AES-CTR-${HPN_VER}.diff
+	${PN}-${HPN_PV/./_}-hpn-PeakTput-${HPN_VER}.diff
 )
 
 SCTP_VER="1.2" SCTP_PATCH="${PARCH}-sctp-${SCTP_VER}.patch.xz"
-X509_VER="12.3" X509_PATCH="${PARCH}+x509-${X509_VER}.diff.gz"
-
-PATCH_SET="openssh-7.9p1-patches-1.0"
+X509_VER="12.5.1" X509_PATCH="${PARCH}+x509-${X509_VER}.diff.gz"
 
 DESCRIPTION="Port of OpenBSD's free SSH release"
 HOMEPAGE="https://www.openssh.com/"
@@ -28,19 +29,25 @@
 	${SCTP_PATCH:+sctp? ( https://dev.gentoo.org/~chutzpah/dist/openssh/${SCTP_PATCH} )}
 	${HPN_VER:+hpn? ( $(printf "mirror://sourceforge/hpnssh/HPN-SSH%%20${HPN_VER/./v}%%20${HPN_PV/_P/p}/%s\n" "${HPN_PATCHES[@]}") )}
 	${X509_PATCH:+X509? ( https://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_PATCH} )}
-	"
+"
+S="${WORKDIR}/${PARCH}"
 
 LICENSE="BSD GPL-2"
 SLOT="0"
 KEYWORDS="*"
 # Probably want to drop ssl defaulting to on in a future version.
-IUSE="abi_mips_n32 audit bindist debug hpn kerberos kernel_linux ldns libedit libressl livecd pam +pie sctp selinux +ssl static test X X509 xmss"
+IUSE="abi_mips_n32 audit bindist debug hpn kerberos kernel_linux ldns libedit libressl livecd pam +pie +scp sctp security-key selinux +ssl static test X X509 xmss"
+
 RESTRICT="!test? ( test )"
-REQUIRED_USE="ldns? ( ssl )
+
+REQUIRED_USE="
+	ldns? ( ssl )
 	pie? ( !static )
 	static? ( !kerberos !pam )
-	X509? ( !sctp ssl )
-	test? ( ssl )"
+	X509? ( !sctp !security-key ssl !xmss )
+	xmss? ( || ( ssl libressl ) )
+	test? ( ssl )
+"
 
 LIB_DEPEND="
 	audit? ( sys-process/audit[static-libs(+)] )
@@ -51,6 +58,7 @@
 	)
 	libedit? ( dev-libs/libedit:=[static-libs(+)] )
 	sctp? ( net-misc/lksctp-tools[static-libs(+)] )
+	security-key? ( >=dev-libs/libfido2-1.4.0:=[static-libs(+)] )
 	selinux? ( >=sys-libs/libselinux-1.28[static-libs(+)] )
 	ssl? (
 		!libressl? (
@@ -65,23 +73,29 @@
 		)
 		libressl? ( dev-libs/libressl:0=[static-libs(+)] )
 	)
-	>=sys-libs/zlib-1.2.3:=[static-libs(+)]"
+	virtual/libcrypt:=[static-libs(+)]
+	>=sys-libs/zlib-1.2.3:=[static-libs(+)]
+"
 RDEPEND="
+	acct-group/sshd
+	acct-user/sshd
 	!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
 	pam? ( sys-libs/pam )
-	kerberos? ( virtual/krb5 )"
+	kerberos? ( virtual/krb5 )
+"
 DEPEND="${RDEPEND}
 	static? ( ${LIB_DEPEND} )
-	virtual/os-headers"
+	virtual/os-headers
+"
 RDEPEND="${RDEPEND}
 	pam? ( >=sys-auth/pambase-20081028 )
-	userland_GNU? ( virtual/shadow )
-	X? ( x11-apps/xauth )"
+	userland_GNU? ( !prefix? ( sys-apps/shadow ) )
+	X? ( x11-apps/xauth )
+"
 BDEPEND="
 	virtual/pkgconfig
-	sys-devel/autoconf"
-
-S="${WORKDIR}/${PARCH}"
+	sys-devel/autoconf
+"
 
 pkg_pretend() {
 	# this sucks, but i'd rather have people unable to `emerge -u openssh`
@@ -110,19 +124,21 @@
 
 src_prepare() {
 	sed -i \
-		-e "/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:${EPREFIX%/}/usr/bin/xauth:" \
+		-e "/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:${EPREFIX}/usr/bin/xauth:" \
 		pathnames.h || die
 
 	# don't break .ssh/authorized_keys2 for fun
 	sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die
 
 	eapply "${FILESDIR}"/${PN}-7.9_p1-include-stdlib.patch
-	eapply "${FILESDIR}"/${PN}-8.1_p1-GSSAPI-dns.patch #165444 integrated into gsskex
+	eapply "${FILESDIR}"/${PN}-8.2_p1-GSSAPI-dns.patch #165444 integrated into gsskex
 	eapply "${FILESDIR}"/${PN}-6.7_p1-openssl-ignore-status.patch
 	eapply "${FILESDIR}"/${PN}-7.5_p1-disable-conch-interop-tests.patch
 	eapply "${FILESDIR}"/${PN}-8.0_p1-fix-putty-tests.patch
 	eapply "${FILESDIR}"/${PN}-8.0_p1-deny-shmget-shmat-shmdt-in-preauth-privsep-child.patch
-	eapply "${FILESDIR}"/${PN}-8.1_p1-Add-POLLOUT-when-connecting-in-non-blocking-mode.patch
+
+	# workaround for https://bugs.gentoo.org/734984
+	use X509 || eapply "${FILESDIR}"/${PN}-8.3_p1-sha2-include.patch
 
 	[[ -d ${WORKDIR}/patches ]] && eapply "${WORKDIR}"/patches
 
@@ -134,7 +150,6 @@
 		popd &>/dev/null || die
 
 		eapply "${WORKDIR}"/${X509_PATCH%.*}
-		eapply "${FILESDIR}"/${P}-X509-$(ver_cut 1-2 ${X509_VER})-tests.patch
 
 		# We need to patch package version or any X.509 sshd will reject our ssh client
 		# with "userauth_pubkey: could not parse key: string is too large [preauth]"
@@ -168,25 +183,24 @@
 
 	if use hpn ; then
 		local hpn_patchdir="${T}/${P}-hpn${HPN_VER}"
-		mkdir "${hpn_patchdir}"
-		cp $(printf -- "${DISTDIR}/%s\n" "${HPN_PATCHES[@]}") "${hpn_patchdir}"
+		mkdir "${hpn_patchdir}" || die
+		cp $(printf -- "${DISTDIR}/%s\n" "${HPN_PATCHES[@]}") "${hpn_patchdir}" || die
 		pushd "${hpn_patchdir}" &>/dev/null || die
-		eapply "${FILESDIR}"/${PN}-8.1_p1-hpn-glue.patch
+		eapply "${FILESDIR}"/${P}-hpn-${HPN_VER}-glue.patch
+		eapply "${FILESDIR}"/${PN}-8.2_p1-hpn-${HPN_VER}-libressl.patch
 		if use X509; then
-			einfo "Will disable MT AES cipher due to incompatbility caused by X509 patch set"
-			# X509 and AES-CTR-MT don't get along, let's just drop it
-			rm openssh-${HPN_PV//./_}-hpn-AES-CTR-${HPN_VER}.diff || die
-			eapply "${FILESDIR}"/${PN}-8.0_p1-hpn-X509-glue.patch
+		#	einfo "Will disable MT AES cipher due to incompatbility caused by X509 patch set"
+		#	# X509 and AES-CTR-MT don't get along, let's just drop it
+		#	rm openssh-${HPN_PV//./_}-hpn-AES-CTR-${HPN_VER}.diff || die
+
+			eapply "${FILESDIR}"/${PN}-8.2_p1-hpn-${HPN_VER}-X509-glue.patch
 		fi
-		use sctp && eapply "${FILESDIR}"/${PN}-7.9_p1-hpn-sctp-glue.patch
+		use sctp && eapply "${FILESDIR}"/${PN}-8.2_p1-hpn-${HPN_VER}-sctp-glue.patch
 		popd &>/dev/null || die
 
 		eapply "${hpn_patchdir}"
 
-		if ! use X509; then
-			eapply "${FILESDIR}/openssh-7.9_p1-hpn-openssl-1.1.patch"
-			eapply "${FILESDIR}/openssh-8.0_p1-hpn-version.patch"
-		fi
+		use X509 || eapply "${FILESDIR}/openssh-8.0_p1-hpn-version.patch"
 
 		einfo "Patching Makefile.in for HPN patch set ..."
 		sed -i \
@@ -241,6 +255,10 @@
 
 	eapply_user #473004
 
+	# These tests are currently incompatible with PORTAGE_TMPDIR/sandbox
+	sed -e '/\t\tpercent \\/ d' \
+		-i regress/Makefile || die
+
 	tc-export PKG_CONFIG
 	local sed_args=(
 		-e "s:-lcrypto:$(${PKG_CONFIG} --libs openssl):"
@@ -275,21 +293,22 @@
 		--with-ldflags="${LDFLAGS}"
 		--disable-strip
 		--with-pid-dir="${EPREFIX}"$(usex kernel_linux '' '/var')/run
-		--sysconfdir="${EPREFIX%/}"/etc/ssh
-		--libexecdir="${EPREFIX%/}"/usr/$(get_libdir)/misc
-		--datadir="${EPREFIX%/}"/usr/share/openssh
-		--with-privsep-path="${EPREFIX%/}"/var/empty
+		--sysconfdir="${EPREFIX}"/etc/ssh
+		--libexecdir="${EPREFIX}"/usr/$(get_libdir)/misc
+		--datadir="${EPREFIX}"/usr/share/openssh
+		--with-privsep-path="${EPREFIX}"/var/empty
 		--with-privsep-user=sshd
 		$(use_with audit audit linux)
-		$(use_with kerberos kerberos5 "${EPREFIX%/}"/usr)
+		$(use_with kerberos kerberos5 "${EPREFIX}"/usr)
 		# We apply the sctp patch conditionally, so can't pass --without-sctp
 		# unconditionally else we get unknown flag warnings.
 		$(use sctp && use_with sctp)
-		$(use_with ldns ldns "${EPREFIX%/}"/usr)
+		$(use_with ldns ldns "${EPREFIX}"/usr)
 		$(use_with libedit)
 		$(use_with pam)
 		$(use_with pie)
 		$(use_with selinux)
+		$(usex X509 '' "$(use_with security-key security-key-builtin)")
 		$(use_with ssl openssl)
 		$(use_with ssl md5-passwords)
 		$(use_with ssl ssl-engine)
@@ -323,10 +342,12 @@
 	mkdir -p "${sshhome}"/.ssh
 	for t in "${tests[@]}" ; do
 		# Some tests read from stdin ...
-		HOMEDIR="${sshhome}" HOME="${sshhome}" SUDO="" \
-		emake -k -j1 ${t} </dev/null \
-			&& passed+=( "${t}" ) \
-			|| failed+=( "${t}" )
+		HOMEDIR="${sshhome}" HOME="${sshhome}" TMPDIR="${T}" \
+			SUDO="" SSH_SK_PROVIDER="" \
+			TEST_SSH_UNSAFE_PERMISSIONS=1 \
+			emake -k -j1 ${t} </dev/null \
+				&& passed+=( "${t}" ) \
+				|| failed+=( "${t}" )
 	done
 
 	einfo "Passed tests: ${passed[*]}"
@@ -347,7 +368,7 @@
 	)
 
 	# First the server config.
-	cat <<-EOF >> "${ED%/}"/etc/ssh/sshd_config
+	cat <<-EOF >> "${ED}"/etc/ssh/sshd_config
 
 	# Allow client to pass locale environment variables. #367017
 	AcceptEnv ${locale_vars[*]}
@@ -357,7 +378,7 @@
 	EOF
 
 	# Then the client config.
-	cat <<-EOF >> "${ED%/}"/etc/ssh/ssh_config
+	cat <<-EOF >> "${ED}"/etc/ssh/ssh_config
 
 	# Send locale environment variables. #367017
 	SendEnv ${locale_vars[*]}
@@ -372,13 +393,13 @@
 			-e "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" \
 			-e "/^#PrintMotd /s:.*:PrintMotd no:" \
 			-e "/^#PrintLastLog /s:.*:PrintLastLog no:" \
-			"${ED%/}"/etc/ssh/sshd_config || die
+			"${ED}"/etc/ssh/sshd_config || die
 	fi
 
 	if use livecd ; then
 		sed -i \
 			-e '/^#PermitRootLogin/c# Allow root login with password on livecds.\nPermitRootLogin Yes' \
-			"${ED%/}"/etc/ssh/sshd_config || die
+			"${ED}"/etc/ssh/sshd_config || die
 	fi
 }
 
@@ -401,6 +422,12 @@
 	diropts -m 0700
 	dodir /etc/skel/.ssh
 
+	# https://bugs.gentoo.org/733802
+	if ! use scp; then
+		rm "${ED}"/usr/{bin/scp,share/man/man1/scp.1} \
+			|| die "failed to remove scp"
+	fi
+
 	keepdir /var/empty
 
 	systemd_dounit "${FILESDIR}"/sshd.{service,socket}
@@ -408,43 +435,53 @@
 }
 
 pkg_preinst() {
-	enewgroup sshd 22
-	enewuser sshd 22 -1 /var/empty sshd
+	if ! use ssl && has_version "${CATEGORY}/${PN}[ssl]"; then
+		show_ssl_warning=1
+	fi
 }
 
 pkg_postinst() {
-	if has_version "<${CATEGORY}/${PN}-5.8_p1" ; then
-		elog "Starting with openssh-5.8p1, the server will default to a newer key"
-		elog "algorithm (ECDSA).  You are encouraged to manually update your stored"
-		elog "keys list as servers update theirs.  See ssh-keyscan(1) for more info."
-	fi
-	if has_version "<${CATEGORY}/${PN}-7.0_p1" ; then
-		elog "Starting with openssh-6.7, support for USE=tcpd has been dropped by upstream."
-		elog "Make sure to update any configs that you might have.  Note that xinetd might"
-		elog "be an alternative for you as it supports USE=tcpd."
-	fi
-	if has_version "<${CATEGORY}/${PN}-7.1_p1" ; then #557388 #555518
-		elog "Starting with openssh-7.0, support for ssh-dss keys were disabled due to their"
-		elog "weak sizes.  If you rely on these key types, you can re-enable the key types by"
-		elog "adding to your sshd_config or ~/.ssh/config files:"
-		elog "	PubkeyAcceptedKeyTypes=+ssh-dss"
-		elog "You should however generate new keys using rsa or ed25519."
+	local old_ver
+	for old_ver in ${REPLACING_VERSIONS}; do
+		if ver_test "${old_ver}" -lt "5.8_p1"; then
+			elog "Starting with openssh-5.8p1, the server will default to a newer key"
+			elog "algorithm (ECDSA).  You are encouraged to manually update your stored"
+			elog "keys list as servers update theirs.  See ssh-keyscan(1) for more info."
+		fi
+		if ver_test "${old_ver}" -lt "7.0_p1"; then
+			elog "Starting with openssh-6.7, support for USE=tcpd has been dropped by upstream."
+			elog "Make sure to update any configs that you might have.  Note that xinetd might"
+			elog "be an alternative for you as it supports USE=tcpd."
+		fi
+		if ver_test "${old_ver}" -lt "7.1_p1"; then #557388 #555518
+			elog "Starting with openssh-7.0, support for ssh-dss keys were disabled due to their"
+			elog "weak sizes.  If you rely on these key types, you can re-enable the key types by"
+			elog "adding to your sshd_config or ~/.ssh/config files:"
+			elog "	PubkeyAcceptedKeyTypes=+ssh-dss"
+			elog "You should however generate new keys using rsa or ed25519."
 
-		elog "Starting with openssh-7.0, the default for PermitRootLogin changed from 'yes'"
-		elog "to 'prohibit-password'.  That means password auth for root users no longer works"
-		elog "out of the box.  If you need this, please update your sshd_config explicitly."
-	fi
-	if has_version "<${CATEGORY}/${PN}-7.6_p1" ; then
-		elog "Starting with openssh-7.6p1, openssh upstream has removed ssh1 support entirely."
-		elog "Furthermore, rsa keys with less than 1024 bits will be refused."
-	fi
-	if has_version "<${CATEGORY}/${PN}-7.7_p1" ; then
-		elog "Starting with openssh-7.7p1, we no longer patch openssh to provide LDAP functionality."
-		elog "Install sys-auth/ssh-ldap-pubkey and use OpenSSH's \"AuthorizedKeysCommand\" option"
-		elog "if you need to authenticate against LDAP."
-		elog "See https://wiki.gentoo.org/wiki/SSH/LDAP_migration for more details."
-	fi
-	if ! use ssl && has_version "${CATEGORY}/${PN}[ssl]" ; then
+			elog "Starting with openssh-7.0, the default for PermitRootLogin changed from 'yes'"
+			elog "to 'prohibit-password'.  That means password auth for root users no longer works"
+			elog "out of the box.  If you need this, please update your sshd_config explicitly."
+		fi
+		if ver_test "${old_ver}" -lt "7.6_p1"; then
+			elog "Starting with openssh-7.6p1, openssh upstream has removed ssh1 support entirely."
+			elog "Furthermore, rsa keys with less than 1024 bits will be refused."
+		fi
+		if ver_test "${old_ver}" -lt "7.7_p1"; then
+			elog "Starting with openssh-7.7p1, we no longer patch openssh to provide LDAP functionality."
+			elog "Install sys-auth/ssh-ldap-pubkey and use OpenSSH's \"AuthorizedKeysCommand\" option"
+			elog "if you need to authenticate against LDAP."
+			elog "See https://wiki.gentoo.org/wiki/SSH/LDAP_migration for more details."
+		fi
+		if ver_test "${old_ver}" -lt "8.2_p1"; then
+			ewarn "After upgrading to openssh-8.2p1 please restart sshd, otherwise you"
+			ewarn "will not be able to establish new sessions. Restarting sshd over a ssh"
+			ewarn "connection is generally safe."
+		fi
+	done
+
+	if [[ -n ${show_ssl_warning} ]]; then
 		elog "Be aware that by disabling openssl support in openssh, the server and clients"
 		elog "no longer support dss/rsa/ecdsa keys.  You will need to generate ed25519 keys"
 		elog "and update all clients/servers that utilize them."
diff --git a/net-nds/rpcbind/Manifest b/net-nds/rpcbind/Manifest
new file mode 100644
index 0000000..1e114d6
--- /dev/null
+++ b/net-nds/rpcbind/Manifest
@@ -0,0 +1 @@
+DIST rpcbind-1.2.5.tar.bz2 123502 BLAKE2B de0d10406aeffd75195c1fa1d0179b2c7c0ba54c3f3ac58ce9d7e9448d1dbe91a296ad69c45dee115e0a739aa9cfec53b750d3a5ca405e16605a92bbb2006859 SHA512 e884c4757950ccead0f9a07f50625a63e6f18f9bfae9fcfffa3e5fa4b7a66c3a99d9fa303061848fe8211509d5456f24ff26e4579af6e161a35522268f3ef3e4
diff --git a/net-nds/rpcbind/files/rpcbind.confd b/net-nds/rpcbind/files/rpcbind.confd
new file mode 100644
index 0000000..ddc0917
--- /dev/null
+++ b/net-nds/rpcbind/files/rpcbind.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/rpcbind
+ 
+# Options for `rpcbind`.
+#RPCBIND_OPTS="-l"
diff --git a/net-nds/rpcbind/files/rpcbind.initd b/net-nds/rpcbind/files/rpcbind.initd
new file mode 100644
index 0000000..1832977
--- /dev/null
+++ b/net-nds/rpcbind/files/rpcbind.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+	use net
+	before inetd xinetd
+	provide portmap
+}
+
+start() {
+	ebegin "Starting rpcbind"
+	start-stop-daemon --start --quiet --exec /sbin/rpcbind -- ${RPCBIND_OPTS}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping rpcbind"
+	start-stop-daemon --stop --quiet --exec /sbin/rpcbind
+	eend $?
+}
diff --git a/net-nds/rpcbind/metadata.xml b/net-nds/rpcbind/metadata.xml
new file mode 100644
index 0000000..8b85a22
--- /dev/null
+++ b/net-nds/rpcbind/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>base-system@gentoo.org</email>
+	</maintainer>
+	<use>
+		<flag name="remotecalls">Enable remote calls</flag>
+		<flag name="warmstarts">Enables rpcbind to cache configuration for warm restarts</flag>
+	</use>
+	<upstream>
+		<remote-id type="sourceforge">rpcbind</remote-id>
+	</upstream>
+</pkgmetadata>
diff --git a/net-nds/rpcbind/rpcbind-1.2.5.ebuild b/net-nds/rpcbind/rpcbind-1.2.5.ebuild
new file mode 100644
index 0000000..52e7405
--- /dev/null
+++ b/net-nds/rpcbind/rpcbind-1.2.5.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="git://linux-nfs.org/~steved/rpcbind.git"
+	inherit autotools git-r3
+else
+	SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+	KEYWORDS="*"
+fi
+
+DESCRIPTION="portmap replacement which supports RPC over various protocols"
+HOMEPAGE="https://sourceforge.net/projects/rpcbind/"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="debug remotecalls selinux systemd tcpd warmstarts"
+REQUIRED_USE="systemd? ( warmstarts )"
+
+CDEPEND=">=net-libs/libtirpc-0.2.3:=
+	systemd? ( sys-apps/systemd:= )
+	tcpd? ( sys-apps/tcp-wrappers )"
+DEPEND="${CDEPEND}
+	virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-rpcbind )"
+
+src_prepare() {
+	default
+	[[ ${PV} == "9999" ]] && eautoreconf
+}
+
+src_configure() {
+	local myeconfargs=(
+		--bindir="${EPREFIX}"/sbin
+		--sbindir="${EPREFIX}"/sbin
+		--with-statedir="${EPREFIX}"/run/${PN}
+		--with-systemdsystemunitdir=$(usex systemd "$(systemd_get_systemunitdir)" "no")
+		$(use_enable debug)
+		$(use_enable remotecalls rmtcalls)
+		$(use_enable warmstarts)
+		$(use_enable tcpd libwrap)
+	)
+
+	# Avoid using rpcsvc headers
+	# https://bugs.gentoo.org/705224
+	export ac_cv_header_rpcsvc_mount_h=no
+
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+	newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}
diff --git a/profiles/categories b/profiles/categories
index 4558958..41ccd61 100644
--- a/profiles/categories
+++ b/profiles/categories
@@ -1,4 +1,5 @@
 acct-group
+acct-user
 app-accessibility
 app-admin
 app-antivirus