• 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
Keychain problems with i386
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Keychain problems with i386


  • Subject: Keychain problems with i386
  • From: Donald Brown <email@hidden>
  • Date: Wed, 22 Mar 2006 11:16:46 -0600

Has anyone had any experience with keychain code in a universal binary? I've got a password lookup that works perfectly under ppc, but not under i386. I'm sure it's an endian problem, but not sure where it is.

Here's the code. Under ppc, SecKeychainSearchCopyNext returns no error, under intel it says no item found.

OSStatus status;
SecKeychainSearchRef searchRef;
char * UTF8Username = (char *)[[theUser lowercaseString] UTF8String];
char * UTF8Servername = (char *)[[self hostNameWithUsername:theUser] UTF8String];
SecKeychainItemRef itemRef = nil;
UInt32 port = 80;

if (UTF8Username == nil)
return nil;

SecKeychainAttribute attrs[] = {
{ kSecAccountItemAttr, strlen(UTF8Username), UTF8Username },
{ kSecPathItemAttr, 1, "/" },
{ kSecPortItemAttr, sizeof(UInt32), &port }, // We might make that changeable
{ kSecProtocolItemAttr, 4, "http" },
{ kSecServerItemAttr, strlen(UTF8Servername), UTF8Servername },
};

SecKeychainAttributeList attributes = { sizeof(attrs) / sizeof(attrs [0]),
attrs};

status = SecKeychainSearchCreateFromAttributes (NULL,
kSecInternetPasswordItemClass,
&attributes,
&searchRef);

if (status == 0)
{
status = SecKeychainSearchCopyNext (searchRef,
&itemRef);
//more stuff here
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Keychain problems with i386
      • From: Mike Blaguszewski <email@hidden>
  • Prev by Date: NSTableView and NSArrayController's selectionIndexes
  • Next by Date: Re: My little file copy/backup program
  • Previous by thread: NSTableView and NSArrayController's selectionIndexes
  • Next by thread: Re: Keychain problems with i386
  • Index(es):
    • Date
    • Thread