diff options
author | 2019-01-15 20:45:31 +0200 | |
---|---|---|
committer | 2019-01-15 20:45:48 +0200 | |
commit | 452494d7ca5dfa6a804e932eadf24b999c51316e (patch) | |
tree | c65ede1c352746e3b832abb61f6c1c3653be86f5 /net-libs | |
parent | net-im/slack-bin: 3.3.4 now works with glibc 2.28 (diff) | |
download | gentoo-452494d7ca5dfa6a804e932eadf24b999c51316e.tar.gz gentoo-452494d7ca5dfa6a804e932eadf24b999c51316e.tar.bz2 gentoo-452494d7ca5dfa6a804e932eadf24b999c51316e.zip |
net-libs/gnutls: libressl fix
Closes: https://bugs.gentoo.org/show_bug.cgi?id=675512
Thanks: Toralf Förster
Signed-off-by: Alon Bar-Lev <alonbl@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'net-libs')
-rw-r--r-- | net-libs/gnutls/files/gnutls-3.6.5-libressl.patch | 53 | ||||
-rw-r--r-- | net-libs/gnutls/gnutls-3.6.5.ebuild | 1 |
2 files changed, 54 insertions, 0 deletions
diff --git a/net-libs/gnutls/files/gnutls-3.6.5-libressl.patch b/net-libs/gnutls/files/gnutls-3.6.5-libressl.patch new file mode 100644 index 000000000000..16cac8c13b98 --- /dev/null +++ b/net-libs/gnutls/files/gnutls-3.6.5-libressl.patch @@ -0,0 +1,53 @@ +From bfd036b31f2a47ae40e104b2ea1a0e095900cf52 Mon Sep 17 00:00:00 2001 +From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> +Date: Tue, 25 Dec 2018 14:43:56 +0300 +Subject: [PATCH] tests: cipher-openssl-compat: don't fail if OpenSSL doesn't + provide cipher + +LibreSSL does not provide ChaCha20-Poly1305 through EVP_CIPHER +interface, so let's skip the test if cipher is not available. + +Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> +--- + tests/slow/cipher-openssl-compat.c | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) + +diff --git a/tests/slow/cipher-openssl-compat.c b/tests/slow/cipher-openssl-compat.c +index c9b39d026..a4cb3522d 100644 +--- a/tests/slow/cipher-openssl-compat.c ++++ b/tests/slow/cipher-openssl-compat.c +@@ -38,6 +38,19 @@ static int cipher_test(const char *ocipher, gnutls_cipher_algorithm_t gcipher, + + success("cipher: %s\n", ocipher); + ++ /* decrypt with openssl */ ++ evp_cipher = EVP_get_cipherbyname(ocipher); ++ if (!evp_cipher) { ++ /* XXX: fix version check later when LibreSSL fixes support for aes-ccm and chacha20-poly1305 */ ++#ifdef LIBRESSL_VERSION_NUMBER ++ fprintf(stderr, "EVP_get_cipherbyname failed for %s\n", ocipher); ++ return -1; ++#else ++ /* OpenSSL should always work! */ ++ fail("EVP_get_cipherbyname failed for %s\n", ocipher); ++#endif ++ } ++ + for (i = 0; i < 32; i++) { /* try with multiple keys and nonces */ + assert(gnutls_rnd + (GNUTLS_RND_NONCE, orig_plain_data, +@@ -88,11 +101,6 @@ static int cipher_test(const char *ocipher, gnutls_cipher_algorithm_t gcipher, + + gnutls_aead_cipher_deinit(hd); + +- /* decrypt with openssl */ +- evp_cipher = EVP_get_cipherbyname(ocipher); +- if (!evp_cipher) +- fail("EVP_get_cipherbyname failed for %s\n", ocipher); +- + ctx = EVP_CIPHER_CTX_new(); + + #if OPENSSL_VERSION_NUMBER >= 0x10100000L +-- +2.19.2 + diff --git a/net-libs/gnutls/gnutls-3.6.5.ebuild b/net-libs/gnutls/gnutls-3.6.5.ebuild index 883584c16a7d..9d141a5165c5 100644 --- a/net-libs/gnutls/gnutls-3.6.5.ebuild +++ b/net-libs/gnutls/gnutls-3.6.5.ebuild @@ -55,6 +55,7 @@ HTML_DOCS=() PATCHES=( "${FILESDIR}/${P}-build.patch" + "${FILESDIR}/${P}-libressl.patch" ) pkg_setup() { |