1.1 --- a/MYKeychain-iPhone.m Wed Apr 08 16:30:52 2009 -0700
1.2 +++ b/MYKeychain-iPhone.m Sun Apr 19 21:19:35 2009 -0700
1.3 @@ -8,6 +8,8 @@
1.4
1.5 #import "MYCrypto_Private.h"
1.6 #import "MYDigest.h"
1.7 +#import "MYIdentity.h"
1.8 +
1.9
1.10 #if MYCRYPTO_USE_IPHONE_API
1.11
1.12 @@ -104,6 +106,13 @@
1.13 return [[[MYKeyEnumerator alloc] initWithQuery: query] autorelease];
1.14 }
1.15
1.16 +- (NSEnumerator*) enumerateIdentities {
1.17 + NSMutableDictionary *query = $mdict({(id)kSecClass, (id)kSecClassIdentity},
1.18 + {(id)kSecMatchLimit, (id)kSecMatchLimitAll},
1.19 + {(id)kSecReturnRef, $true});
1.20 + return [[[MYKeyEnumerator alloc] initWithQuery: query] autorelease];
1.21 +}
1.22 +
1.23 - (NSEnumerator*) enumerateSymmetricKeys {
1.24 NSMutableDictionary *query = $mdict({(id)kSecClass, (id)kSecClassKey},
1.25 {(id)kSecAttrKeyClass, (id)kSecAttrKeyClassSymmetric},
1.26 @@ -161,7 +170,6 @@
1.27 }
1.28
1.29
1.30 -
1.31 @end
1.32
1.33
1.34 @@ -218,6 +226,8 @@
1.35 next = [[[MYSymmetricKey alloc] initWithKeyRef: (SecKeyRef)found] autorelease];
1.36 } else if (_itemClass == kSecClassCertificate) {
1.37 next = [[[MYCertificate alloc] initWithCertificateRef: (SecCertificateRef)found] autorelease];
1.38 + } else if (_itemClass == kSecClassIdentity) {
1.39 + next = [[[MYIdentity alloc] initWithIdentityRef: (SecIdentityRef)found] autorelease];
1.40 }
1.41 CFRelease(found);
1.42 }