MYIdentity.h
author snej@snej.local
Thu Apr 09 22:27:51 2009 -0700 (2009-04-09)
changeset 5 b2e360b78189
parent 4 f4709533c816
child 8 4c0eafa7b233
permissions -rw-r--r--
Fixed iPhone build.
Updated README.
     1 //
     2 //  MYIdentity.h
     3 //  MYCrypto
     4 //
     5 //  Created by Jens Alfke on 4/9/09.
     6 //  Copyright 2009 Jens Alfke. All rights reserved.
     7 //
     8 
     9 #import "MYCertificate.h"
    10 @class MYPrivateKey;
    11 
    12 
    13 /** An Identity represents a certificate with an associated private key. */
    14 @interface MYIdentity : MYCertificate
    15 {
    16     @private
    17     SecIdentityRef _identityRef;
    18 }
    19 
    20 /** Initializes a MYIdentity given an existing SecIdentityRef. */
    21 - (id) initWithIdentityRef: (SecIdentityRef)identityRef;
    22 
    23 /** The identity's associated private key. */
    24 @property (readonly) MYPrivateKey *privateKey;
    25 
    26 #if !TARGET_OS_IPHONE
    27 
    28 /** Returns the identity that's been set as the preferred one for the given name, or nil. */
    29 + (MYIdentity*) preferredIdentityForName: (NSString*)name;
    30 
    31 /** Registers this identity as the preferred one for the given name,
    32     for later lookup using +preferredIdentityForName:. */
    33 - (BOOL) makePreferredIdentityForName: (NSString*)name;
    34 
    35 #endif
    36 
    37 @end