summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-02-08 09:00:36 +0100
committerGravatar Nikias Bassen2019-02-08 09:00:36 +0100
commit8ef9e51d8514a441dc9b7d035954691d880a543e (patch)
treeb86225d259b7054e78142374bfacb526577f98ef /tools
parentd200973897e281ba35d6c9c433e1355a49056da8 (diff)
downloadlibimobiledevice-8ef9e51d8514a441dc9b7d035954691d880a543e.tar.gz
libimobiledevice-8ef9e51d8514a441dc9b7d035954691d880a543e.tar.bz2
idevicepair: Fix 'validate' command which was broken since iOS 11
Apple removed the lockdownd command 'ValidatePair'. Validating a pairing can just be done by trying to use the present pairing record to try to start a lockdownd session: if it succeeds, the pairing is valid, otherwise obviously not. So this is what we do now.
Diffstat (limited to 'tools')
-rw-r--r--tools/idevicepair.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/idevicepair.c b/tools/idevicepair.c
index 6ae9103..0b866ea 100644
--- a/tools/idevicepair.c
+++ b/tools/idevicepair.c
@@ -2,8 +2,8 @@
* idevicepair.c
* Manage pairings with devices and this host
*
- * Copyright (c) 2014 Martin Szulecki All Rights Reserved.
- * Copyright (c) 2010 Nikias Bassen All Rights Reserved.
+ * Copyright (c) 2010-2019 Nikias Bassen, All Rights Reserved.
+ * Copyright (c) 2014 Martin Szulecki, All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -266,7 +266,9 @@ int main(int argc, char **argv)
break;
case OP_VALIDATE:
- lerr = lockdownd_validate_pair(client, NULL);
+ lockdownd_client_free(client);
+ client = NULL;
+ lerr = lockdownd_client_new_with_handshake(device, &client, "idevicepair");
if (lerr == LOCKDOWN_E_SUCCESS) {
printf("SUCCESS: Validated pairing with device %s\n", udid);
} else {