* More work on iPhone compatibility.
* Restored the signature-verification code to MYCertInfo, which I'd removed earlier. I now need it to verify self-signed certs, since the Security framework won't do it for me.
* Merged MYCertificate-iPhone.m into MYCertificate.m since there's more shared code now.
5 // Created by Jens Alfke on 4/9/09.
6 // Copyright 2009 Jens Alfke. All rights reserved.
9 #import "MYCertificate.h"
13 /** An Identity represents a certificate with an associated private key. */
14 @interface MYIdentity : MYCertificate
17 SecIdentityRef _identityRef;
20 /** Creates a MYIdentity object for an existing Keychain identity reference. */
21 + (MYIdentity*) identityWithIdentityRef: (SecIdentityRef)identityRef;
23 /** The underlying SecIdentityRef. */
24 @property (readonly) SecIdentityRef identityRef;
26 /** The identity's associated private key. */
27 @property (readonly) MYPrivateKey *privateKey;
31 * Functionality not available on iPhone.
36 /** Returns the identity that's been set as the preferred one for the given name, or nil. */
37 + (MYIdentity*) preferredIdentityForName: (NSString*)name;
39 /** Registers this identity as the preferred one for the given name,
40 for later lookup using +preferredIdentityForName:. */
41 - (BOOL) makePreferredIdentityForName: (NSString*)name;
52 /** Initializes a MYIdentity given an existing SecIdentityRef. */
53 - (id) initWithIdentityRef: (SecIdentityRef)identityRef;