Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Since LibreSSL 3.6.0 SSL_CTX_set_security_level() has been available.
|
|
Detect if we're talking to iOS 1 `if (connection->device->version == 0)`
and set `SSL_CTX_set_min_proto_version(ssl_ctx, 0);` to support SSL3.
iOS 1 doesn't understand TLS1_VERSION, it can only speak SSL3_VERSION.
However, modern OpenSSL is usually compiled without SSLv3 support.
So if we set min_proto_version to SSL3_VERSION on an OpenSSL instance which doesn't support it,
it will just ignore min_proto_version altogether and fall back to an even higher version.
To avoid accidentally breaking iOS 2.0+, we set min version to 0 instead.
|
|
|
|
|
|
|
|
|
|
OpenSSL versions pre 3.0 do not define OPENSSL_VERSION_MAJOR etc.
|
|
Thanks @tihmstar for pointing this out.
|
|
Turns out that SSL_CTX_set_options does *not* clear options that
have been set before.
|
|
|
|
Due to an implementation detail from the past, a call to idevice_event_unsubscribe
would not cause the callback function to be called with IDEVICE_DEVICE_REMOVE
events, even though originally it was planned to be that way.
Due to the internal changes for the newer idevice_events_subscribe/unsubscribe
API, that behavior changed and it would call the callback.
Now to not break current software implementations depending on the original
behavior we modify the old API to behave the same as before the change.
|
|
The older API idevice_event_subscribe/unsubscribe can only be used
by a single instance. With the addition of a context, is is now possible
to register multiple callback functions in different threads.
For backwards compatibility the old API will still be available for a while
before being removed in a future release.
|
|
In sync with idevice_from_mux_device, line 384.
Without this fix, data size 128 (the common value) is treated as -128, resulting in incorrect allocation.
Related to #1248 but doesn't fully fix it.
|
|
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
Currently if 0 byte gets sent, it is treated as not-enough-data.
This is wrong, because with TCP, 0-byte-sent usually means the
receiver end is closed. We must set a new case for this and must
not normalize the sent-bytes to 0 in general.
|
|
|
|
|
|
|
|
|
|
meaningful error codes
This allows clients to properly detect that a connection to the requested
port failed because it is not open on the device, instead of just returning
an "unknown error"
|
|
of DllMain
|
|
|
|
fix wrong variable in debug message
|
|
correctly
The code in lockdownd_client_new_with_handshake would call the function
lockdownd_validate_pair based on the OS version being less than 7.0 without
taking into account that Watch OS has a different versioning scheme compared
to the other device classes. For this and any future version/device specific
checks, the code now queries the DeviceClass and stores it in the
idevice_private struct.
|
|
|
|
|
|
|
|
Let's not allow OpenSSL to directly access our file descriptors
|
|
|
|
handle timeouts more adequate
idevice_connection_receive_timeout(), when in SSL mode, was assuming it should
always try to read the exact amount of data specified in `len` parameter.
While this works with most protocols that have length fields or fixed sized
headers/packets, some others (e.g. debugserver) break because it will request
a read but doesn't know the size that is expected to be returned beforehand.
This commit will handle timeouts better and return the number of bytes that
were read in such cases (instead of returning 0 bytes read + error).
Note that in the event of a timeout, IDEVICE_E_TIMEOUT will be returned even
though actual data might have been read. The number of bytes read will be
returned in recv_bytes.
|
|
|
|
|
|
|
|
|
|
|
|
This should still catch the more common case when using usbmuxd on the same
host. Not copying the scope id in that case actually removes vital routing
information.
|
|
This change removes copying the scope id for IPv6 connections which caused
problems if the usbmux connection data is used on different hosts or context.
|
|
|
|
|
|
|
|
|
|
Instead of relaying data via usbmuxd this change will have it connect directly to
the device via network after retrieving its address from usbmuxd
|
|
|
|
|
|
send SSL shutdown message. As in debugserver this message will be considered as GDB server communication and break things
|
|
|
|
including network
Instead of just returning a list of UDIDs (like idevice_get_device_list) this
function will return idevice_info_t* records which also contains the type of
the connection and the connection data.
|
|
idevice_new_with_options()
|
|
|