]>
git.saurik.com Git - apple/security.git/blob - SecurityTests/regressions/t/40kc-unlock.t
5 BEGIN { require 't/security.pl' };
6 plan_security tests
=> 6;
8 $ENV{HOME
}="/tmp/test$$";
9 ok
(mkdir($ENV{HOME
}), 'setup home');
10 is_output
('security', 'create-keychain', [qw(-p test test-unlock)],
14 local $TODO = "<rdar://problem/3835412> Unlocking an unlocked keychain with the wrong password succeeds";
15 is_output
('security', 'unlock-keychain', ['-p', 'wrong', 'test-unlock'],
16 ['security: SecKeychainUnlock test-unlock: The user name or passphrase you entered is not correct.'],
17 'unlock unlocked kc w/ wrong pw');
19 is_output
('security', 'lock-keychain', ['test-unlock'],
22 is_output
('security', 'unlock-keychain', ['-p', 'wrong', 'test-unlock'],
23 ['security: SecKeychainUnlock test-unlock: The user name or passphrase you entered is not correct.'],
24 'unlock locked kc w/ wrong pw');
25 ok
(system("rm -rf '$ENV{HOME}'") eq 0, 'cleanup home');