• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
SecKeychainItemCopyContent for ppc on Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SecKeychainItemCopyContent for ppc on Leopard


  • Subject: SecKeychainItemCopyContent for ppc on Leopard
  • From: Jon Crosby <email@hidden>
  • Date: Thu, 1 Nov 2007 14:13:44 -0700

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: SecKeychainItemCopyContent for ppc on Leopard
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: [Leopard] GM Build Number?
  • Next by Date: Re: SecKeychainItemCopyContent for ppc on Leopard
  • Previous by thread: Re: NSAmimatablePropertyContainer property animation troubles...
  • Next by thread: Re: SecKeychainItemCopyContent for ppc on Leopard
  • Index(es):
    • Date
    • Thread