commit:     f7dcc5db3065338bf5b1951ca897cb0042de2c8f
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Thu May 19 23:08:05 2022 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Thu May 19 23:08:33 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7dcc5db

net-misc/openssh: Bump 9.0_p1 to fix random hangs with X509

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 .../files/openssh-9.0_p1-X509-uninitialized-delay.patch      | 12 ++++++++++++
 .../{openssh-9.0_p1.ebuild => openssh-9.0_p1-r1.ebuild}      |  1 +
 2 files changed, 13 insertions(+)

diff --git 
a/net-misc/openssh/files/openssh-9.0_p1-X509-uninitialized-delay.patch 
b/net-misc/openssh/files/openssh-9.0_p1-X509-uninitialized-delay.patch
new file mode 100644
index 000000000000..2a83ed37d138
--- /dev/null
+++ b/net-misc/openssh/files/openssh-9.0_p1-X509-uninitialized-delay.patch
@@ -0,0 +1,12 @@
+diff -ur a/auth2.c b/auth2.c
+--- a/auth2.c  2022-05-19 15:59:32.875160028 -0700
++++ b/auth2.c  2022-05-19 16:03:44.291594908 -0700
+@@ -226,7 +226,7 @@
+       int digest_alg;
+       size_t len;
+       u_char *hash;
+-      double delay;
++      double delay = 0;
+ 
+       digest_alg = ssh_digest_maxbytes();
+       if (len = ssh_digest_bytes(digest_alg) > 0) {

diff --git a/net-misc/openssh/openssh-9.0_p1.ebuild 
b/net-misc/openssh/openssh-9.0_p1-r1.ebuild
similarity index 99%
rename from net-misc/openssh/openssh-9.0_p1.ebuild
rename to net-misc/openssh/openssh-9.0_p1-r1.ebuild
index 13c0bb4fa5c5..9fc26e8968bf 100644
--- a/net-misc/openssh/openssh-9.0_p1.ebuild
+++ b/net-misc/openssh/openssh-9.0_p1-r1.ebuild
@@ -149,6 +149,7 @@ src_prepare() {
                popd &>/dev/null || die
 
                eapply "${WORKDIR}"/${X509_PATCH%.*}
+               eapply "${FILESDIR}/${PN}-9.0_p1-X509-uninitialized-delay.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]"

Reply via email to