snej@0: // snej@0: // MYKeychainItem.h snej@0: // MYCrypto snej@0: // snej@0: // Created by Jens Alfke on 3/26/09. snej@0: // Copyright 2009 Jens Alfke. All rights reserved. snej@0: // snej@0: snej@0: #import snej@0: #import snej@2: #import "MYCryptoConfig.h" snej@0: @class MYKeychain; snej@0: snej@1: snej@1: /** Error domain for CSSM (low-level crypto) errors */ snej@1: extern NSString* const MYCSSMErrorDomain; snej@1: snej@1: snej@2: #if MYCRYPTO_USE_IPHONE_API snej@0: typedef CFTypeRef MYKeychainItemRef; snej@0: #else snej@0: typedef SecKeychainItemRef MYKeychainItemRef; snej@0: #endif snej@0: snej@0: snej@1: /** Abstract base class for keychain items. snej@1: Direct subclasses are MYKey and MYCertificate. */ snej@0: @interface MYKeychainItem : NSObject snej@0: { snej@0: @private snej@0: MYKeychainItemRef _itemRef; snej@0: } snej@0: snej@1: /** The Keychain item reference that this object represents. */ snej@0: @property (readonly) MYKeychainItemRef keychainItemRef; snej@0: snej@1: /** The Keychain that contains this object, or nil. */ snej@0: @property (readonly) MYKeychain *keychain; snej@0: snej@0: /** Removes the item from its keychain, if any. */ snej@0: - (BOOL) removeFromKeychain; snej@0: snej@0: @end