Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 36 lines (31 sloc) 1.375 kb
2a93fd3 @photron Initial commit
authored
1 --- a/lib/gtls.c 2010-01-24 01:08:28 +0000
2 +++ b/lib/gtls.c 2010-01-24 01:10:15 +0000
3 @@ -357,22 +357,28 @@
4
5 /* Use default priorities */
6 rc = gnutls_set_default_priority(session);
7 - if(rc != GNUTLS_E_SUCCESS)
8 + if(rc != GNUTLS_E_SUCCESS) {
9 + failf(data, "gnutls_set_default_priority() failed: %d", rc);
10 return CURLE_SSL_CONNECT_ERROR;
11 + }
12
13 if(data->set.ssl.version == CURL_SSLVERSION_SSLv3) {
14 static const int protocol_priority[] = { GNUTLS_SSL3, 0 };
15 - gnutls_protocol_set_priority(session, protocol_priority);
16 - if(rc != GNUTLS_E_SUCCESS)
17 + rc = gnutls_protocol_set_priority(session, protocol_priority);
18 + if(rc != GNUTLS_E_SUCCESS) {
19 + failf(data, "gnutls_protocol_set_priority() failed: %d", rc);
20 return CURLE_SSL_CONNECT_ERROR;
21 + }
22 }
23
24 /* Sets the priority on the certificate types supported by gnutls. Priority
25 is higher for types specified before others. After specifying the types
26 you want, you must append a 0. */
27 rc = gnutls_certificate_type_set_priority(session, cert_type_priority);
28 - if(rc != GNUTLS_E_SUCCESS)
29 + if(rc != GNUTLS_E_SUCCESS && rc != GNUTLS_E_UNIMPLEMENTED_FEATURE) {
30 + failf(data, "gnutls_certificate_type_set_priority() failed: %d", rc);
31 return CURLE_SSL_CONNECT_ERROR;
32 + }
33
34 if(data->set.str[STRING_CERT]) {
35 if( gnutls_certificate_set_x509_key_file(
Something went wrong with that request. Please try again.