#include "keychain_regressions.h"
#include "kc-helpers.h"
+/*
+ Note: to force a failure, run this as root:
+ chmod o-r /var/db/mds/messages/se_SecurityMessages
+ Restore with
+ chmod o+r /var/db/mds/messages/se_SecurityMessages
+ */
+
static char account[] = "account";
static char service[] = "service";
static char password[] = "password";
is(length, sizeof(password), "<rdar://problem/3867900> "
"SecKeychainItemCopyContent() returns bad data on items "
"from notifications");
+ ok(data, "received data from item");
ok(!memcmp(password, data, length), "password data matches.");
int
kc_21_item_use_callback(int argc, char *const *argv)
{
- plan_tests(14);
+ plan_tests(16);
// Run the CFRunLoop to clear out existing notifications
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1.0, false);
CFRelease(itemRef);
+ ok_status(SecKeychainRemoveCallback(callbackFunction), "Remove callback");
+
ok_status(SecKeychainDelete(keychain), "%s: SecKeychainDelete", testName);
CFRelease(keychain);