libimobiledevice: Update to 2019-11-29
authorRosen Penev <rosenp@gmail.com>
Fri, 6 Dec 2019 06:26:44 +0000 (22:26 -0800)
committerRosen Penev <rosenp@gmail.com>
Sat, 2 Jan 2021 01:51:59 +0000 (17:51 -0800)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit ff321480a575e1c29c9b78ceca1d2e8c60ed6071)

libs/libimobiledevice/Makefile
libs/libimobiledevice/patches/010-openssl-deprecated.patch [deleted file]

index 6eba622d51a936b2b7df840fbbb416a79eb2df5a..2fa112ef9e5dadd0a81cbc3a3aa3bdffe17e831a 100644 (file)
@@ -8,18 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libimobiledevice
-PKG_SOURCE_DATE:=2019-02-16
-PKG_SOURCE_VERSION:=0584aa90c93ff6ce46927b8d67887cb987ab9545
-PKG_RELEASE:=2
+PKG_SOURCE_DATE:=2019-11-29
+PKG_SOURCE_VERSION:=9f79242a441ce37c28db2b84d49621d26418dc53
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=
 PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING.LESSER
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/libimobiledevice/libimobiledevice/tar.gz/$(PKG_SOURCE_VERSION)?
-PKG_HASH:=286e294aad60ef04a39ce70512a0e816415167c982f3e6c2988d9a6b8c5ee29b
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/libimobiledevice/libimobiledevice
+PKG_MIRROR_HASH:=709a3f8632930be272020a2ff5109aab5a6dddda39580d60e4f5eacace857e08
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
diff --git a/libs/libimobiledevice/patches/010-openssl-deprecated.patch b/libs/libimobiledevice/patches/010-openssl-deprecated.patch
deleted file mode 100644 (file)
index e6a5459..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
---- a/common/userpref.c
-+++ b/common/userpref.c
-@@ -37,6 +37,7 @@
- #include <unistd.h>
- #include <usbmuxd.h>
- #ifdef HAVE_OPENSSL
-+#include <openssl/bn.h>
- #include <openssl/pem.h>
- #include <openssl/rsa.h>
- #include <openssl/x509.h>
-@@ -73,6 +74,11 @@ const ASN1_ARRAY_TYPE pkcs1_asn1_tab[] = {
- };
- #endif
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define X509_set1_notBefore X509_set_notBefore
-+#define X509_set1_notAfter X509_set_notAfter
-+#endif
-+
- #ifdef WIN32
- #define DIR_SEP '\\'
- #define DIR_SEP_S "\\"
-@@ -420,9 +426,9 @@ userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_da
-               /* set key validity */
-               ASN1_TIME* asn1time = ASN1_TIME_new();
-               ASN1_TIME_set(asn1time, time(NULL));
--              X509_set_notBefore(root_cert, asn1time);
-+              X509_set1_notBefore(root_cert, asn1time);
-               ASN1_TIME_set(asn1time, time(NULL) + (60 * 60 * 24 * 365 * 10));
--              X509_set_notAfter(root_cert, asn1time);
-+              X509_set1_notAfter(root_cert, asn1time);
-               ASN1_TIME_free(asn1time);
-               /* use root public key for root cert */
-@@ -453,9 +459,9 @@ userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_da
-               /* set key validity */
-               ASN1_TIME* asn1time = ASN1_TIME_new();
-               ASN1_TIME_set(asn1time, time(NULL));
--              X509_set_notBefore(host_cert, asn1time);
-+              X509_set1_notBefore(host_cert, asn1time);
-               ASN1_TIME_set(asn1time, time(NULL) + (60 * 60 * 24 * 365 * 10));
--              X509_set_notAfter(host_cert, asn1time);
-+              X509_set1_notAfter(host_cert, asn1time);
-               ASN1_TIME_free(asn1time);
-               /* use host public key for host cert */
-@@ -533,9 +539,9 @@ userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_da
-               ASN1_TIME* asn1time = ASN1_TIME_new();
-               ASN1_TIME_set(asn1time, time(NULL));
--              X509_set_notBefore(dev_cert, asn1time);
-+              X509_set1_notBefore(dev_cert, asn1time);
-               ASN1_TIME_set(asn1time, time(NULL) + (60 * 60 * 24 * 365 * 10));
--              X509_set_notAfter(dev_cert, asn1time);
-+              X509_set1_notAfter(dev_cert, asn1time);
-               ASN1_TIME_free(asn1time);
-               EVP_PKEY* pkey = EVP_PKEY_new();
---- a/src/idevice.c
-+++ b/src/idevice.c
-@@ -36,6 +36,7 @@
- #include <usbmuxd.h>
- #ifdef HAVE_OPENSSL
- #include <openssl/err.h>
-+#include <openssl/rsa.h>
- #include <openssl/ssl.h>
- #else
-@@ -49,6 +50,10 @@
- #ifdef HAVE_OPENSSL
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define TLS_method TLSv1_method
-+#endif
-+
- #if OPENSSL_VERSION_NUMBER < 0x10002000L
- static void SSL_COMP_free_compression_methods(void)
- {
-@@ -721,7 +726,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_conne
-       }
-       BIO_set_fd(ssl_bio, (int)(long)connection->data, BIO_NOCLOSE);
--      SSL_CTX *ssl_ctx = SSL_CTX_new(TLSv1_method());
-+      SSL_CTX *ssl_ctx = SSL_CTX_new(TLS_method());
-       if (ssl_ctx == NULL) {
-               debug_info("ERROR: Could not create SSL context.");
-               BIO_free(ssl_bio);