diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/idevice.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/idevice.c b/src/idevice.c index dce4b41..593a2ae 100644 --- a/src/idevice.c +++ b/src/idevice.c | |||
| @@ -761,8 +761,8 @@ idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection) | |||
| 761 | 761 | ||
| 762 | /* Set up GnuTLS... */ | 762 | /* Set up GnuTLS... */ |
| 763 | debug_info("enabling SSL mode"); | 763 | debug_info("enabling SSL mode"); |
| 764 | errno = 0; | ||
| 765 | gnutls_global_init(); | 764 | gnutls_global_init(); |
| 765 | errno = 0; | ||
| 766 | gnutls_certificate_allocate_credentials(&ssl_data_loc->certificate); | 766 | gnutls_certificate_allocate_credentials(&ssl_data_loc->certificate); |
| 767 | gnutls_certificate_client_set_retrieve_function(ssl_data_loc->certificate, internal_cert_callback); | 767 | gnutls_certificate_client_set_retrieve_function(ssl_data_loc->certificate, internal_cert_callback); |
| 768 | gnutls_init(&ssl_data_loc->session, GNUTLS_CLIENT); | 768 | gnutls_init(&ssl_data_loc->session, GNUTLS_CLIENT); |
| @@ -791,7 +791,7 @@ idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection) | |||
| 791 | gnutls_transport_set_pull_function(ssl_data_loc->session, (gnutls_pull_func) & internal_ssl_read); | 791 | gnutls_transport_set_pull_function(ssl_data_loc->session, (gnutls_pull_func) & internal_ssl_read); |
| 792 | debug_info("GnuTLS step 4 -- now handshaking..."); | 792 | debug_info("GnuTLS step 4 -- now handshaking..."); |
| 793 | if (errno) { | 793 | if (errno) { |
| 794 | debug_info("WARN: errno says %s before handshake!", strerror(errno)); | 794 | debug_info("WARNING: errno says %s before handshake!", strerror(errno)); |
| 795 | } | 795 | } |
| 796 | return_me = gnutls_handshake(ssl_data_loc->session); | 796 | return_me = gnutls_handshake(ssl_data_loc->session); |
| 797 | debug_info("GnuTLS handshake done..."); | 797 | debug_info("GnuTLS handshake done..."); |
