-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathcurl-7.21.1-gnutls.patch
58 lines (53 loc) · 2.26 KB
/
curl-7.21.1-gnutls.patch
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
--- a/configure 2010-10-28 15:15:57 +0000
+++ b/configure 2010-10-28 15:15:09 +0000
@@ -20541,7 +20541,7 @@
fi
else
# Without pkg-config, we'll kludge in some defaults
- addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
+ addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread"
addcflags="-I$OPT_NSS/include"
version="unknown"
nssprefix=$OPT_NSS
--- a/configure.ac 2010-10-28 15:15:41 +0000
+++ b/configure.ac 2010-10-28 15:15:25 +0000
@@ -1843,7 +1843,7 @@
fi
else
# Without pkg-config, we'll kludge in some defaults
- addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
+ addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread"
addcflags="-I$OPT_NSS/include"
version="unknown"
nssprefix=$OPT_NSS
--- a/lib/gtls.c 2010-01-24 01:08:28 +0000
+++ b/lib/gtls.c 2010-01-24 01:10:15 +0000
@@ -357,22 +357,28 @@
/* Use default priorities */
rc = gnutls_set_default_priority(session);
- if(rc != GNUTLS_E_SUCCESS)
+ if(rc != GNUTLS_E_SUCCESS) {
+ failf(data, "gnutls_set_default_priority() failed: %d", rc);
return CURLE_SSL_CONNECT_ERROR;
+ }
if(data->set.ssl.version == CURL_SSLVERSION_SSLv3) {
static const int protocol_priority[] = { GNUTLS_SSL3, 0 };
- gnutls_protocol_set_priority(session, protocol_priority);
- if(rc != GNUTLS_E_SUCCESS)
+ rc = gnutls_protocol_set_priority(session, protocol_priority);
+ if(rc != GNUTLS_E_SUCCESS) {
+ failf(data, "gnutls_protocol_set_priority() failed: %d", rc);
return CURLE_SSL_CONNECT_ERROR;
+ }
}
/* Sets the priority on the certificate types supported by gnutls. Priority
is higher for types specified before others. After specifying the types
you want, you must append a 0. */
rc = gnutls_certificate_type_set_priority(session, cert_type_priority);
- if(rc != GNUTLS_E_SUCCESS)
+ if(rc != GNUTLS_E_SUCCESS && rc != GNUTLS_E_UNIMPLEMENTED_FEATURE) {
+ failf(data, "gnutls_certificate_type_set_priority() failed: %d", rc);
return CURLE_SSL_CONNECT_ERROR;
+ }
if(data->set.str[STRING_CERT]) {
if( gnutls_certificate_set_x509_key_file(