diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-08-27 08:25:02 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-08-27 08:25:40 +0000 |
commit | 173054f4f0fbc6d12b46bca5d476f76bf0a5d85f (patch) | |
tree | 2aeb24bcee0d04a4203254c8f30463faa6169d40 /main/libetpan | |
parent | acbd6624994984fe4b444cc793d6ea9b72845017 (diff) | |
download | aports-173054f4f0fbc6d12b46bca5d476f76bf0a5d85f.tar.bz2 aports-173054f4f0fbc6d12b46bca5d476f76bf0a5d85f.tar.xz |
main/libetpan: fix user cert
ref #9340
upstream report: https://github.com/dinhviethoa/libetpan/issues/288
Diffstat (limited to 'main/libetpan')
-rw-r--r-- | main/libetpan/0001-Fix-user-certificate-with-gnutls-3.0-api.patch | 27 | ||||
-rw-r--r-- | main/libetpan/APKBUILD | 9 | ||||
-rw-r--r-- | main/libetpan/gnutls-fix-1.patch | 32 | ||||
-rw-r--r-- | main/libetpan/gnutls-fix-2.patch | 33 |
4 files changed, 33 insertions, 68 deletions
diff --git a/main/libetpan/0001-Fix-user-certificate-with-gnutls-3.0-api.patch b/main/libetpan/0001-Fix-user-certificate-with-gnutls-3.0-api.patch new file mode 100644 index 0000000000..c6bd73e2c4 --- /dev/null +++ b/main/libetpan/0001-Fix-user-certificate-with-gnutls-3.0-api.patch @@ -0,0 +1,27 @@ +From 98ecc14f0cb7130a4651ca4c7bd02af05d5a365a Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Mon, 27 Aug 2018 10:12:10 +0200 +Subject: [PATCH] Fix user certificate with gnutls 3.0 api + +fixes #288 +--- + src/data-types/mailstream_ssl.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/data-types/mailstream_ssl.c b/src/data-types/mailstream_ssl.c +index 248d392..cb0a17e 100644 +--- a/src/data-types/mailstream_ssl.c ++++ b/src/data-types/mailstream_ssl.c +@@ -568,7 +568,8 @@ static int mailstream_gnutls_client_cert_cb(gnutls_session session, + #if GNUTLS_VERSION_NUMBER <= 0x020c00 + st->type = type; + #else +- st->key_type = type; ++ st->cert_type = type; ++ st->key_type = GNUTLS_PRIVKEY_X509; + #endif + st->cert.x509 = &(ssl_context->client_x509); + st->key.x509 = ssl_context->client_pkey; +-- +2.18.0 + diff --git a/main/libetpan/APKBUILD b/main/libetpan/APKBUILD index f75b08ef0a..78cb2cc854 100644 --- a/main/libetpan/APKBUILD +++ b/main/libetpan/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=libetpan pkgver=1.8 -pkgrel=2 +pkgrel=1 pkgdesc="a portable middleware for email access" url="http://www.etpan.org/" arch="all" @@ -10,7 +10,9 @@ subpackages="$pkgname-dev $pkgname-doc" makedepends="db-dev cyrus-sasl-dev curl-dev expat-dev gnutls-dev libgcrypt-dev libgpg-error-dev autoconf automake libtool zlib-dev" depends_dev="cyrus-sasl-dev db-dev" -source="libetpan-$pkgver.tar.gz::https://github.com/dinhviethoa/libetpan/archive/$pkgver.tar.gz" +source="libetpan-$pkgver.tar.gz::https://github.com/dinhviethoa/libetpan/archive/$pkgver.tar.gz + 0001-Fix-user-certificate-with-gnutls-3.0-api.patch + " builddir="$srcdir/$pkgname-$pkgver" @@ -44,4 +46,5 @@ package() { install -Dm644 COPYRIGHT "$pkgdir"/usr/share/licenses/$pkgname/license.txt } -sha512sums="a5e97998803cc56dbd54356153c8579b52a9675fe95fbf642c3158215428d9d2cb30c4e0060c5f4dd760634fff5b1c2a32ce4bb70a5f2bc6398a071ce95e1efd libetpan-1.8.tar.gz" +sha512sums="a5e97998803cc56dbd54356153c8579b52a9675fe95fbf642c3158215428d9d2cb30c4e0060c5f4dd760634fff5b1c2a32ce4bb70a5f2bc6398a071ce95e1efd libetpan-1.8.tar.gz +884f3c0bde7ba4a9128c6fb86bf6667f2388b6ca197051083c928cb36df7c909367a5cb0042826ce6199ce3d1e5161e36db6f3fc3ce3808eb431ddd8d8d530ef 0001-Fix-user-certificate-with-gnutls-3.0-api.patch" diff --git a/main/libetpan/gnutls-fix-1.patch b/main/libetpan/gnutls-fix-1.patch deleted file mode 100644 index a707452341..0000000000 --- a/main/libetpan/gnutls-fix-1.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b375332c53dea84d32f42c785e96352aacb79513 Mon Sep 17 00:00:00 2001 -From: "Hoa V. DINH" <dinh.viet.hoa@gmail.com> -Date: Wed, 20 Nov 2013 21:48:44 -0800 -Subject: [PATCH] Fixed #86: Fixed build for GnuTLS - ---- - src/data-types/mailstream_ssl.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/data-types/mailstream_ssl.c b/src/data-types/mailstream_ssl.c -index d0ef259..6002421 100644 ---- a/src/data-types/mailstream_ssl.c -+++ b/src/data-types/mailstream_ssl.c -@@ -154,6 +154,7 @@ struct mailstream_ssl_data { - #endif - - // Used to make OpenSSL thread safe -+#ifndef USE_GNUTLS - #if defined (HAVE_PTHREAD_H) && !defined (WIN32) && defined (USE_SSL) && defined (LIBETPAN_REENTRANT) - struct CRYPTO_dynlock_value - { -@@ -224,6 +225,7 @@ struct mailstream_ssl_data { - CRYPTO_set_dynlock_destroy_callback(dyn_destroy_function); - } - #endif -+#endif - - void mailstream_ssl_init_lock(void) - { --- -1.8.5.5 - diff --git a/main/libetpan/gnutls-fix-2.patch b/main/libetpan/gnutls-fix-2.patch deleted file mode 100644 index cf1983c2eb..0000000000 --- a/main/libetpan/gnutls-fix-2.patch +++ /dev/null @@ -1,33 +0,0 @@ -From c4443cd85d708f1a6c3e6c249e4acda2029863f2 Mon Sep 17 00:00:00 2001 -From: "Hoa V. DINH" <dinh.viet.hoa@gmail.com> -Date: Mon, 25 Nov 2013 20:40:48 -0800 -Subject: [PATCH] Fixed #86: fixed build for GnuTLS - ---- - src/data-types/mailstream_ssl.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/data-types/mailstream_ssl.c b/src/data-types/mailstream_ssl.c -index 6002421..b4c0c70 100644 ---- a/src/data-types/mailstream_ssl.c -+++ b/src/data-types/mailstream_ssl.c -@@ -521,6 +521,7 @@ static struct mailstream_ssl_data * ssl_data_new(int fd, time_t timeout, - gnutls_certificate_credentials_t xcred; - int r; - struct mailstream_ssl_context * ssl_context = NULL; -+ unsigned int timeout_value; - - mailstream_ssl_init(); - -@@ -552,7 +553,7 @@ static struct mailstream_ssl_data * ssl_data_new(int fd, time_t timeout, - gnutls_dh_set_prime_bits(session, 512); - - if (timeout == 0) { -- timeout_value = mailstream_network_delay.tv_sec * 1000 + timeout.tv_usec / 1000; -+ timeout_value = mailstream_network_delay.tv_sec * 1000 + mailstream_network_delay.tv_usec / 1000; - } - else { - timeout_value = timeout; --- -1.8.5.5 - |