1.1 --- a/MYCertificate.h Tue Apr 07 10:56:58 2009 -0700
1.2 +++ b/MYCertificate.h Sun Apr 12 22:16:14 2009 -0700
1.3 @@ -22,11 +22,17 @@
1.4 }
1.5
1.6 /** Creates a MYCertificate object for an existing Keychain certificate reference. */
1.7 ++ (MYCertificate*) certificateWithCertificateRef: (SecCertificateRef)certificateRef;
1.8 +
1.9 +/** Initializes a MYCertificate object for an existing Keychain certificate reference. */
1.10 - (id) initWithCertificateRef: (SecCertificateRef)certificateRef;
1.11
1.12 /** Creates a MYCertificate object from exported key data, but does not add it to any keychain. */
1.13 - (id) initWithCertificateData: (NSData*)data;
1.14
1.15 +/** Checks whether two MYCertificate objects have bit-for-bit identical certificate data. */
1.16 +- (BOOL)isEqualToCertificate:(MYCertificate*)cert;
1.17 +
1.18 /** The Keychain object reference for this certificate. */
1.19 @property (readonly) SecCertificateRef certificateRef;
1.20
1.21 @@ -63,4 +69,25 @@
1.22 #endif
1.23 //@}
1.24
1.25 +
1.26 +/** @name Expert
1.27 + */
1.28 +//@{
1.29 +#if !TARGET_OS_IPHONE
1.30 +
1.31 ++ (SecPolicyRef) X509Policy;
1.32 ++ (SecPolicyRef) SSLPolicy;
1.33 ++ (SecPolicyRef) SMIMEPolicy;
1.34 +- (CSSM_CERT_TYPE) certificateType;
1.35 +- (NSArray*) trustSettings;
1.36 +- (BOOL) setUserTrust: (SecTrustUserSetting)trustSetting;
1.37 +
1.38 +#endif
1.39 +//@}
1.40 +
1.41 @end
1.42 +
1.43 +
1.44 +NSString* MYPolicyGetName( SecPolicyRef policy );
1.45 +NSString* MYTrustDescribe( SecTrustRef trust );
1.46 +NSString* MYTrustResultDescribe( SecTrustResultType result );