From e52ef954be27fb5a4bf6f7e769c33851483d0e80 Mon Sep 17 00:00:00 2001 From: Demyan Kimitsa Date: Thu, 10 Oct 2019 11:57:06 +0300 Subject: introduces optional `idevice_connection_disable_ssl` with ability not to send SSL shutdown message. As in debugserver this message will be considered as GDB server communication and break things --- include/libimobiledevice/libimobiledevice.h | 14 ++++++++++++++ include/libimobiledevice/service.h | 11 +++++++++++ 2 files changed, 25 insertions(+) (limited to 'include') diff --git a/include/libimobiledevice/libimobiledevice.h b/include/libimobiledevice/libimobiledevice.h index 8bf022a..e0aa518 100644 --- a/include/libimobiledevice/libimobiledevice.h +++ b/include/libimobiledevice/libimobiledevice.h @@ -310,6 +310,20 @@ idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection); */ idevice_error_t idevice_connection_disable_ssl(idevice_connection_t connection); +/** + * Disable bypass SSL for the given connection without sending out terminate messages. + * + * @param connection The connection to disable SSL for. + * @param sslBypass if true ssl connection will not be terminated but just cleaned up, allowing + * plain text data going on underlying connection + * + * @return IDEVICE_E_SUCCESS on success, IDEVICE_E_INVALID_ARG when connection + * is NULL. This function also returns IDEVICE_E_SUCCESS when SSL is not + * enabled and does no further error checking on cleanup. + */ +idevice_error_t idevice_connection_disable_bypass_ssl(idevice_connection_t connection, uint8_t sslBypass); + + /** * Get the underlying file descriptor for a connection * diff --git a/include/libimobiledevice/service.h b/include/libimobiledevice/service.h index 84c5092..13d0e15 100644 --- a/include/libimobiledevice/service.h +++ b/include/libimobiledevice/service.h @@ -168,6 +168,17 @@ service_error_t service_enable_ssl(service_client_t client); */ service_error_t service_disable_ssl(service_client_t client); +/** + * Disable SSL for the given service client without sending SSL terminate messages. + * + * @param client The connected service client for that SSL should be disabled. + * + * @return SERVICE_E_SUCCESS on success, + * SERVICE_E_INVALID_ARG if client or client->connection is + * NULL, or SERVICE_E_UNKNOWN_ERROR otherwise. + */ +service_error_t service_disable_bypass_ssl(service_client_t client, uint8_t sslBypass); + #ifdef __cplusplus } #endif -- cgit v1.1-32-gdbae