diff options
| author | 2016-03-21 17:45:59 -0400 | |
|---|---|---|
| committer | 2016-06-16 19:32:57 +0200 | |
| commit | 13bf235cac2201747de11652cf14fe2714ca0718 (patch) | |
| tree | 2129f10f7c6a4836b54eee5b45ef2ddd8b8b3ea0 | |
| parent | dc4c75d8a0a2ef557ac9ba0d2e080805621a3d98 (diff) | |
| download | libimobiledevice-13bf235cac2201747de11652cf14fe2714ca0718.tar.gz libimobiledevice-13bf235cac2201747de11652cf14fe2714ca0718.tar.bz2 | |
Fix SSL version negotiation for newer versions of OpenSSL
Depending on the OpenSSL version (and custom distribution patches), `SSLv3_method()`
would return NULL on some systems and also `SSLv23_method()` fails with some older
iOS versions...
| -rw-r--r-- | src/idevice.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/idevice.c b/src/idevice.c index f2de6a3..1dcdae2 100644 --- a/src/idevice.c +++ b/src/idevice.c | |||
| @@ -703,7 +703,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_conne | |||
| 703 | } | 703 | } |
| 704 | BIO_set_fd(ssl_bio, (int)(long)connection->data, BIO_NOCLOSE); | 704 | BIO_set_fd(ssl_bio, (int)(long)connection->data, BIO_NOCLOSE); |
| 705 | 705 | ||
| 706 | SSL_CTX *ssl_ctx = SSL_CTX_new(SSLv3_method()); | 706 | SSL_CTX *ssl_ctx = SSL_CTX_new(TLSv1_method()); |
| 707 | if (ssl_ctx == NULL) { | 707 | if (ssl_ctx == NULL) { |
| 708 | debug_info("ERROR: Could not create SSL context."); | 708 | debug_info("ERROR: Could not create SSL context."); |
| 709 | BIO_free(ssl_bio); | 709 | BIO_free(ssl_bio); |
