net-misc/openssh: Fix openssl-1.0.2 patch to fix libressl as well
authorPatrick McLean <patrick.mclean@sony.com>
Mon, 22 Oct 2018 17:31:15 +0000 (10:31 -0700)
committerPatrick McLean <chutzpah@gentoo.org>
Mon, 22 Oct 2018 17:31:30 +0000 (10:31 -0700)
This also adds a patch to fix a bunch of QA warnings with USE=-ssl

Closes: https://bugs.gentoo.org/669052
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

net-misc/openssh/files/openssh-7.9_p1-include-stdlib.patch [new file with mode: 0644]
net-misc/openssh/files/openssh-7.9_p1-openssl-1.0.2-compat.patch
net-misc/openssh/openssh-7.9_p1.ebuild

diff --git a/net-misc/openssh/files/openssh-7.9_p1-include-stdlib.patch b/net-misc/openssh/files/openssh-7.9_p1-include-stdlib.patch
new file mode 100644 (file)
index 0000000..c5697c2
--- /dev/null
@@ -0,0 +1,48 @@
+diff --git a/auth-options.c b/auth-options.c
+index b05d6d6f..d1f42f04 100644
+--- a/auth-options.c
++++ b/auth-options.c
+@@ -26,6 +26,7 @@
+ #include <stdarg.h>
+ #include <ctype.h>
+ #include <limits.h>
++#include <stdlib.h>
+ 
+ #include "openbsd-compat/sys-queue.h"
+ 
+diff --git a/hmac.c b/hmac.c
+index 1c879640..a29f32c5 100644
+--- a/hmac.c
++++ b/hmac.c
+@@ -19,6 +19,7 @@
+ 
+ #include <sys/types.h>
+ #include <string.h>
++#include <stdlib.h>
+ 
+ #include "sshbuf.h"
+ #include "digest.h"
+diff --git a/krl.c b/krl.c
+index 8e2d5d5d..c32e147a 100644
+--- a/krl.c
++++ b/krl.c
+@@ -28,6 +28,7 @@
+ #include <string.h>
+ #include <time.h>
+ #include <unistd.h>
++#include <stdlib.h>
+ 
+ #include "sshbuf.h"
+ #include "ssherr.h"
+diff --git a/mac.c b/mac.c
+index 51dc11d7..3d11eba6 100644
+--- a/mac.c
++++ b/mac.c
+@@ -29,6 +29,7 @@
+ 
+ #include <string.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ 
+ #include "digest.h"
+ #include "hmac.h"
index 9fc6d0a9dcec8790dc28c55540d6590a60f3fc99..c1c310e8f14a53f1c2d1c9dfac834ea14eb590b1 100644 (file)
@@ -5,9 +5,9 @@ index 8b4a3627..590b66d1 100644
 @@ -76,7 +76,7 @@ ssh_OpenSSL_add_all_algorithms(void)
        ENGINE_load_builtin_engines();
        ENGINE_register_all_complete();
- 
+
 -#if OPENSSL_VERSION_NUMBER < 0x10001000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
        OPENSSL_config(NULL);
  #else
        OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS |
index e92fbbc06ee81fefe582086f5612c1a83dd47c95..c38afd6020ca0ee7882eeb4b887045ed8ca0de68 100644 (file)
@@ -114,6 +114,7 @@ src_prepare() {
        sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die
 
        eapply "${FILESDIR}"/${PN}-7.9_p1-openssl-1.0.2-compat.patch
+       eapply "${FILESDIR}"/${PN}-7.9_p1-include-stdlib.patch
        eapply "${FILESDIR}"/${PN}-7.8_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