Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libimobiledevice for 
openSUSE:Factory checked in at 2023-08-18 19:27:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libimobiledevice (Old)
 and      /work/SRC/openSUSE:Factory/.libimobiledevice.new.1766 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libimobiledevice"

Fri Aug 18 19:27:34 2023 rev:44 rq:1103811 version:1.3.0+190git.20230705

Changes:
--------
--- /work/SRC/openSUSE:Factory/libimobiledevice/libimobiledevice.changes        
2023-06-09 20:38:08.238797989 +0200
+++ 
/work/SRC/openSUSE:Factory/.libimobiledevice.new.1766/libimobiledevice.changes  
    2023-08-18 19:27:43.439247559 +0200
@@ -1,0 +2,17 @@
+Mon Aug 14 08:26:07 UTC 2023 - [email protected]
+
+- Update to version 1.3.0+190git.20230705:
+  * tools/idevicecrashreport: Silence compiler warning
+  * Silence (v)asprintf related compiler warnings
+  * Updated OpenSSL-specific code to use OpenSSL 3.0+ API
+  * 3rd_party/libsrp6a-sha512: Updated to work with OpenSSL 3.0+ API
+  * 3rd_party/libsrp6a-sha512: Update function definitions to modern style
+  * 3rd_party/ed25519: Silence compiler warning about missing return value for 
fread
+  * tools/idevicedebug: Add missing default case for switch statement
+  * tools/idevicedevmodectl: Add missing include
+  * idevice: Add missing include for Windows
+  * idevice: Fix network address handling in other code paths too
+  * idevice: Use network addresses as is from what we get from (lib)usbmuxd
+- restrict to Cython < 3
+
+-------------------------------------------------------------------

Old:
----
  libimobiledevice-1.3.0+179git.20230430.obscpio

New:
----
  libimobiledevice-1.3.0+190git.20230705.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libimobiledevice.spec ++++++
--- /var/tmp/diff_new_pack.J2LxUo/_old  2023-08-18 19:27:44.331249158 +0200
+++ /var/tmp/diff_new_pack.J2LxUo/_new  2023-08-18 19:27:44.335249166 +0200
@@ -18,7 +18,7 @@
 
 %define libname libimobiledevice-1_0-6
 Name:           libimobiledevice
-Version:        1.3.0+179git.20230430
+Version:        1.3.0+190git.20230705
 Release:        0
 Summary:        Native protocols library for iOS devices
 License:        LGPL-2.1-or-later
@@ -31,7 +31,7 @@
 BuildRequires:  libtool
 BuildRequires:  pkgconfig
 BuildRequires:  python-rpm-macros
-BuildRequires:  python3-Cython >= 0.17
+BuildRequires:  (python3-Cython >= 0.17 with python3-Cython < 3)
 BuildRequires:  python3-plist
 BuildRequires:  readline-devel
 BuildRequires:  pkgconfig(libimobiledevice-glue-1.0) >= 1.0.0

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.J2LxUo/_old  2023-08-18 19:27:44.395249273 +0200
+++ /var/tmp/diff_new_pack.J2LxUo/_new  2023-08-18 19:27:44.399249280 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">[email protected]:libimobiledevice/libimobiledevice.git</param>
-              <param 
name="changesrevision">860ffb707af3af94467d2ece4ad258dda957c6cd</param></service></servicedata>
+              <param 
name="changesrevision">6fc41f57fc607df9b07446ca45bdf754225c9bd9</param></service></servicedata>
 (No newline at EOF)
 

++++++ libimobiledevice-1.3.0+179git.20230430.obscpio -> 
libimobiledevice-1.3.0+190git.20230705.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libimobiledevice-1.3.0+179git.20230430/3rd_party/ed25519/seed.c 
new/libimobiledevice-1.3.0+190git.20230705/3rd_party/ed25519/seed.c
--- old/libimobiledevice-1.3.0+179git.20230430/3rd_party/ed25519/seed.c 
2023-04-30 14:09:19.000000000 +0200
+++ new/libimobiledevice-1.3.0+190git.20230705/3rd_party/ed25519/seed.c 
2023-07-05 13:18:22.000000000 +0200
@@ -30,7 +30,7 @@
         return 1;
     }
 
-    fread(seed, 1, 32, f);
+    if(fread(seed, 1, 32, f)){}
     fclose(f);
 #endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libimobiledevice-1.3.0+179git.20230430/3rd_party/libsrp6a-sha512/Makefile.am
 
new/libimobiledevice-1.3.0+190git.20230705/3rd_party/libsrp6a-sha512/Makefile.am
--- 
old/libimobiledevice-1.3.0+179git.20230430/3rd_party/libsrp6a-sha512/Makefile.am
    2023-04-30 14:09:19.000000000 +0200
+++ 
new/libimobiledevice-1.3.0+190git.20230705/3rd_party/libsrp6a-sha512/Makefile.am
    2023-07-05 13:18:22.000000000 +0200
@@ -24,7 +24,8 @@
   t_conv.c t_math.c t_misc.c \
   t_truerand.c cstr.c \
   srp.c srp6a_sha512_client.c \
-  srp.h srp_aux.h cstr.h
-if !HAVE_OPENSSL
-libsrp6a_sha512_la_SOURCES += t_sha.c
-endif
+  srp.h srp_aux.h cstr.h \
+  t_sha.c
+#if !HAVE_OPENSSL
+#libsrp6a_sha512_la_SOURCES += t_sha.c
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libimobiledevice-1.3.0+179git.20230430/3rd_party/libsrp6a-sha512/t_conv.c 
new/libimobiledevice-1.3.0+190git.20230705/3rd_party/libsrp6a-sha512/t_conv.c
--- 
old/libimobiledevice-1.3.0+179git.20230430/3rd_party/libsrp6a-sha512/t_conv.c   
    2023-04-30 14:09:19.000000000 +0200
