1 #include <Security/SecKeychain.h>
6 int main(int argc
, char *const *argv
)
8 int dont_skip
= argc
> 1 && !strcmp(argv
[1], "-s");
12 ok_status(SecKeychainSetUserInteractionAllowed(FALSE
), "SecKeychainSetUserInteractionAllowed(FALSE)");
13 if (!tests_begin(argc
, argv
))
14 BAIL_OUT("tests_begin failed");
16 SecKeychainRef keychain
;
17 ok_status(SecKeychainCreate("test", 4, "test", FALSE
, NULL
, &keychain
),
19 ok_status(SecKeychainLock(keychain
), "SecKeychainLock");
21 skip("<rdar://problem/3916692> 8A325 SecKeychainSetUserInteractionAllowed() doesn't affect kc unlock dialogs", 1, dont_skip
);
23 is_status(SecKeychainUnlock(keychain
, 0, NULL
, FALSE
),
24 errSecInteractionNotAllowed
, "SecKeychainUnlock");
26 ok_status(SecKeychainLock(keychain
), "SecKeychainLock");
29 ok_status(SecKeychainOpen("test", &keychain
), "SecKeychainOpen locked kc");
31 skip("<rdar://problem/3916692> 8A325 SecKeychainSetUserInteractionAllowed() doesn't affect kc unlock dialogs", 1, dont_skip
);
33 is_status(SecKeychainUnlock(keychain
, 0, NULL
, FALSE
),
34 errSecInteractionNotAllowed
, "SecKeychainUnlock");