diff options
author | 2021-07-29 03:36:29 +0200 | |
---|---|---|
committer | 2021-07-29 03:36:29 +0200 | |
commit | 6c7b50355cc5de1da1d7677e012f18efbce34237 (patch) | |
tree | 9f70fb484fd9f4c5ecc65b4f2ca4fd4732c94e65 /src/idevice.h | |
parent | 8e01e874113f430dc7a1835282ff93226863e47c (diff) | |
download | libimobiledevice-6c7b50355cc5de1da1d7677e012f18efbce34237.tar.gz libimobiledevice-6c7b50355cc5de1da1d7677e012f18efbce34237.tar.bz2 |
lockdown: Get DeviceClass to make sure OS version dependent code is executed 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.
Diffstat (limited to 'src/idevice.h')
-rw-r--r-- | src/idevice.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/idevice.h b/src/idevice.h index 7a8f4ce..2509e48 100644 --- a/src/idevice.h +++ b/src/idevice.h | |||
@@ -52,6 +52,13 @@ | |||
52 | 52 | ||
53 | #define DEVICE_VERSION(maj, min, patch) (((maj & 0xFF) << 16) | ((min & 0xFF) << 8) | (patch & 0xFF)) | 53 | #define DEVICE_VERSION(maj, min, patch) (((maj & 0xFF) << 16) | ((min & 0xFF) << 8) | (patch & 0xFF)) |
54 | 54 | ||
55 | #define DEVICE_CLASS_IPHONE 1 | ||
56 | #define DEVICE_CLASS_IPAD 2 | ||
57 | #define DEVICE_CLASS_IPOD 3 | ||
58 | #define DEVICE_CLASS_APPLETV 4 | ||
59 | #define DEVICE_CLASS_WATCH 5 | ||
60 | #define DEVICE_CLASS_UNKNOWN 255 | ||
61 | |||
55 | struct ssl_data_private { | 62 | struct ssl_data_private { |
56 | #if defined(HAVE_OPENSSL) | 63 | #if defined(HAVE_OPENSSL) |
57 | SSL *session; | 64 | SSL *session; |
@@ -89,6 +96,7 @@ struct idevice_private { | |||
89 | enum idevice_connection_type conn_type; | 96 | enum idevice_connection_type conn_type; |
90 | void *conn_data; | 97 | void *conn_data; |
91 | int version; | 98 | int version; |
99 | int device_class; | ||
92 | }; | 100 | }; |
93 | 101 | ||
94 | #endif | 102 | #endif |