1 |
dev-zero 14/07/04 14:26:13 |
2 |
|
3 |
Added: aria2-1.18.5-fix-gnutls-2.x-compatibility.patch |
4 |
Log: |
5 |
Add backported gnutls-2.x compatibility fix (bug #516226). |
6 |
|
7 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0x1A5D023975B0583D!) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 net-misc/aria2/files/aria2-1.18.5-fix-gnutls-2.x-compatibility.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/aria2/files/aria2-1.18.5-fix-gnutls-2.x-compatibility.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/aria2/files/aria2-1.18.5-fix-gnutls-2.x-compatibility.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: aria2-1.18.5-fix-gnutls-2.x-compatibility.patch |
16 |
=================================================================== |
17 |
From 13a202df070dd58bb930549c62627dcd97b02b86 Mon Sep 17 00:00:00 2001 |
18 |
From: Nils Maier <maierman@×××.de> |
19 |
Date: Sat, 12 Apr 2014 02:51:21 +0200 |
20 |
Subject: [PATCH] Fix GnuTLS 2.x compatiblity |
21 |
|
22 |
Closes GH-216 |
23 |
--- |
24 |
src/LibgnutlsTLSSession.cc | 6 ++++++ |
25 |
1 file changed, 6 insertions(+) |
26 |
|
27 |
diff --git a/src/LibgnutlsTLSSession.cc b/src/LibgnutlsTLSSession.cc |
28 |
index 61c4550..94abf6f 100644 |
29 |
--- a/src/LibgnutlsTLSSession.cc |
30 |
+++ b/src/LibgnutlsTLSSession.cc |
31 |
@@ -75,6 +75,7 @@ GnuTLSSession::~GnuTLSSession() |
32 |
|
33 |
int GnuTLSSession::init(sock_t sockfd) |
34 |
{ |
35 |
+#if GNUTLS_VERSION_NUMBER >= 0x030000 |
36 |
unsigned int flags = tlsContext_->getSide() == TLS_CLIENT ? |
37 |
GNUTLS_CLIENT : GNUTLS_SERVER; |
38 |
#ifdef A2_DISABLE_OCSP |
39 |
@@ -84,6 +85,11 @@ int GnuTLSSession::init(sock_t sockfd) |
40 |
#endif // A2_DISABLE_OCSP |
41 |
|
42 |
rv_ = gnutls_init(&sslSession_, flags); |
43 |
+#else // GNUTLS_VERSION_NUMBER >= 0x030000 |
44 |
+ rv_ = gnutls_init( |
45 |
+ &sslSession_, |
46 |
+ tlsContext_->getSide() == TLS_CLIENT ? GNUTLS_CLIENT : GNUTLS_SERVER); |
47 |
+#endif // GNUTLS_VERSION_NUMBER >= 0x030000 |
48 |
if(rv_ != GNUTLS_E_SUCCESS) { |
49 |
return TLS_ERR_ERROR; |
50 |
} |
51 |
-- |
52 |
1.9.3 |