+++ 
new/libimobiledevice-1.3.0+190git.20230705/3rd_party/libsrp6a-sha512/t_conv.c   
    2023-07-05 13:18:22.000000000 +0200
@@ -33,8 +33,7 @@
 #include "cstr.h"
 
 static int
-hexDigitToInt(c)
-     char c;
+hexDigitToInt(char c)
 {
   if(c >= '0' && c <= '9')
     return c - '0';
@@ -50,9 +49,7 @@
  * Convert a hex string to a string of bytes; return size of dst
  */
 _TYPE( int )
-t_fromhex(dst, src)
-     char * dst;
-     const char * src;
+t_fromhex(char *dst, const char *src)
 {
   register char *chp = dst;
   register unsigned size = strlen(src);
@@ -76,10 +73,7 @@
  * Convert a string of bytes to their hex representation
  */
 _TYPE( char * )
-t_tohex(dst, src, size)
-     char * dst;
-     const char * src;
-     unsigned size;
+t_tohex(char *dst, const char *src, unsigned size)
 {
    int notleading = 0;
 
@@ -103,10 +97,7 @@
 }
 
 _TYPE( char * )
-t_tohexcstr(dst, src, size)
-     cstr * dst;
-     const char * src;
-     unsigned size;
+t_tohexcstr(cstr *dst, const char *src, unsigned size)
 {
   cstr_set_length(dst, 2 * size + 1);
   return t_tohex(dst->data, src, size);
@@ -119,9 +110,7 @@
  * Convert a base64 string into raw byte array representation.
  */
 _TYPE( int )
-t_fromb64(dst, src)
-     char * dst;
-     const char * src;
+t_fromb64(char *dst, const char *src)
 {
   unsigned char *a;
   char *loc;
@@ -179,9 +168,7 @@
 }
 
 _TYPE( int )
-t_cstrfromb64(dst, src)
-     cstr * dst;
-     const char * src;
+t_cstrfromb64(cstr *dst, const char *src)
 {
   int len;
   cstr_set_length(dst, (strlen(src) * 6 + 7) / 8);
@@ -194,10 +181,7 @@
  * Convert a raw byte string into a null-terminated base64 ASCII string.
  */
 _TYPE( char * )
-t_tob64(dst, src, size)
-     char * dst;
-     const char * src;
-     unsigned size;
+t_tob64(char *dst, const char *src, unsigned size)
 {
   int c, pos = size % 3;
   unsigned char b0 = 0, b1 = 0, b2 = 0, notleading = 0;
@@ -248,10 +232,7 @@
 }
 
 _TYPE( char * )
-t_tob64cstr(dst, src, sz)
-     cstr * dst;
-     const char * src;
-     unsigned int sz;
+t_tob64cstr(cstr *dst, const char *src, unsigned int sz)
 {
   cstr_set_length(dst, (sz * 8 + 5) / 6 + 1);
   return t_tob64(dst->data, src, sz);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libimobiledevice-1.3.0+179git.20230430/3rd_party/libsrp6a-sha512/t_math.c 
new/libimobiledevice-1.3.0+190git.20230705/3rd_party/libsrp6a-sha512/t_math.c
--- 
old/libimobiledevice-1.3.0+179git.20230430/3rd_party/libsrp6a-sha512/t_math.c   
    2023-04-30 14:09:19.000000000 +0200
+++ 
new/libimobiledevice-1.3.0+190git.20230705/3rd_party/libsrp6a-sha512/t_math.c   
    2023-07-05 13:18:22.000000000 +0200
@@ -39,11 +39,13 @@
 typedef BN_CTX * BigIntegerCtx;
 typedef BN_MONT_CTX * BigIntegerModAccel;
 #include <limits.h>
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
 # ifndef OPENSSL_NO_ENGINE
 #  define OPENSSL_ENGINE
 #  include "openssl/engine.h"
 static ENGINE * default_engine = NULL;
 # endif /* OPENSSL_ENGINE */
+#endif
 typedef int (*modexp_meth)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
                           const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *mctx);
 static modexp_meth default_modexp = NULL;
@@ -99,8 +101,7 @@
 /* Math library interface stubs */
 
 BigInteger
-BigIntegerFromInt(n)
-     unsigned int n;
+BigIntegerFromInt(unsigned int n)
 {
 #ifdef OPENSSL
   BIGNUM * a = BN_new();
@@ -136,9 +137,7 @@
 }
 
 BigInteger
-BigIntegerFromBytes(bytes, length)
-     const unsigned char * bytes;
-     int length;
+BigIntegerFromBytes(const unsigned char *bytes, int length)
 {
 #ifdef OPENSSL
   BIGNUM * a = BN_new();
@@ -206,10 +205,7 @@
 }
 
 int
-BigIntegerToBytes(src, dest, destlen)
-     BigInteger src;
-     unsigned char * dest;
-     int destlen;
+BigIntegerToBytes(BigInteger src, unsigned char *dest, int destlen)
 {
 #ifdef OPENSSL
   return BN_bn2bin(src, dest);
@@ -290,10 +286,7 @@
 }
 
 BigIntegerResult
-BigIntegerToHex(src, dest, destlen)
-     BigInteger src;
-     char * dest;
-     int destlen;
+BigIntegerToHex(BigInteger src, char *dest, int destlen)
 {
 #ifdef OPENSSL
   strncpy(dest, BN_bn2hex(src), destlen);
@@ -317,11 +310,7 @@
   "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./";
 
 BigIntegerResult
-BigIntegerToString(src, dest, destlen, radix)
-     BigInteger src;
-     char * dest;
-     int destlen;
-     unsigned int radix;
+BigIntegerToString(BigInteger src, char *dest, int destlen, unsigned int radix)
 {
   BigInteger t = BigIntegerFromInt(0);
   char * p = dest;
@@ -345,8 +334,7 @@
 }
 
 int
-BigIntegerBitLen(b)
-     BigInteger b;
+BigIntegerBitLen(BigInteger b)
 {
 #ifdef OPENSSL
   return BN_num_bits(b);
@@ -364,8 +352,7 @@
 }
 
 int
-BigIntegerCmp(c1, c2)
-     BigInteger c1, c2;
+BigIntegerCmp(BigInteger c1, BigInteger c2)
 {
 #ifdef OPENSSL
   return BN_cmp(c1, c2);
@@ -383,9 +370,7 @@
 }
 
 int
-BigIntegerCmpInt(c1, c2)
-     BigInteger c1;
-     unsigned int c2;
+BigIntegerCmpInt(BigInteger c1, unsigned int c2)
 {
 #ifdef OPENSSL
   BigInteger bc2 = BigIntegerFromInt(c2);
@@ -414,9 +399,7 @@
 }
 
 BigIntegerResult
-BigIntegerLShift(result, x, bits)
-     BigInteger result, x;
-     unsigned int bits;
+BigIntegerLShift(BigInteger result, BigInteger x, unsigned int bits)
 {
 #ifdef OPENSSL
   BN_lshift(result, x, bits);
@@ -436,8 +419,7 @@
 }
 
 BigIntegerResult
-BigIntegerAdd(result, a1, a2)
-     BigInteger result, a1, a2;
+BigIntegerAdd(BigInteger result, BigInteger a1, BigInteger a2)
 {
 #ifdef OPENSSL
   BN_add(result, a1, a2);
@@ -456,9 +438,7 @@
 }
 
 BigIntegerResult
-BigIntegerAddInt(result, a1, a2)
-     BigInteger result, a1;
-     unsigned int a2;
+BigIntegerAddInt(BigInteger result, BigInteger a1, unsigned int a2)
 {
 #ifdef OPENSSL
   if(result != a1)
@@ -483,8 +463,7 @@
 }
 
 BigIntegerResult
-BigIntegerSub(result, s1, s2)
-     BigInteger result, s1, s2;
+BigIntegerSub(BigInteger result, BigInteger s1, BigInteger s2)
 {
 #ifdef OPENSSL
   BN_sub(result, s1, s2);
@@ -503,9 +482,7 @@
 }
 
 BigIntegerResult
-BigIntegerSubInt(result, s1, s2)
-     BigInteger result, s1;
-     unsigned int s2;
+BigIntegerSubInt(BigInteger result, BigInteger s1, unsigned int s2)
 {
 #ifdef OPENSSL
   if(result != s1)
@@ -530,9 +507,7 @@
 }
 
 BigIntegerResult
-BigIntegerMul(result, m1, m2, c)
-     BigInteger result, m1, m2;
-     BigIntegerCtx c;
+BigIntegerMul(BigInteger result, BigInteger m1, BigInteger m2, BigIntegerCtx c)
 {
 #ifdef OPENSSL
   BN_CTX * ctx = NULL;
@@ -556,10 +531,7 @@
 }
 
 BigIntegerResult
-BigIntegerMulInt(result, m1, m2, c)
-     BigInteger result, m1;
-     unsigned int m2;
-     BigIntegerCtx c;
+BigIntegerMulInt(BigInteger result, BigInteger m1, unsigned int m2, 
BigIntegerCtx c)
 {
 #ifdef OPENSSL
   if(result != m1)
@@ -584,10 +556,7 @@
 }
 
 BigIntegerResult
-BigIntegerDivInt(result, d, m, c)
-     BigInteger result, d;
-     unsigned int m;
-     BigIntegerCtx c;
+BigIntegerDivInt(BigInteger result, BigInteger d, unsigned int m, 
BigIntegerCtx c)
 {
 #ifdef OPENSSL
   if(result != d)
@@ -624,9 +593,7 @@
 }
 
 BigIntegerResult
-BigIntegerMod(result, d, m, c)
-     BigInteger result, d, m;
-     BigIntegerCtx c;
+BigIntegerMod(BigInteger result, BigInteger d, BigInteger m, BigIntegerCtx c)
 {
 #ifdef OPENSSL
   BN_CTX * ctx = NULL;
@@ -650,10 +617,7 @@
 }
 
 unsigned int
-BigIntegerModInt(d, m, c)
-     BigInteger d;
-     unsigned int m;
-     BigIntegerCtx c;
+BigIntegerModInt(BigInteger d, unsigned int m, BigIntegerCtx c)
 {
 #ifdef OPENSSL
   return BN_mod_word(d, m);
@@ -711,9 +675,7 @@
 }
 
 BigIntegerResult
-BigIntegerModMul(r, m1, m2, modulus, c)
-     BigInteger r, m1, m2, modulus;
-     BigIntegerCtx c;
+BigIntegerModMul(BigInteger r, BigInteger m1, BigInteger m2, BigInteger 
modulus, BigIntegerCtx c)
 {
 #ifdef OPENSSL
   BN_CTX * ctx = NULL;
@@ -743,10 +705,7 @@
 }
 
 BigIntegerResult
-BigIntegerModExp(r, b, e, m, c, a)
-     BigInteger r, b, e, m;
-     BigIntegerCtx c;
-     BigIntegerModAccel a;
+BigIntegerModExp(BigInteger r, BigInteger b, BigInteger e, BigInteger m, 
BigIntegerCtx c, BigIntegerModAccel a)
 {
 #ifdef OPENSSL
 #if OPENSSL_VERSION_NUMBER >= 0x00906000
@@ -793,9 +752,7 @@
 #endif
 
 int
-BigIntegerCheckPrime(n, c)
-     BigInteger n;
-     BigIntegerCtx c;
+BigIntegerCheckPrime(BigInteger n, BigIntegerCtx c)
 {
 #ifdef OPENSSL
   int rv;
@@ -803,7 +760,11 @@
   if(c == NULL)
     c = ctx = BN_CTX_new();
 #if OPENSSL_VERSION_NUMBER >= 0x00908000
-  rv = BN_is_prime_ex(n, 25, c, NULL);
+  #if OPENSSL_VERSION_NUMBER >= 0x30000000L
+    rv = BN_check_prime(n, c, NULL);
+  #else
+    rv = BN_is_prime_ex(n, 25, c, NULL);
+  #endif
 #else
   rv = BN_is_prime(n, 25, NULL, c, NULL);
 #endif
@@ -846,8 +807,7 @@
 }
 
 BigIntegerResult
-BigIntegerFree(b)
-     BigInteger b;
+BigIntegerFree(BigInteger b)
 {
 #ifdef OPENSSL
   BN_free(b);
@@ -869,8 +829,7 @@
 }
 
 BigIntegerResult
-BigIntegerClearFree(b)
-     BigInteger b;
+BigIntegerClearFree(BigInteger b)
 {
 #ifdef OPENSSL
   BN_clear_free(b);
@@ -906,8 +865,7 @@
 }
 
 BigIntegerResult
-BigIntegerCtxFree(ctx)
-     BigIntegerCtx ctx;
+BigIntegerCtxFree(BigIntegerCtx ctx)
 {
 #ifdef OPENSSL
   if(ctx)
@@ -917,9 +875,7 @@
 }
 
 BigIntegerModAccel
-BigIntegerModAccelNew(m, c)
-     BigInteger m;
-     BigIntegerCtx c;
+BigIntegerModAccelNew(BigInteger m, BigIntegerCtx c)
 {
 #ifdef OPENSSL
   BN_CTX * ctx = NULL;
@@ -939,8 +895,7 @@
 }
 
 BigIntegerResult
-BigIntegerModAccelFree(accel)
-     BigIntegerModAccel accel;
+BigIntegerModAccelFree(BigIntegerModAccel accel)
 {
 #ifdef OPENSSL
   if(accel)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libimobiledevice-1.3.0+179git.20230430/3rd_party/libsrp6a-sha512/t_misc.c 
new/libimobiledevice-1.3.0+190git.20230705/3rd_party/libsrp6a-sha512/t_misc.c
--- 
old/libimobiledevice-1.3.0+179git.20230430/3rd_party/libsrp6a-sha512/t_misc.c   
    2023-04-30 14:09:19.000000000 +0200
+++ 
new/libimobiledevice-1.3.0+190git.20230705/3rd_party/libsrp6a-sha512/t_misc.c   
    2023-07-05 13:18:22.000000000 +0200
@@ -80,8 +80,7 @@
 extern char ** environ;
 
 static void
-t_envhash(out)
-     unsigned char * out;
+t_envhash(unsigned char * out)
 {
   char ** ptr;
   char ebuf[256];
@@ -115,8 +114,7 @@
  * The entire buffer is run once through SHA to obtain the final result.
  */
 static void
-t_fshash(out)
-     unsigned char * out;
+t_fshash(unsigned char * out)
 {
   char dotpath[128];
   struct stat st;
@@ -317,9 +315,7 @@
  * Each cycle generates 20 bytes of new output.
  */
 _TYPE( void )
-t_random(data, size)
-     unsigned char * data;
-     unsigned size;
+t_random(unsigned char * data, unsigned size)
 {
   if(!initialized)
     t_initrand();
@@ -369,10 +365,7 @@
  * single 320-bit value.
  */
 _TYPE( unsigned char * )
-t_sessionkey(key, sk, sklen)
-     unsigned char * key;
-     unsigned char * sk;
-     unsigned sklen;
+t_sessionkey(unsigned char * key, unsigned char * sk, unsigned sklen)
 {
   unsigned i, klen;
   unsigned char * hbuf;
@@ -411,11 +404,7 @@
 }
 
 _TYPE( void )
-t_mgf1(mask, masklen, seed, seedlen)
-     unsigned char * mask;
-     unsigned masklen;
-     const unsigned char * seed;
-     unsigned seedlen;
+t_mgf1(unsigned char * mask, unsigned masklen, const unsigned char * seed, 
unsigned seedlen)
 {
   SHA1_CTX ctxt;
   unsigned i = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libimobiledevice-1.3.0+179git.20230430/3rd_party/libsrp6a-sha512/t_sha.c 
new/libimobiledevice-1.3.0+190git.20230705/3rd_party/libsrp6a-sha512/t_sha.c
--- 
old/libimobiledevice-1.3.0+179git.20230430/3rd_party/libsrp6a-sha512/t_sha.c    
    2023-04-30 14:09:19.000000000 +0200
+++ 
new/libimobiledevice-1.3.0+190git.20230705/3rd_party/libsrp6a-sha512/t_sha.c    
    2023-07-05 13:18:22.000000000 +0200
@@ -107,6 +107,44 @@
   mbedtls_md_free(ctx);
 }
 
+#elif defined(OPENSSL_SHA)
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+void
+SHA1Init_openssl(SHA1_CTX *ctx)
+{
+  *ctx = EVP_MD_CTX_new();
+  EVP_DigestInit(*ctx, EVP_sha1());
+}
+
+void SHA1Update_openssl(SHA1_CTX *ctx, const void *data, unsigned int len)
+{
+  EVP_DigestUpdate(*ctx, data, (size_t)len);
+}
+
+void SHA1Final_openssl(unsigned char digest[20], SHA1_CTX *ctx)
+{
+  EVP_DigestFinal(*ctx, digest, NULL);
+  EVP_MD_CTX_destroy(*ctx);
+}
+
+void
+SHA512Init_openssl(SHA512_CTX *ctx)
+{
+  *ctx = EVP_MD_CTX_new();
+  EVP_DigestInit(*ctx, EVP_sha512());
+}
+
+void SHA512Update_openssl(SHA512_CTX *ctx, const void *data, unsigned int len)
+{
+  EVP_DigestUpdate(*ctx, data, (size_t)len);
+}
+
+void SHA512Final_openssl(unsigned char digest[64], SHA512_CTX *ctx)
+{
+  EVP_DigestFinal(*ctx, digest, NULL);
+  EVP_MD_CTX_destroy(*ctx);
+}
+#endif
 #elif !defined(OPENSSL_SHA) && !defined(TOMCRYPT_SHA)
 /* Use the free SHA1 if the library doesn't have it */
 
@@ -273,4 +311,4 @@
     SHA1Transform(context->state, context->buffer);
 #endif
 }
-#endif /* OPENSSL */
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libimobiledevice-1.3.0+179git.20230430/3rd_party/libsrp6a-sha512/t_sha.h 
new/libimobiledevice-1.3.0+190git.20230705/3rd_party/libsrp6a-sha512/t_sha.h
--- 
old/libimobiledevice-1.3.0+179git.20230430/3rd_party/libsrp6a-sha512/t_sha.h    
    2023-04-30 14:09:19.000000000 +0200
+++ 
new/libimobiledevice-1.3.0+190git.20230705/3rd_party/libsrp6a-sha512/t_sha.h    
    2023-07-05 13:18:22.000000000 +0200
@@ -38,6 +38,28 @@
 #endif
 
 #ifdef OPENSSL_SHA
+#include <openssl/err.h>
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+#include <openssl/evp.h>
+
+typedef EVP_MD_CTX* SHA1_CTX;
+#define SHA1Init SHA1Init_openssl
+#define SHA1Update SHA1Update_openssl
+#define SHA1Final SHA1Final_openssl
+
+typedef EVP_MD_CTX* SHA512_CTX;
+#define SHA512Init SHA512Init_openssl
+#define SHA512Update SHA512Update_openssl
+#define SHA512Final SHA512Final_openssl
+
+void SHA1Init_openssl(SHA1_CTX *ctx);
+void SHA1Update_openssl(SHA1_CTX *ctx, const void *data, unsigned int len);
+void SHA1Final_openssl(unsigned char digest[20], SHA1_CTX *ctx);
+
+void SHA512Init_openssl(SHA512_CTX *ctx);
+void SHA512Update_openssl(SHA512_CTX *ctx, const void *data, unsigned int len);
+void SHA512Final_openssl(unsigned char digest[64], SHA1_CTX *ctx);
+#else /* for OpenSSL < 3.0 */
 #include <openssl/sha.h>
 
 typedef SHA_CTX SHA1_CTX;
@@ -48,7 +70,7 @@
 #define SHA512Init SHA512_Init
 #define SHA512Update SHA512_Update
 #define SHA512Final SHA512_Final
-
+#endif /* for OpenSSL < 3.0 */
 #elif defined(TOMCRYPT_SHA)
 /* mycrypt.h already included above */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libimobiledevice-1.3.0+179git.20230430/3rd_party/libsrp6a-sha512/t_truerand.c
 
new/libimobiledevice-1.3.0+190git.20230705/3rd_party/libsrp6a-sha512/t_truerand.c
--- 
old/libimobiledevice-1.3.0+179git.20230430/3rd_party/libsrp6a-sha512/t_truerand.c
   2023-04-30 14:09:19.000000000 +0200
+++ 
new/libimobiledevice-1.3.0+190git.20230705/3rd_party/libsrp6a-sha512/t_truerand.c
   2023-07-05 13:18:22.000000000 +0200
@@ -227,8 +227,7 @@
 }
 
 int
-raw_n_truerand(n)
-int n;
+raw_n_truerand(int n)
 {
        int slop, v;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libimobiledevice-1.3.0+179git.20230430/common/debug.c 
new/libimobiledevice-1.3.0+190git.20230705/common/debug.c
--- old/libimobiledevice-1.3.0+179git.20230430/common/debug.c   2023-04-30 
14:09:19.000000000 +0200
+++ new/libimobiledevice-1.3.0+190git.20230705/common/debug.c   2023-07-05 
13:18:22.000000000 +0200
@@ -60,7 +60,7 @@
        strftime(str_time, 254, "%H:%M:%S", localtime (&the_time));
 
        /* generate header text */
-       (void)asprintf(&header, "%s %s:%d %s()", str_time, file, line, func);
+       if(asprintf(&header, "%s %s:%d %s()", str_time, file, line, func)<0){}
        free (str_time);
 
        /* trim ending newlines */
@@ -86,7 +86,7 @@
 
        /* run the real fprintf */
        va_start(args, format);
-       (void)vasprintf(&buffer, format, args);
+       if(vasprintf(&buffer, format, args)<0){}
        va_end(args);
 
        debug_print_line(func, file, line, buffer);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libimobiledevice-1.3.0+179git.20230430/common/userpref.c 
new/libimobiledevice-1.3.0+190git.20230705/common/userpref.c
--- old/libimobiledevice-1.3.0+179git.20230430/common/userpref.c        
2023-04-30 14:09:19.000000000 +0200
+++ new/libimobiledevice-1.3.0+190git.20230705/common/userpref.c        
2023-07-05 13:18:22.000000000 +0200
@@ -435,6 +435,10 @@
        debug_info("Generating keys and certificates...");
 
 #if defined(HAVE_OPENSSL)
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+       EVP_PKEY* root_pkey = EVP_RSA_gen(2048);
+       EVP_PKEY* host_pkey = EVP_RSA_gen(2048);
+#else
        BIGNUM *e = BN_new();
        RSA* root_keypair = RSA_new();
        RSA* host_keypair = RSA_new();
@@ -451,6 +455,7 @@
 
        EVP_PKEY* host_pkey = EVP_PKEY_new();
        EVP_PKEY_assign_RSA(host_pkey, host_keypair);
+#endif
 
        /* generate root certificate */
        X509* root_cert = X509_new();
@@ -561,12 +566,22 @@
                }
        }
 
-       RSA *pubkey = NULL;
+       EVP_PKEY *pubkey = NULL;
        {
                BIO *membp = BIO_new_mem_buf(public_key.data, public_key.size);
-               if (!PEM_read_bio_RSAPublicKey(membp, &pubkey, NULL, NULL)) {
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+               if (!PEM_read_bio_PUBKEY(membp, &pubkey, NULL, NULL)) {
                        debug_info("WARNING: Could not read public key");
                }
+#else
+               RSA *rsa_pubkey = NULL;
+               if (!PEM_read_bio_RSAPublicKey(membp, &rsa_pubkey, NULL, NULL)) 
{
+                       debug_info("WARNING: Could not read public key");
+               } else {
+                       pubkey = EVP_PKEY_new();
+                       EVP_PKEY_assign_RSA(pubkey, rsa_pubkey);
+               }
+#endif
                BIO_free(membp);
        }
 
@@ -588,10 +603,7 @@
                X509_set1_notAfter(dev_cert, asn1time);
                ASN1_TIME_free(asn1time);
 
-               EVP_PKEY* pkey = EVP_PKEY_new();
-               EVP_PKEY_assign_RSA(pkey, pubkey);
-               X509_set_pubkey(dev_cert, pkey);
-               EVP_PKEY_free(pkey);
+               X509_set_pubkey(dev_cert, pubkey);
 
                X509_add_ext_helper(dev_cert, NID_subject_key_identifier, 
(char*)"hash");
                X509_add_ext_helper(dev_cert, NID_key_usage, 
(char*)"critical,digitalSignature,keyEncipherment");
@@ -618,6 +630,7 @@
        X509V3_EXT_cleanup();
        X509_free(dev_cert);
 
+       EVP_PKEY_free(pubkey);
        EVP_PKEY_free(root_pkey);
        EVP_PKEY_free(host_pkey);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libimobiledevice-1.3.0+179git.20230430/src/idevice.c 
new/libimobiledevice-1.3.0+190git.20230705/src/idevice.c
--- old/libimobiledevice-1.3.0+179git.20230430/src/idevice.c    2023-04-30 
14:09:19.000000000 +0200
+++ new/libimobiledevice-1.3.0+190git.20230705/src/idevice.c    2023-07-05 
13:18:22.000000000 +0200
@@ -32,7 +32,11 @@
 
 #ifdef WIN32
 #include <winsock2.h>
+#include <ws2tcpip.h>
 #include <windows.h>
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
 #endif
 
 #include <usbmuxd.h>
@@ -324,7 +328,21 @@
                        newlist[newcount]->conn_data = NULL;
                } else if (dev_list[i].conn_type == CONNECTION_TYPE_NETWORK) {
                        newlist[newcount]->conn_type = CONNECTION_NETWORK;
-                       size_t addrlen = ((uint8_t*)dev_list[i].conn_data)[0];
+                       struct sockaddr* saddr = (struct 
sockaddr*)(dev_list[i].conn_data);
+                       size_t addrlen = 0;
+                       switch (saddr->sa_family) {
+                               case AF_INET:
+                                       addrlen = sizeof(struct sockaddr_in);
+                                       break;
+#ifdef AF_INET6
+                               case AF_INET6:
+                                       addrlen = sizeof(struct sockaddr_in6);
+                                       break;
+#endif
+                               default:
+                                       debug_info("Unsupported address family 
0x%02x\n", saddr->sa_family);
+                                       continue;
+                       }
                        newlist[newcount]->conn_data = malloc(addrlen);
                        memcpy(newlist[newcount]->conn_data, 
dev_list[i].conn_data, addrlen);
                }
@@ -426,9 +444,25 @@
                break;
        case CONNECTION_TYPE_NETWORK:
                device->conn_type = CONNECTION_NETWORK;
-               size_t len = ((uint8_t*)muxdev->conn_data)[0];
-               device->conn_data = malloc(len);
-               memcpy(device->conn_data, muxdev->conn_data, len);
+               struct sockaddr* saddr = (struct sockaddr*)(muxdev->conn_data);
+               size_t addrlen = 0;
+               switch (saddr->sa_family) {
+                       case AF_INET:
+                               addrlen = sizeof(struct sockaddr_in);
+                               break;
+#ifdef AF_INET6
+                       case AF_INET6:
+                               addrlen = sizeof(struct sockaddr_in6);
+                               break;
+#endif
+                       default:
+                               debug_info("Unsupported address family 
0x%02x\n", saddr->sa_family);
+                               free(device->udid);
+                               free(device);
+                               return NULL;
+               }
+               device->conn_data = malloc(addrlen);
+               memcpy(device->conn_data, muxdev->conn_data, addrlen);
                break;
        default:
                device->conn_type = 0;
@@ -515,27 +549,16 @@
                return IDEVICE_E_SUCCESS;
        }
        if (device->conn_type == CONNECTION_NETWORK) {
-               struct sockaddr_storage saddr_storage;
-               struct sockaddr* saddr = (struct sockaddr*)&saddr_storage;
-
-               /* FIXME: Improve handling of this platform/host dependent 
connection data */
-               if (((char*)device->conn_data)[1] == 0x02) { // AF_INET
-                       saddr->sa_family = AF_INET;
-                       memcpy(&saddr->sa_data[0], (char*)device->conn_data + 
2, 14);
-               }
-               else if (((char*)device->conn_data)[1] == 0x1E) { // AF_INET6 
(bsd)
+               struct sockaddr* saddr = (struct sockaddr*)(device->conn_data);
+               switch (saddr->sa_family) {
+                       case AF_INET:
 #ifdef AF_INET6
-                       saddr->sa_family = AF_INET6;
-                       /* copy the address and the host dependent scope id */
-                       memcpy(&saddr->sa_data[0], (char*)device->conn_data + 
2, 26);
-#else
-                       debug_info("ERROR: Got an IPv6 address but this system 
doesn't support IPv6");
-                       return IDEVICE_E_UNKNOWN_ERROR;
+                       case AF_INET6:
 #endif
-               }
-               else {
-                       debug_info("Unsupported address family 0x%02x", 
((char*)device->conn_data)[1]);
-                       return IDEVICE_E_UNKNOWN_ERROR;
+                               break;
+                       default:
+                               debug_info("Unsupported address family 0x%02x", 
saddr->sa_family);
+                               return IDEVICE_E_UNKNOWN_ERROR;
                }
 
                char addrtxt[48];
@@ -1034,18 +1057,33 @@
 }
 
 #ifdef HAVE_OPENSSL
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+static long ssl_idevice_bio_callback(BIO *b, int oper, const char *argp, 
size_t len, int argi, long argl, int retvalue, size_t *processed)
+#else
 static long ssl_idevice_bio_callback(BIO *b, int oper, const char *argp, int 
argi, long argl, long retvalue)
+#endif
 {
+       ssize_t bytes = 0;
        idevice_connection_t conn = 
(idevice_connection_t)BIO_get_callback_arg(b);
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
        size_t len = (size_t)argi;
+       size_t *processed = (size_t*)&bytes;
+#endif
        switch (oper) {
        case (BIO_CB_READ|BIO_CB_RETURN):
-               return argp ? (long)internal_ssl_read(conn, (char *)argp, len) 
: 0;
+               if (argp) {
+                       bytes = internal_ssl_read(conn, (char *)argp, len);
+                       *processed = bytes;
+                       return (long)bytes;
+               }
+               return 0;
        case (BIO_CB_PUTS|BIO_CB_RETURN):
                len = strlen(argp);
                // fallthrough
        case (BIO_CB_WRITE|BIO_CB_RETURN):
-               return (long)internal_ssl_write(conn, argp, len);
+               bytes = internal_ssl_write(conn, argp, len);
+               *processed = bytes;
+               return (long)bytes;
        default:
                return retvalue;
        }
@@ -1056,7 +1094,11 @@
        BIO *b = BIO_new(BIO_s_null());
        if (!b) return NULL;
        BIO_set_callback_arg(b, (char *)conn);
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+       BIO_set_callback_ex(b, ssl_idevice_bio_callback);
+#else
        BIO_set_callback(b, ssl_idevice_bio_callback);
+#endif
        return b;
 }
 
@@ -1234,6 +1276,16 @@
        X509_free(rootCert);
        free(root_cert.data);
 
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+       EVP_PKEY* rootPrivKey = NULL;
+       membp = BIO_new_mem_buf(root_privkey.data, root_privkey.size);
+       PEM_read_bio_PrivateKey(membp, &rootPrivKey, NULL, NULL);
+       BIO_free(membp);
+       if (SSL_CTX_use_PrivateKey(ssl_ctx, rootPrivKey) != 1) {
+               debug_info("WARNING: Could not load RootPrivateKey");
+       }
+       EVP_PKEY_free(rootPrivKey);
+#else
        RSA* rootPrivKey = NULL;
        membp = BIO_new_mem_buf(root_privkey.data, root_privkey.size);
        PEM_read_bio_RSAPrivateKey(membp, &rootPrivKey, NULL, NULL);
@@ -1242,6 +1294,7 @@
                debug_info("WARNING: Could not load RootPrivateKey");
        }
        RSA_free(rootPrivKey);
+#endif
        free(root_privkey.data);
 
        SSL *ssl = SSL_new(ssl_ctx);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libimobiledevice-1.3.0+179git.20230430/src/reverse_proxy.c 
new/libimobiledevice-1.3.0+190git.20230705/src/reverse_proxy.c
--- old/libimobiledevice-1.3.0+179git.20230430/src/reverse_proxy.c      
2023-04-30 14:09:19.000000000 +0200
+++ new/libimobiledevice-1.3.0+190git.20230705/src/reverse_proxy.c      
2023-07-05 13:18:22.000000000 +0200
@@ -25,6 +25,9 @@
 #endif
 #include <string.h>
 #include <stdlib.h>
+#define _GNU_SOURCE 1
+#define __USE_GNU 1
+#include <stdio.h>
 #include <errno.h>
 
 #include <plist/plist.h>
@@ -91,7 +94,7 @@
        va_list args;
        va_start(args, format);
        char* buffer = NULL;
-       (void)vasprintf(&buffer, format, args);
+       if(vasprintf(&buffer, format, args)<0){}
        va_end(args);
        client->log_cb(client, buffer, client->log_cb_user_data);
        free(buffer);
@@ -113,7 +116,7 @@
        va_list args;
        va_start(args, format);
        char* buffer = NULL;
-       (void)vasprintf(&buffer, format, args);
+       if(vasprintf(&buffer, format, args)<0){}
        va_end(args);
        client->status_cb(client, status, buffer, client->status_cb_user_data);
        free(buffer);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libimobiledevice-1.3.0+179git.20230430/tools/idevicebackup.c 
new/libimobiledevice-1.3.0+190git.20230705/tools/idevicebackup.c
--- old/libimobiledevice-1.3.0+179git.20230430/tools/idevicebackup.c    
2023-04-30 14:09:19.000000000 +0200
+++ new/libimobiledevice-1.3.0+190git.20230705/tools/idevicebackup.c    
2023-07-05 13:18:22.000000000 +0200
@@ -34,6 +34,9 @@
 #include <getopt.h>
 #if defined(HAVE_OPENSSL)
 #include <openssl/sha.h>
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+#include <openssl/evp.h>
+#endif
 #elif defined(HAVE_GNUTLS)
 #include <gcrypt.h>
 #elif defined(HAVE_MBEDTLS)
@@ -113,7 +116,11 @@
 static void _sha1_update(void* context, const char* data, size_t len)
 {
 #if defined(HAVE_OPENSSL)
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+       EVP_DigestUpdate(context, data, len);
+#else
        SHA1_Update(context, data, len);
+#endif
 #elif defined(HAVE_GNUTLS)
        gcry_md_write(context, data, len);
 #elif defined(HAVE_MBEDTLS)
@@ -124,9 +131,15 @@
 static void compute_datahash(const char *path, const char *destpath, uint8_t 
greylist, const char *domain, const char *appid, const char *version, unsigned 
char *hash_out)
 {
 #if defined(HAVE_OPENSSL)
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+       EVP_MD_CTX* sha1 = EVP_MD_CTX_new();
+       EVP_DigestInit(sha1, EVP_sha1());
+       void* psha1 = sha1;
+#else
        SHA_CTX sha1;
        SHA1_Init(&sha1);
        void* psha1 = &sha1;
+#endif
 #elif defined(HAVE_GNUTLS)
        gcry_md_hd_t hd = NULL;
        gcry_md_open(&hd, GCRY_MD_SHA1, 0);
@@ -180,7 +193,12 @@
                        _sha1_update(psha1, "(null)", 6);
                }
 #if defined(HAVE_OPENSSL)
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+               EVP_DigestFinal(sha1, hash_out, NULL);
+               EVP_MD_CTX_destroy(sha1);
+#else
                SHA1_Final(hash_out, &sha1);
+#endif
 #elif defined(HAVE_GNUTLS)
                unsigned char *newhash = gcry_md_read(hd, GCRY_MD_SHA1);
                memcpy(hash_out, newhash, 20);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libimobiledevice-1.3.0+179git.20230430/tools/idevicecrashreport.c 
new/libimobiledevice-1.3.0+190git.20230705/tools/idevicecrashreport.c
--- old/libimobiledevice-1.3.0+179git.20230430/tools/idevicecrashreport.c       
2023-04-30 14:09:19.000000000 +0200
+++ new/libimobiledevice-1.3.0+190git.20230705/tools/idevicecrashreport.c       
2023-07-05 13:18:22.000000000 +0200
@@ -163,7 +163,7 @@
                char* p = strrchr(list[k], '.');
                if (p != NULL && !strncmp(p, ".synced", 7)) {
                        /* make sure to strip ".synced" extension as seen on 
iOS 5 */
-                       int newlen = strlen(list[k]) - 7;
+                       size_t newlen = p - list[k];
                        strncpy(((char*)target_filename) + 
host_directory_length, list[k], newlen);
                        target_filename[host_directory_length + newlen] = '\0';
                } else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libimobiledevice-1.3.0+179git.20230430/tools/idevicedebug.c 
new/libimobiledevice-1.3.0+190git.20230705/tools/idevicedebug.c
--- old/libimobiledevice-1.3.0+179git.20230430/tools/idevicedebug.c     
2023-04-30 14:09:19.000000000 +0200
+++ new/libimobiledevice-1.3.0+190git.20230705/tools/idevicedebug.c     
2023-07-05 13:18:22.000000000 +0200
@@ -291,6 +291,11 @@
                        res = 0;
                        goto cleanup;
                        break;
+               default:
+                       print_usage(argc, argv, 1);
+                       res = 2;
+                       goto cleanup;
+                       break;
                }
        }
        argc -= optind;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libimobiledevice-1.3.0+179git.20230430/tools/idevicedevmodectl.c 
new/libimobiledevice-1.3.0+190git.20230705/tools/idevicedevmodectl.c
--- old/libimobiledevice-1.3.0+179git.20230430/tools/idevicedevmodectl.c        
2023-04-30 14:09:19.000000000 +0200
+++ new/libimobiledevice-1.3.0+190git.20230705/tools/idevicedevmodectl.c        
2023-07-05 13:18:22.000000000 +0200
@@ -30,6 +30,7 @@
 #include <string.h>
 #include <getopt.h>
 #include <sys/stat.h>
+#include <unistd.h>
 #include <errno.h>
 #ifndef WIN32
 #include <signal.h>

++++++ libimobiledevice.obsinfo ++++++
--- /var/tmp/diff_new_pack.J2LxUo/_old  2023-08-18 19:27:44.715249847 +0200
+++ /var/tmp/diff_new_pack.J2LxUo/_new  2023-08-18 19:27:44.719249854 +0200
@@ -1,5 +1,5 @@
 name: libimobiledevice
-version: 1.3.0+179git.20230430
-mtime: 1682856559
-commit: 860ffb707af3af94467d2ece4ad258dda957c6cd
+version: 1.3.0+190git.20230705
+mtime: 1688555902
+commit: 6fc41f57fc607df9b07446ca45bdf754225c9bd9
 

Reply via email to