]>
git.saurik.com Git - apple/security.git/blob - SecurityTests/regressions/kc/kc-05-retain-release.c
2 #include <Security/SecKeychain.h>
7 int main(int argc
, char *const *argv
)
11 if (!tests_begin(argc
, argv
))
12 BAIL_OUT("tests_begin failed");
14 ok_status(SecKeychainSetUserInteractionAllowed(FALSE
), "disable ui");
15 SecKeychainRef keychain
= NULL
;
16 ok_status(SecKeychainCreate("test", 4, "test", FALSE
, NULL
, &keychain
),
19 skip("can't continue without keychain", 2, ok(keychain
, "keychain not NULL"));
20 ok_status(SecKeychainDelete(keychain
), "SecKeychainDelete");
22 is_status(CFGetRetainCount(keychain
), 1, "retaincount is 1");
27 ok_status(SecKeychainOpen("test", &keychain
), "SecKeychainOpen");
29 skip("can't continue without keychain", 2, ok(keychain
, "keychain not NULL"));
30 CFIndex retCount
= CFGetRetainCount(keychain
);
31 is_status(retCount
, 1, "retaincount is 1");