• 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 issues with public key on iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Keychain issues with public key on iOS


  • Subject: Keychain issues with public key on iOS
  • From: Damien Cooke <email@hidden>
  • Date: Sat, 09 Feb 2013 08:01:42 +1030

All,
I am trying to put a public key into the ios keychain so I can get a SecKeyRef to use to verify a signature.

Now the key loos like this:

-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqE28o7Rhg36oaTGpHgIY
n1OcRpwFaznSUriAxmvLymRvoVllB/Rbbd7Ap2ALg4hr8i+lZU9bBND9YYbJbpuo
QqtM8/c5slZFr9fcp/ERnBu3L1EVhWYi4TPRtsZfy+BFgGrI3u6TJFf5ooAL5m9g
70HthETwoO+Jy62bd8zp972GkUWDfNlrRhvBj/gNxxaBcwKXaJVHre7t2vUaDVMP
nJzyuGehDTkB3+Fb+RgoYsDT0BHEK8l76Imwv2uvMwGvWo9viNBCXxkX4GBjHoQJ
kfIZ3EpU3zXQ3SD3TP78F3boN0rQUz95ObbzIUTjXokao3+u8u1VXY3pS+ynwaPe
ZQIDAQAB
-----END PUBLIC KEY-----

So I strip the begin and end markers plus remove all the \n (is this correct?)

then I pop it into the keychain.

The SecItemAdd succeeds but I can never get it out again as SecItemCopyMatching always returns null in the ref pointer but returns errSecSuccess so I am really confused.

If there is any light that anyone could shed on this for me it would be greatly appreciated.

Regards
Damien
_______________________________________________

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: Keychain issues with public key on iOS
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Help me fix a bug: endless recursion in NSTextView?
  • Next by Date: UI_APPEARANCE_SELECTOR question
  • Previous by thread: Re: Timeline control like in ScreenFlow...how i can implement?
  • Next by thread: Re: Keychain issues with public key on iOS
  • Index(es):
    • Date
    • Thread