Lines Matching defs:passcode

14    need to manipulate the passcode) has the unfortunate effect of link xnu_quick_test
191 /* We fail if a passcode already exists, and the methods being used to lock/unlock
219 int unlock_device(char * passcode)
229 if ((passcode == NULL) || ((input_struct_count = strnlen(passcode, CPT_MAX_PASS_LEN)) == CPT_MAX_PASS_LEN))
231 passcode = "";
235 result = apple_key_store(kAppleKeyStoreKeyBagUnlock, inputs, input_count, passcode, input_struct_count, NULL, NULL);
238 if ((passcode == NULL) || (strnlen(passcode, CPT_MAX_PASS_LEN) == CPT_MAX_PASS_LEN))
240 passcode = "";
243 char * const keystorectl_args[] = {keystorectl_path, "unlock", passcode, NULL};
255 /* If we're entitled, we can set the passcode ourselves. */
292 /* If we aren't entitled, we'll need to use keystorectl to set the passcode. */
310 int clear_passcode(char * passcode)
312 /* For the moment, this will set the passcode to the empty string (a known value);
316 result = set_passcode(NULL, passcode);
327 set a passcode and then reboot the device in order to test this; this function
335 /* If the device has a passcode when we want to test it, things are going to go wrong.
336 As such, we'll assume the device never has a passcode.
365 char * passcode = "IAmASecurePassword";
403 /* If we support content protection, we'll need to be able to set the passcode. */
408 printf("%s, line %d: the device appears to have a passcode.\n",
413 if (set_passcode(passcode, NULL))
415 printf("%s, line %d: failed to set a new passcode.\n",
470 if (unlock_device(passcode))
578 if (unlock_device(passcode))
707 if (unlock_device(passcode))
790 if (unlock_device(passcode))
834 if (unlock_device(passcode))
908 /* Try to unlock the device (no ramifications if it isn't locked when we try) and remove the passcode. */
909 if (unlock_device(passcode))
914 if (clear_passcode(passcode))
916 printf("WARNING: failed to clear the passcode.\n");