summaryrefslogtreecommitdiffstats
path: root/common
AgeCommit message (Collapse)AuthorFilesLines
2023-10-07automake: Reorder CFLAGS to fix build issues and use correct SSL library ↵Gravatar Nikias Bassen1-12/+6
flags across Makefiles
2023-07-05Silence (v)asprintf related compiler warningsGravatar Nikias Bassen1-2/+2
2023-07-05Updated OpenSSL-specific code to use OpenSSL 3.0+ APIGravatar Nikias Bassen1-6/+19
2023-04-21Updated to use latest libplist API changesGravatar Nikias Bassen1-1/+1
2022-04-22[clang-tidy] add parentheses to macrosGravatar Rosen Penev1-1/+1
Found with bugprone-macro-parentheses Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-29common: Make sure ETIMEDOUT is definedGravatar Nikias Bassen1-0/+4
2021-09-01Remove common code in favor of new libimobiledevice-glueGravatar Nikias Bassen8-2052/+3
2021-07-29common: Return proper error codes from userpref_read_pair_recordGravatar Nikias Bassen2-18/+24
2021-07-27Add support for MbedTLSGravatar Nikias Bassen2-41/+279
2021-04-13common: Add missing *_LIBS and *_CFLAGS to fix buildGravatar Nikias Bassen1-0/+5
2021-02-17Remove redundent `select` call from idevicedebugserverproxy.cGravatar Nisarg Jhaveri1-2/+0
- Turns out `socket_receive` anyway internally calls `select` again. Use `socket_receive_timeout` instead. - Remove logging for timeout in socket.c as well, it is not really an error condition
2020-12-30common: Merge socket changes from libusbmuxdGravatar Nikias Bassen2-47/+386
2020-12-10ideviceprovision: Fix date output by adding MAC_EPOCHGravatar Nikias Bassen1-1/+1
2020-06-08Unfold automake variables into multiple lines for maintainabilityGravatar Martin Szulecki1-8/+21
2020-06-08socket: Fix IPv6 scope id lookup logic to handle another network device problemGravatar Martin Szulecki1-2/+12
The lookup logic preferred to return the last suitable scope id match. This became a problem if there was already a suitable scope id match before that was higher in the interface list. This now chooses the higher last scope id interface match and thus probably in the routing preference.
2020-06-06socket: Improve IPv6 scope id detection to fix network devices on OSXGravatar Martin Szulecki1-6/+24
The helper should now also work for loopback addresses and prefer any initially supplied scope id to maintain routing information if possible. Otherwise it just picks the best suitable route. Let us see if this is stable enough to prevent us from adding routing table parsing cruft and other logic...
2020-06-06socket: Use common IPv6 scope values and correct loopback scope to link-localGravatar Martin Szulecki1-4/+4
2020-06-06common: Fix socket_connect_addr() not connecting using IPv6 in some casesGravatar Martin Szulecki1-0/+107
This extends the socket helper with functions to determine the "scope" and a suitable "scope id" of an IPv6 address. Now socket_connect_addr() does not trust the provided IPv6 "scope id" and always attempts to determine it using the new helpers. This became a requirement during testing with remote usbmux connections that provide a different "scope id" and thus might cause IPv6 routing to not work at all. Thus the "scope id" is only valid per host.
2020-05-18common: Update socket.c/.h from libusbmuxdGravatar Nikias Bassen2-22/+218
2020-02-20Update debug.c to consistently output to stderrGravatar Greg Dennis1-5/+2
This makes debug_print_line consistent with debug_buffer and among other things, ensures output from `idevicedebug run` can be easily divided into output from the app itself (stdout) from debug output from libimobiledevice (stderr).
2020-01-05Define ETIMEDOUT if requiredGravatar Nikias Bassen1-0/+3
2019-11-13debugserver: Improved memory handling in debugserver_client_send_command() ↵Gravatar Nikias Bassen2-2/+53
and debugserver_client_receive_response()
2019-06-22Make sure to not use deprecated API when compiling with OpenSSL >= 1.1Gravatar Rosen Penev1-6/+12
There are several missing headers as well as deprecated functions for which compatibility was added as needed.
2019-06-13socket: Return -ETIMEDOUT when select() in socket_read_fd() reached the timeoutGravatar Nikias Bassen1-0/+4
2019-06-11common: Update thread.c/.h to match the one from libusbmuxdGravatar Nikias Bassen2-14/+67
2019-05-21common: Update socket.c to match the one from libusbmuxdGravatar Nikias Bassen2-60/+165
2018-10-01tools: Remove length check on device UDID arguments to support newer devicesGravatar Nikias Bassen1-29/+24
The 40 characters length check on the device UDID made newer devices unusable with the libimobiledevice tools and was actually redundant since an invalid UDID will always fail to resolve. This commit removes the length check alltogether (but makes sure it is not an empty string "").
2018-09-29lockdown: Pass along usbmux device id when saving pair recordsGravatar Nikias Bassen2-3/+4
2018-04-27userpref: [GnuTLS] Use valid serial for >= 3.6.0Gravatar Bastien Nocera1-3/+3
Another change in 3.6.0 is that a serial of '\0' is not valid anymore. Bump it to one.
2018-04-27userpref: [GnuTLS] Fix 3.6.0 SHA1 compatibilityGravatar Bastien Nocera1-3/+3
Verification will fail if a special flag is not passed. Use gnutls_x509_crt_sign2() instead of gnutls_x509_crt_sign() to make sure that passing this flag works in 3.6.0 and stays working with 3.6.1.
2016-11-04userpref: [GnuTLS] Fix pairing record generation and improve error handlingGravatar Nikias Bassen1-40/+45
In newer GnuTLS versions the parameters supplied to gnutls_x509_privkey_import_rsa_raw() are actually checked for somewhat sane values. Since we were passing the same values for all parameters, this check fails and the device certificate is never generated. However due to missing checks the pairing record was saved anyway, with an empty device certificate. This led to TLS errors during communication, leading to the "GnuTLS: Error in pull function" error message appearing and the communication to fail. This commit fixes the issue by passing some sane values, and also improves the overall error handling during generation of the paring record.
2016-07-27userpref: Remove obsoleted function userpref_has_pair_record()Gravatar Jay Freeman (saurik)1-29/+0
Since pair records are meanwhile handled by usbmuxd there is no need to check for the existence of a pair record on disk. Asking usbmuxd for a pair record of a given UDID is sufficient to know if it exists or not.
2016-04-01idevicebackup: fix some timestamps that are relative to the Mac epoch ↵Gravatar BALATON Zoltan1-0/+2
instead of Unix one
2015-12-29common: [security fix] Make sure sockets only listen locallyGravatar Joshua Hill1-2/+2
2015-10-09common: Add missing gnutls/openssl CFLAGS to Makefile.amGravatar Nikias Bassen1-1/+1
2015-01-28Remove trailing whitespace errors from all filesGravatar Martin Szulecki7-21/+21
2015-01-13thread: Introduce thread_new and thread_free to cover handle leaks on WIN32Gravatar Martin Szulecki2-5/+13
2015-01-12common: Convert int16_t macro error types of userpref module into enumGravatar Martin Szulecki1-10/+10
2014-12-08Replace () with (void) in libinternalcommon and tools for consistencyGravatar Martin Szulecki2-2/+2
2014-10-27debug: Fix linking failure on OS X by keeping debug level symbol internalGravatar Martin Szulecki2-3/+12
This change keeps the debug level symbol within the internal convenience library and makes it accessible using an internal helper. This fixes linking, prevents new exported symbols and finally allows proper control of enabling debug messages.
2014-10-26debug: Fix symbol locality for linker so debug messages are printed againGravatar Martin Szulecki1-16/+3
2014-10-26common: Remove obsolete symbol hiding macros from userpref moduleGravatar Martin Szulecki1-14/+6
2014-10-26Supress printing very long plists in debug outputGravatar BALATON Zoltan1-1/+7
2014-10-22common: Move size format helper to utils and use it in idevicebackup toolsGravatar Martin Szulecki2-0/+23
2014-10-22common: Move string_toupper() helper to utils and use it in idevicebackup toolsGravatar Martin Szulecki2-0/+11
2014-10-22common: Share idevicebackup helper string_build_path() from utilsGravatar Martin Szulecki2-0/+30
2014-10-22common: Change stpcpy() signature code style slightlyGravatar Martin Szulecki2-2/+2
2014-10-03common: Fix distcheck targetGravatar Martin Szulecki2-2/+2
2014-10-03Avoid exporting non-public symbolsGravatar Martin Szulecki3-14/+7
2014-09-13common: Fix Win32 linking by adding ws2_32 to librariesGravatar Nikias Bassen1-1/+1