aboutsummaryrefslogtreecommitdiffstats
path: root/main/libetpan/0001-Fix-user-certificate-with-gnutls-3.0-api.patch
blob: c6bd73e2c47e8d8f1b347f100965bc876898ed14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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