Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SecKeychainItemCopyContent for ppc on Leopard



I have noticed a difference in the behavior of a unit test (SenTestCase) when it is run in Release mode against the i386 arch and the ppc arch in Xcode 3.0 on Leopard.

The following code correctly populates the SecKeychainAttributeList "list" for i386. This exact same code, when run from the exact same unit test fails with "errSecAuthFailed" (code -25293) for ppc:

SecKeychainItemRef item;
NSString *serviceName = @"MyService";
OSStatus status = SecKeychainFindGenericPassword(NULL,
[serviceName length],
[serviceName UTF8String],
0,
NULL,
NULL,
NULL,
&item);
if (status != noErr) {
return nil; // status is always 0. always works up to this point.
}


    // from Advanced Mac OS X Programming, ch. 16
    UInt32 length;
    char *password;
    SecKeychainAttribute attributes[8];
    SecKeychainAttributeList list;
	
    attributes[0].tag = kSecAccountItemAttr;
    attributes[1].tag = kSecDescriptionItemAttr;
    attributes[2].tag = kSecLabelItemAttr;
    attributes[3].tag = kSecModDateItemAttr;

    list.count = 4;
    list.attr = attributes;

// status is always 0 on i386, -25293 on ppc
status = SecKeychainItemCopyContent(item, NULL, &list, &length, (void **)&password);


Does anyone have ideas about the source of this difference?

-Jon Crosby
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.