diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/idevice.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/idevice.c b/src/idevice.c index 8c81576..02d34cc 100644 --- a/src/idevice.c +++ b/src/idevice.c | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <usbmuxd.h> | 36 | #include <usbmuxd.h> |
| 37 | #ifdef HAVE_OPENSSL | 37 | #ifdef HAVE_OPENSSL |
| 38 | #include <openssl/err.h> | 38 | #include <openssl/err.h> |
| 39 | #include <openssl/rsa.h> | ||
| 39 | #include <openssl/ssl.h> | 40 | #include <openssl/ssl.h> |
| 40 | #else | 41 | #else |
| 41 | #include <gnutls/gnutls.h> | 42 | #include <gnutls/gnutls.h> |
| @@ -49,6 +50,11 @@ | |||
| 49 | 50 | ||
| 50 | #ifdef HAVE_OPENSSL | 51 | #ifdef HAVE_OPENSSL |
| 51 | 52 | ||
| 53 | #if OPENSSL_VERSION_NUMBER < 0x10100000L || \ | ||
| 54 | (defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x20020000L)) | ||
| 55 | #define TLS_method TLSv1_method | ||
| 56 | #endif | ||
| 57 | |||
| 52 | #if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER) | 58 | #if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER) |
| 53 | static void SSL_COMP_free_compression_methods(void) | 59 | static void SSL_COMP_free_compression_methods(void) |
| 54 | { | 60 | { |
| @@ -771,7 +777,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_conne | |||
| 771 | } | 777 | } |
| 772 | BIO_set_fd(ssl_bio, (int)(long)connection->data, BIO_NOCLOSE); | 778 | BIO_set_fd(ssl_bio, (int)(long)connection->data, BIO_NOCLOSE); |
| 773 | 779 | ||
| 774 | SSL_CTX *ssl_ctx = SSL_CTX_new(TLSv1_method()); | 780 | SSL_CTX *ssl_ctx = SSL_CTX_new(TLS_method()); |
| 775 | if (ssl_ctx == NULL) { | 781 | if (ssl_ctx == NULL) { |
| 776 | debug_info("ERROR: Could not create SSL context."); | 782 | debug_info("ERROR: Could not create SSL context."); |
| 777 | BIO_free(ssl_bio); | 783 | BIO_free(ssl_bio); |
