From e23cdda4dbb0c83b9e682ab5e916085a35203da5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 23 Jun 2018 07:00:28 +0100 Subject: gentoo resync : 23.06.2018 --- net-libs/libssh2/Manifest | 4 +- .../files/libssh2-1.8.0-openssl11-memleak.patch | 23 +++++++ .../libssh2/files/libssh2-1.8.0-openssl11.patch | 70 ++++++++++++++++++++++ net-libs/libssh2/libssh2-1.8.0-r1.ebuild | 20 +++---- 4 files changed, 104 insertions(+), 13 deletions(-) create mode 100644 net-libs/libssh2/files/libssh2-1.8.0-openssl11-memleak.patch create mode 100644 net-libs/libssh2/files/libssh2-1.8.0-openssl11.patch (limited to 'net-libs/libssh2') diff --git a/net-libs/libssh2/Manifest b/net-libs/libssh2/Manifest index e3d759b195d1..ea79ba0c717e 100644 --- a/net-libs/libssh2/Manifest +++ b/net-libs/libssh2/Manifest @@ -1,8 +1,10 @@ AUX libssh2-1.8.0-libgcrypt-prefix.patch 1026 BLAKE2B da1ba552aafecb1b950bc8d5d472d5f9f1bb64cff1bf6d8f32cc7492585017014ff4659d440729f972b240bd202ef187c497949b0fbfc70f4229c22e99b07931 SHA512 8acd91d729c881ec87473895f3deba1e8f3b655a5394b130395fa75420c346dfe0e76028e7e43bd22783d2af4e1e50e5c25dd7f3d7a93cb35059bbbe5651d08e AUX libssh2-1.8.0-mansyntax_sh.patch 770 BLAKE2B 743bb8032baab056fb578429bf540c8f41d2cdf07c1285a7abe25e804b2ada3c8d7f0c126f8b6973461279e891d2e3e942e2cea7d1cb352f17541f22757c11f0 SHA512 9da051dd5dda823ae8797b0dadb9a3734590e196898b0985f389492f1225c720dac0ce374ba6d9cc8956820128fc2d7457350248b486f0da4d12cc3bb93e275a +AUX libssh2-1.8.0-openssl11-memleak.patch 823 BLAKE2B 3d2abd43798a23b551ef5ba97b705f8e8e24db010a19a2387efe10299e436e0dbe655db419fa8da1467aed18ec2bb39e1d863eb981603afecb302700c565159e SHA512 d93ee0b8ea5f37b81883ff79fb7d2f19633a4415990de1743f1388f49f7897be200ae0911b6ca14d505498294727aa5542c7d76a29e7b8df0051a53e6dcd586a +AUX libssh2-1.8.0-openssl11.patch 2551 BLAKE2B 32875e90a9cfb754050559a315c24d51065ceb9be22e450984aef9dea0a59b5b93cac7498e3c3e9cf8057ac13dd93330bc470bd717c9a06af9d9294ef7172eed SHA512 3cfd11ef23884a3de173422e001b0ec0f9af48c832948b5d0f90f0be2008334c30ed769a642786cad9aa68ea445b66780b10d3c64434178978018e709510deab DIST libssh2-1.7.0.tar.gz 811714 BLAKE2B 488f6b9ea2bf072aba17e8d70136e9bf64b38a4cb6cb572fcdf0253ec5d9afa479c75858b42299e2be39589b9454ccfdd5f7c4a2e355e8e8b5037b2b637a8a4c SHA512 0f9dfd83196129568c00383e2e4fea29b3d8c4f3b1690f550a6748d1db68cc437b4ed083f5d3d4646365fdc839819619aea96eeaef5ab072c7023d13f08b5153 DIST libssh2-1.8.0.tar.gz 854916 BLAKE2B 618c4a19789f2e5eda85852760dffff5672d420d2fa50393b05b7398a1913f74e5f6695f078628050ac9851965d6e45cf410b7c4590a8f18d67c718c829ab352 SHA512 289aa45c4f99653bebf5f99565fe9c519abc204feb2084b47b7cc3badc8bf4ecdedd49ea6acdce8eb902b3c00995d5f92a3ca77b2508b92f04ae0e7de7287558 EBUILD libssh2-1.7.0.ebuild 1208 BLAKE2B c6031ef07a5e4692fed353bc0db362a77287b6834fdd4ed52743ef41a7cf2975097f1d854e8722df19dbd27b6982e99c57f461edaed1f64d1c708a9f737348ec SHA512 717aa9d9a636a099e7a6f63a1713414ab1055f6eb3691587bb4be6f80a8eb224fc702bcbf369c8b6252d7e0990f75584c379f2a9db7640c616874f13bc94e1d3 -EBUILD libssh2-1.8.0-r1.ebuild 1283 BLAKE2B 295c15e3842687f1f9a6b8389f9ce4102531a1394039553999e120a6f2264c7026872acbc7687ee11f94efe2db3a4ce5e3152d9974b5573bc83f13977a36226e SHA512 33038086465f551f1be6cd3c6e38ce793e3b33b1c476a0441e95aef135c8dbc62f0721a45953ca59e4ff0cd51a7093e2cbd333e8e6c21dcb99ce69a6c34180d2 +EBUILD libssh2-1.8.0-r1.ebuild 1368 BLAKE2B d0de9e6c3797d8cace0c5fa8f4a7ee9f19fb5a18b44f1fa36b33bf097bd2447c38684d6dd2c9803d46eadb4afd8f5324374e2801cad2a89b4f53cfe05c14840c SHA512 cd7310c92c2f1fed4e9f2ab0821ee39d2584f93a8ca9c4ab44bd050caa2bb9b4d4d7b83b55ce1443641f1c033cdcd62eaece86c81e6bf76071dfbfbc73573b74 EBUILD libssh2-9999.ebuild 1131 BLAKE2B d4413bf097b892cb8fa1747614e0194ea0db57c91b00dad158da1b88405e3d1d6d9372efd5c39447f4a7c87b2e3d215f66df8bcc212e1fc599b839e8275ff6f2 SHA512 a9ed6e5e56b005f8c46f957befa279360e127f30b95a33f98e0f3dcd73fa3e921f45e5577f4d2632b841ee1ae002011b1042e1f67ac55bab2e56bbc19ef532c5 MISC metadata.xml 432 BLAKE2B b528bab0bd90699af37096d4b6a4e06767e39011b4ef299600c8d35987768693224869ef5e05255ff28edb0ae8e14c38a04e20df953391a3df527d8609700a8f SHA512 c0fd5dce9a697c02886aeea4e001695bf51c6cec82a1c32d58a839dbd63f0085f9005c3504d40bd858bcca80ec2018bbf44bca64dd7692029e158612da39cabd diff --git a/net-libs/libssh2/files/libssh2-1.8.0-openssl11-memleak.patch b/net-libs/libssh2/files/libssh2-1.8.0-openssl11-memleak.patch new file mode 100644 index 000000000000..d7d41f976cc8 --- /dev/null +++ b/net-libs/libssh2/files/libssh2-1.8.0-openssl11-memleak.patch @@ -0,0 +1,23 @@ +From 97518ca8bda91ce12c503197a98fa71690cb67f9 Mon Sep 17 00:00:00 2001 +From: Will Cosgrove +Date: Fri, 12 May 2017 16:34:26 -0700 +Subject: [PATCH] Fix memory leak of crypt_ctx->h using openSSL 1.1+ (#177) + +Need to use EVP_CIPHER_CTX_free instead of EVP_CIPHER_CTX_reset. +--- + src/openssl.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/openssl.h b/src/openssl.h +index 6aa12192..2bd80b96 100644 +--- a/src/openssl.h ++++ b/src/openssl.h +@@ -267,7 +267,7 @@ int _libssh2_md5_init(libssh2_md5_ctx *ctx); + #define _libssh2_cipher_3des EVP_des_ede3_cbc + + #ifdef HAVE_OPAQUE_STRUCTS +-#define _libssh2_cipher_dtor(ctx) EVP_CIPHER_CTX_reset(*(ctx)) ++#define _libssh2_cipher_dtor(ctx) EVP_CIPHER_CTX_free(*(ctx)) + #else + #define _libssh2_cipher_dtor(ctx) EVP_CIPHER_CTX_cleanup(ctx) + #endif diff --git a/net-libs/libssh2/files/libssh2-1.8.0-openssl11.patch b/net-libs/libssh2/files/libssh2-1.8.0-openssl11.patch new file mode 100644 index 000000000000..0824dd061762 --- /dev/null +++ b/net-libs/libssh2/files/libssh2-1.8.0-openssl11.patch @@ -0,0 +1,70 @@ +From c423b543ca45d6caca7b94763bf65ff79d07e811 Mon Sep 17 00:00:00 2001 +From: Marcel Raad +Date: Wed, 24 May 2017 19:21:22 +0200 +Subject: [PATCH] openssl: fix build with OpenSSL 1.1 API (#176) + +When building with OPENSSL_API_COMPAT=0x10100000L, OpenSSL_add_all_algorithms +and OpenSSL_add_all_ciphers don't exist. The corresponding functionality is +handled automatically with OpenSSL 1.1. +--- + src/openssl.c | 4 ++++ + src/openssl.h | 6 ++++++ + 2 files changed, 10 insertions(+) + +diff --git a/src/openssl.c b/src/openssl.c +index f10f2921..25cef082 100644 +--- a/src/openssl.c ++++ b/src/openssl.c +@@ -1056,6 +1056,7 @@ _libssh2_pub_priv_keyfile(LIBSSH2_SESSION *session, + "Unable to extract public key from private key " + "file: Unable to open private key file"); + } ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if (!EVP_get_cipherbyname("des")) { + /* If this cipher isn't loaded it's a pretty good indication that none + * are. I have *NO DOUBT* that there's a better way to deal with this +@@ -1064,6 +1065,7 @@ _libssh2_pub_priv_keyfile(LIBSSH2_SESSION *session, + */ + OpenSSL_add_all_ciphers(); + } ++#endif + BIO_reset(bp); + pk = PEM_read_bio_PrivateKey(bp, NULL, NULL, (void*)passphrase); + BIO_free(bp); +@@ -1132,6 +1134,7 @@ _libssh2_pub_priv_keyfilememory(LIBSSH2_SESSION *session, + if (!bp) { + return -1; + } ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if (!EVP_get_cipherbyname("des")) { + /* If this cipher isn't loaded it's a pretty good indication that none + * are. I have *NO DOUBT* that there's a better way to deal with this +@@ -1140,6 +1143,7 @@ _libssh2_pub_priv_keyfilememory(LIBSSH2_SESSION *session, + */ + OpenSSL_add_all_ciphers(); + } ++#endif + BIO_reset(bp); + pk = PEM_read_bio_PrivateKey(bp, NULL, NULL, (void*)passphrase); + BIO_free(bp); +diff --git a/src/openssl.h b/src/openssl.h +index 2bd80b96..d8874286 100644 +--- a/src/openssl.h ++++ b/src/openssl.h +@@ -226,10 +226,16 @@ int _libssh2_md5_init(libssh2_md5_ctx *ctx); + #define libssh2_hmac_cleanup(ctx) HMAC_cleanup(ctx) + #endif + ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#define libssh2_crypto_init() \ ++ ENGINE_load_builtin_engines(); \ ++ ENGINE_register_all_complete() ++#else + #define libssh2_crypto_init() \ + OpenSSL_add_all_algorithms(); \ + ENGINE_load_builtin_engines(); \ + ENGINE_register_all_complete() ++#endif + + #define libssh2_crypto_exit() + diff --git a/net-libs/libssh2/libssh2-1.8.0-r1.ebuild b/net-libs/libssh2/libssh2-1.8.0-r1.ebuild index 88ba4dabf366..2e8c25a0743b 100644 --- a/net-libs/libssh2/libssh2-1.8.0-r1.ebuild +++ b/net-libs/libssh2/libssh2-1.8.0-r1.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=6 -inherit ltprune multilib-minimal +inherit multilib-minimal DESCRIPTION="Library implementing the SSH2 protocol" HOMEPAGE="https://www.libssh2.org" @@ -13,24 +13,21 @@ SLOT="0" KEYWORDS="~alpha amd64 arm arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris" IUSE="gcrypt libressl static-libs test zlib" -DEPEND=" +RDEPEND=" !gcrypt? ( - !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] ) - libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] ) + !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) + libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) ) gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] ) zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) " -RDEPEND=" - ${DEPEND} -" +DEPEND="${RDEPEND}" -DOCS=( - NEWS README -) PATCHES=( "${FILESDIR}"/${PN}-1.8.0-libgcrypt-prefix.patch "${FILESDIR}"/${PN}-1.8.0-mansyntax_sh.patch + "${FILESDIR}"/${PN}-1.8.0-openssl11.patch + "${FILESDIR}"/${PN}-1.8.0-openssl11-memleak.patch ) multilib_src_configure() { @@ -45,6 +42,5 @@ multilib_src_configure() { multilib_src_install_all() { einstalldocs - - prune_libtool_files + find "${D}" -name '*.la' -delete || die } -- cgit v1.2.3