Reg. SecItemCopyMatching and kSecMatchSubjectContains
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