-
Notifications
You must be signed in to change notification settings - Fork 12
/
curl-7.19.7-gnutls.patch
35 lines (31 loc) · 1.34 KB
/
curl-7.19.7-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
--- 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(