• 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
Reg. SecItemCopyMatching and kSecMatchSubjectContains
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reg. SecItemCopyMatching and kSecMatchSubjectContains


  • Subject: Reg. SecItemCopyMatching and kSecMatchSubjectContains
  • From: siva kumar <email@hidden>
  • Date: Wed, 18 May 2011 13:09:05 +0530

Hi,

I am working on iPhone. I wanted to get a certificate that contains a
particular value in the subject field. Eg. CN="myName" or O="myOrg" etc. I
tried to use the SecItemCopyMatching with kSecMatchSubjectContains. but the
certificate returned is not having the same subject name.

The example code as below.

err = SecItemCopyMatching(
                                      (CFDictionaryRef) [NSDictionary
dictionaryWithObjectsAndKeys:

 (id)kSecClassCertificate, kSecClass,
                                                         @"CN=MyName",
kSecMatchSubjectContains,

 kSecMatchLimitOne,      kSecMatchLimit,
                                                         kCFBooleanTrue,
     kSecReturnRef,

 kCFBooleanTrue,         kSecReturnAttributes,
                                                         nil
                                                         ],
                                      (CFTypeRef *) &result1
                                      );

or I got the subject field which is in x.500 format. How to extract CN,
organization details from the x.500 formatted NSData?

Regards,
SivaKumar
-----^v^v^------||---
_______________________________________________

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

  • Prev by Date: Re: I'm given a project.pbxproj file....
  • Next by Date: Re: iOS: multiple view controllers, one nib?
  • Previous by thread: Re: I'm given a project.pbxproj file....
  • Next by thread: Looking for iPhone App developers
  • Index(es):
    • Date
    • Thread