From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5EECD1382C5 for ; Tue, 26 May 2020 20:18:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8C436E0970; Tue, 26 May 2020 20:18:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 621C7E0970 for ; Tue, 26 May 2020 20:18:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6F56634EE7C for ; Tue, 26 May 2020 20:18:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D3C0D26 for ; Tue, 26 May 2020 20:18:53 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1590524286.39b70c6fefb87ece3dbc552591ffbda0bb8945ad.whissi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/botan/files/, dev-libs/botan/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/botan/botan-2.14.0-r1.ebuild dev-libs/botan/files/botan-2.14.0-bindist-test-fix.patch X-VCS-Directories: dev-libs/botan/ dev-libs/botan/files/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 39b70c6fefb87ece3dbc552591ffbda0bb8945ad X-VCS-Branch: master Date: Tue, 26 May 2020 20:18:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 10933a9e-1697-431c-bccc-cff09c148894 X-Archives-Hash: b33ef1ac15975b372f2612de7b190fa7 commit: 39b70c6fefb87ece3dbc552591ffbda0bb8945ad Author: Sam James (sam_c) cmpct info> AuthorDate: Wed May 20 13:25:50 2020 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Tue May 26 20:18:06 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39b70c6f dev-libs/botan: Fix tests with USE=bindist Include 2 upstream patches for fixing tests in some configurations. Seems to only affect Gentoo with USE=bindist because that's when ECDSA is disabled. Closes: https://bugs.gentoo.org/723320 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Sam James (sam_c) cmpct.info> Signed-off-by: Thomas Deutschmann gentoo.org> dev-libs/botan/botan-2.14.0-r1.ebuild | 4 + .../files/botan-2.14.0-bindist-test-fix.patch | 91 ++++++++++++++++++++++ 2 files changed, 95 insertions(+) diff --git a/dev-libs/botan/botan-2.14.0-r1.ebuild b/dev-libs/botan/botan-2.14.0-r1.ebuild index 242a808d5ed..61d86ec2499 100644 --- a/dev-libs/botan/botan-2.14.0-r1.ebuild +++ b/dev-libs/botan/botan-2.14.0-r1.ebuild @@ -37,6 +37,10 @@ BDEPEND=" doc? ( dev-python/sphinx ) " +PATCHES=( + "${FILESDIR}/${P}-bindist-test-fix.patch" +) + src_configure() { local disable_modules=() use boost || disable_modules+=( "boost" ) diff --git a/dev-libs/botan/files/botan-2.14.0-bindist-test-fix.patch b/dev-libs/botan/files/botan-2.14.0-bindist-test-fix.patch new file mode 100644 index 00000000000..35b17976dbd --- /dev/null +++ b/dev-libs/botan/files/botan-2.14.0-bindist-test-fix.patch @@ -0,0 +1,91 @@ +https://github.com/randombit/botan/commit/df73ee690c5795be586cd4df3e33253113a0dcdf +https://github.com/randombit/botan/commit/d9d6d7a593da135d2046aeb8a9e05e967d90f538 + +diff --git a/src/tests/test_pkcs11_high_level.cpp b/src/tests/test_pkcs11_high_level.cpp +index 47a5bf5e56..07dc86ef21 100644 +--- a/src/tests/test_pkcs11_high_level.cpp ++++ b/src/tests/test_pkcs11_high_level.cpp +@@ -909,6 +909,15 @@ BOTAN_REGISTER_TEST("pkcs11-rsa", PKCS11_RSA_Tests); + + /***************************** PKCS11 ECDSA *****************************/ + ++#if defined(BOTAN_HAS_ECC_GROUP) ++std::vector encode_ec_point_in_octet_str(const Botan::PointGFp& point) ++ { ++ std::vector enc; ++ DER_Encoder(enc).encode(point.encode(PointGFp::UNCOMPRESSED), OCTET_STRING); ++ return enc; ++ } ++#endif ++ + #if defined(BOTAN_HAS_ECDSA) + + Test::Result test_ecdsa_privkey_import() +@@ -976,13 +985,6 @@ Test::Result test_ecdsa_privkey_export() + return result; + } + +-std::vector encode_ec_point_in_octet_str(const Botan::PointGFp& point) +- { +- std::vector enc; +- DER_Encoder(enc).encode(point.encode(PointGFp::UNCOMPRESSED), OCTET_STRING); +- return enc; +- } +- + Test::Result test_ecdsa_pubkey_import() + { + Test::Result result("PKCS11 import ECDSA public key"); +diff --git a/src/tests/test_pkcs11_high_level.cpp b/src/tests/test_pkcs11_high_level.cpp +index 07dc86ef21..c77e8ea42e 100644 +--- a/src/tests/test_pkcs11_high_level.cpp ++++ b/src/tests/test_pkcs11_high_level.cpp +@@ -28,10 +28,14 @@ + #include + #endif + +-#if defined (BOTAN_HAS_PUBLIC_KEY_CRYPTO) ++#if defined(BOTAN_HAS_PUBLIC_KEY_CRYPTO) + #include + #endif + ++#if defined(BOTAN_HAS_ECC_GROUP) ++ #include ++#endif ++ + #if defined(BOTAN_HAS_RSA) && defined(BOTAN_HAS_PKCS11) + #include + #include +@@ -909,7 +913,7 @@ BOTAN_REGISTER_TEST("pkcs11-rsa", PKCS11_RSA_Tests); + + /***************************** PKCS11 ECDSA *****************************/ + +-#if defined(BOTAN_HAS_ECC_GROUP) ++#if defined(BOTAN_HAS_ECC_GROUP) && (defined(BOTAN_HAS_ECDSA) || defined(BOTAN_HAS_ECDH)) + std::vector encode_ec_point_in_octet_str(const Botan::PointGFp& point) + { + std::vector enc; +diff --git a/src/tests/unit_x509.cpp b/src/tests/unit_x509.cpp +index eaae358420..d9b7858898 100644 +--- a/src/tests/unit_x509.cpp ++++ b/src/tests/unit_x509.cpp +@@ -603,7 +603,7 @@ Test::Result test_verify_gost2012_cert() + { + Test::Result result("X509 GOST-2012 certificates"); + +-#if defined(BOTAN_HAS_GOST_34_10_2012) && defined(BOTAN_HAS_STREEBOG) ++#if defined(BOTAN_HAS_GOST_34_10_2012) && defined(BOTAN_HAS_STREEBOG) && defined(BOTAN_HAS_EMSA1) + try + { + Botan::X509_Certificate root_cert(Test::data_file("x509/gost/gost_root.pem")); +@@ -1600,6 +1600,11 @@ class X509_Cert_Unit_Tests final : public Test + continue; + #endif + ++#if !defined(BOTAN_HAS_EMSA1) ++ if(algo != "RSA" && algo != "Ed25519") ++ continue; ++#endif ++ + std::unique_ptr key = make_a_private_key(algo); + + if(key == nullptr)