Browse Source

Merge pull request #8518 from neheb/i

libimobiledevice packages updated to git
lilik-openwrt-22.03
Rosen Penev 6 years ago
committed by GitHub
parent
commit
5f28facc38
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 120 additions and 41 deletions
  1. +12
    -21
      libs/libimobiledevice/Makefile
  2. +88
    -0
      libs/libimobiledevice/patches/010-openssl-deprecated.patch
  3. +10
    -10
      libs/libusbmuxd/Makefile
  4. +10
    -10
      utils/usbmuxd/Makefile

+ 12
- 21
libs/libimobiledevice/Makefile View File

@ -8,29 +8,29 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libimobiledevice
PKG_VERSION:=1.2.1
PKG_RELEASE:=2
PKG_SOURCE_DATE:=2019-02-16
PKG_SOURCE_VERSION:=0584aa90c93ff6ce46927b8d67887cb987ab9545
PKG_RELEASE:=1
PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
PKG_MAINTAINER:=
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING.LESSER
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/libimobiledevice/libimobiledevice.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=13bf235cac2201747de11652cf14fe2714ca0718
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=4e8892b27f20216f86d69b36ad2229fca87cdf0a10f8d3e145d01841a492562a
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_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/libimobiledevice/Default
TITLE:=A library that talks to Apple devices.
URL:=http://www.libimobiledevice.org/
URL:=https://www.libimobiledevice.org/
endef
define Package/libimobiledevice/Default/description
@ -61,17 +61,8 @@ define Package/libimobiledevice-utils/description
This package contains the libimobiledevice utilities.
endef
CONFIGURE_VARS += \
libusbmuxd_CFLAGS="-I$(STAGING_DIR)/usr/include" \
libusbmuxd_LIBS="-L$(STAGING_DIR)/usr/lib -lusbmuxd" \
openssl_CFLAGS=" " \
openssl_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto"
CONFIGURE_ARGS += \
--without-cython \
--disable-largefile
TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
CONFIGURE_VARS += ac_cv_sys_file_offset_bits=64
CONFIGURE_ARGS += --without-cython
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include


+ 88
- 0
libs/libimobiledevice/patches/010-openssl-deprecated.patch View File

@ -0,0 +1,88 @@
--- 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);

+ 10
- 10
libs/libusbmuxd/Makefile View File

@ -8,28 +8,28 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libusbmuxd
PKG_VERSION:=1.1.0
PKG_RELEASE:=2
PKG_SOURCE_DATE:=2019-03-23
PKG_SOURCE_VERSION:=873252dc8b4e469c7dc692064ac616104fca5f65
PKG_RELEASE:=1
PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING.LGPLv2.1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/libimobiledevice/libusbmuxd.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=4397b3376dc4e4cb1c991d0aed61ce6482614196
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=e145b567cdefb1d2536f3eec863769c77474ce9a5d9c4c81ab0a75dc6fe3056a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/libimobiledevice/libusbmuxd/tar.gz/$(PKG_SOURCE_VERSION)?
PKG_HASH:=47e39ce87b05ca873c16efaa517247aa9db137625dd910d566fb3cd99b4a1d18
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/libusbmuxd/Default
TITLE:=USB multiplexing daemon
URL:=http://www.libimobiledevice.org/
URL:=https://www.libimobiledevice.org/
endef
define Package/libusbmuxd/Default/description
@ -66,7 +66,7 @@ define Package/libusbmuxd-utils/description
This package contains the libusbmuxd utilities.
endef
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += --with-pic
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include


+ 10
- 10
utils/usbmuxd/Makefile View File

@ -8,22 +8,22 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=usbmuxd
PKG_VERSION:=1.1.1
PKG_RELEASE:=4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2019-03-04
PKG_SOURCE_VERSION:=b1b0bf390363fa36aff1bc09443ff751943b9c34
PKG_RELEASE:=1
PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING.GPLv2
PKG_SOURCE_URL:=https://github.com/libimobiledevice/usbmuxd.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=35e5d48f29ae03b2b9686109e4ed9ab8b9677ce8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=7c0d8ea230570344fbc0183c0171689c74baf3d75fff33bbdfca2d1775a4d62d
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
PKG_SOURCE_URL=https://codeload.github.com/libimobiledevice/usbmuxd/tar.gz/$(PKG_SOURCE_VERSION)?
PKG_HASH:=ca4275dbc21e8d9c926e65943b605ea5a6112d30eb3f9e655d3983da87ac6798
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
@ -43,7 +43,7 @@ define Package/usbmuxd/description
uses a dedicated USB interface as a virtual network device.
endef
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += --without-systemd
define Package/usbmuxd/install
$(INSTALL_DIR) $(1)/usr/sbin


Loading…
Cancel
Save