diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-07-14 22:45:36 -0300 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2019-07-17 10:34:22 +0200 |
commit | f94c1b1a6a2989f17d967841cd686686346a032f (patch) | |
tree | 004ff8255cbc05ebb8e9184aa02aa20afa929f48 | |
parent | ab9db00900d8d035b1eacc3fff7e4ed290ccf407 (diff) | |
download | aports-f94c1b1a6a2989f17d967841cd686686346a032f.tar.bz2 aports-f94c1b1a6a2989f17d967841cd686686346a032f.tar.xz |
main/bitlbee: switch to gnutls
Fixes #6062
-rw-r--r-- | main/bitlbee/APKBUILD | 19 | ||||
-rw-r--r-- | main/bitlbee/openssl-1.1.patch | 64 |
2 files changed, 8 insertions, 75 deletions
diff --git a/main/bitlbee/APKBUILD b/main/bitlbee/APKBUILD index f99019dc16..5d6678e280 100644 --- a/main/bitlbee/APKBUILD +++ b/main/bitlbee/APKBUILD @@ -2,31 +2,28 @@ # Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com> pkgname=bitlbee pkgver=3.5.1 -pkgrel=6 +pkgrel=7 pkgdesc="An IRC to other chat networks gateway" url="https://www.bitlbee.org/" arch="all" -license="GPL-2.0" -makedepends="python3 glib-dev openssl-dev libotr-dev" +license="GPL-2.0-or-later" +makedepends="python3 glib-dev gnutls-dev libotr-dev" subpackages="$pkgname-dev $pkgname-doc $pkgname-otr $pkgname-openrc" source="http://get.bitlbee.org/src/$pkgname-$pkgver.tar.gz - openssl-1.1.patch $pkgname.initd $pkgname.confd " -builddir="$srcdir/$pkgname-$pkgver" - build() { cd "$builddir" PYTHON=python3 \ ./configure \ --build=$CBUILD \ --host=$CHOST \ - --ssl=openssl \ --otr=plugin \ --prefix=/usr \ - --etcdir=/etc/bitlbee + --etcdir=/etc/bitlbee \ + --ssl=gnutls # https://bugs.bitlbee.org/ticket/886 make } @@ -41,12 +38,12 @@ package() { mkdir -p "$pkgdir"/var/lib/bitlbee chown nobody:nobody "$pkgdir"/var/lib/bitlbee } + otr() { - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/bitlbee "$subpkgdir"/usr/lib + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/bitlbee "$subpkgdir"/usr/lib } sha512sums="4eb3b0d3a92910c8dd789cd23338cc6296bf40212c5244fcb27a88ede10e86424ea59c78e719841863701a7fdd8c61819f2775f7b58833e287d9110e49d036f3 bitlbee-3.5.1.tar.gz -30361a2e5c9b6f08da521b9a802ff9ac74127434774eb5e68f051b545fd4bbaadb46cc76bab97d7e3139ea27db622fc7d889ce61c3464fedaff8775fa3e29444 openssl-1.1.patch 300c3445b9be6dac41bbd6d3a3ef5b871668743d4ea68dd779962d7af941cdaac61cb7c61e7ab2610bffac6dd9accc7ef9590593aef45e6930e2f49abaf9bf40 bitlbee.initd d86e85eecafe080d331034cfc0b1f38d8e5582772d1e1d7175d14b396e1ce3dfd1b94e8ee97ef54b85181b3eacf39bacd378a1da5014515ed909554708907991 bitlbee.confd" diff --git a/main/bitlbee/openssl-1.1.patch b/main/bitlbee/openssl-1.1.patch deleted file mode 100644 index 9b897e0247..0000000000 --- a/main/bitlbee/openssl-1.1.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 5c163e5063e01dfe94f73b2a3729c475cdd75467 Mon Sep 17 00:00:00 2001 -From: Eneas U de Queiroz <cote2004-github@yahoo.com> -Date: Thu, 24 May 2018 23:15:12 -0300 -Subject: [PATCH] Openssl 1.1 support - -This adds openssl 1.1.0 support. - -Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com> ---- - lib/ssl_openssl.c | 24 +++++++++++++++--------- - 1 file changed, 15 insertions(+), 9 deletions(-) - -diff --git a/lib/ssl_openssl.c b/lib/ssl_openssl.c -index 2f668da2..16e05a94 100644 ---- a/lib/ssl_openssl.c -+++ b/lib/ssl_openssl.c -@@ -64,11 +64,17 @@ void ssl_init(void) - { - const SSL_METHOD *meth; - -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - SSL_library_init(); - - meth = SSLv23_client_method(); - ssl_ctx = SSL_CTX_new(meth); - SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3); -+#else -+ meth = TLS_client_method(); -+ ssl_ctx = SSL_CTX_new(meth); -+ SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_VERSION); -+#endif - - initialized = TRUE; - } -@@ -300,20 +306,20 @@ size_t ssl_des3_encrypt(const unsigned char *key, size_t key_len, const unsigned - const unsigned char *iv, unsigned char **res) - { - int output_length = 0; -- EVP_CIPHER_CTX ctx; -+ EVP_CIPHER_CTX *ctx; - - *res = g_new0(unsigned char, 72); - - /* Don't set key or IV because we will modify the parameters */ -- EVP_CIPHER_CTX_init(&ctx); -- EVP_CipherInit_ex(&ctx, EVP_des_ede3_cbc(), NULL, NULL, NULL, 1); -- EVP_CIPHER_CTX_set_key_length(&ctx, key_len); -- EVP_CIPHER_CTX_set_padding(&ctx, 0); -+ ctx = EVP_CIPHER_CTX_new(); -+ EVP_CipherInit_ex(ctx, EVP_des_ede3_cbc(), NULL, NULL, NULL, 1); -+ EVP_CIPHER_CTX_set_key_length(ctx, key_len); -+ EVP_CIPHER_CTX_set_padding(ctx, 0); - /* We finished modifying parameters so now we can set key and IV */ -- EVP_CipherInit_ex(&ctx, NULL, NULL, key, iv, 1); -- EVP_CipherUpdate(&ctx, *res, &output_length, input, input_len); -- EVP_CipherFinal_ex(&ctx, *res, &output_length); -- EVP_CIPHER_CTX_cleanup(&ctx); -+ EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, 1); -+ EVP_CipherUpdate(ctx, *res, &output_length, input, input_len); -+ EVP_CipherFinal_ex(ctx, *res, &output_length); -+ EVP_CIPHER_CTX_free(ctx); - //EVP_cleanup(); - - return output_length; |