WSCKeychainItem Class Reference
Inherits from | NSObject |
Declared in | WSCKeychainItem.h WSCKeychainItem.m |
Overview
The WSCKeychainItem
defines the basic property of an keychain item.
You typically do not use WSCKeychainItem
object directly, you use objects whose
classes descend from this class and WSCProtectedKeychainItem:
- WSCPassphraseItem
- WSCCertificateItem
- WSCKey
- WSCIdentity (Not supported, will be supported in version 2.0)
Tasks
Common Keychain Item Attributes
-
label
property -
itemClass
property -
creationDate
property -
modificationDate
property
Managing Keychain Items
Keychain Services Bridge
Properties
creationDate
The NSDate
object that identifies the creation date of the keychain item represented by receiver.
@property (retain, readwrite) NSDate *creationDate
Discussion
Warning: The year
component of creationDate must not be greater than 9999
.
Declared In
WSCKeychainItem.h
isValid
BOOL
value that indicates whether the receiver is currently valid. (read-only)
@property (assign, readonly) BOOL isValid
Discussion
YES
if the receiver is still capable of referring to a valid keychain item; otherwise, NO.
Declared In
WSCKeychainItem.h
itemClass
The value that indicates which type of keychain item the receiver is. (read-only)
@property (assign, readonly) WSCKeychainItemClass itemClass
Discussion
For a list of possible class values, see “WaxSealCore Keychain Item Class Constants.”
Declared In
WSCKeychainItem.h
keychain
The keychain in which the keychain item represented by receiver residing. (read-only)
@property (unsafe_unretained, readonly) WSCKeychain *keychain
Declared In
WSCKeychainItem.h
label
The NSString
object that identifies the label of keychain item represented by receiver.
@property (copy, readwrite) NSString *label
Declared In
WSCKeychainItem.h
modificationDate
The NSDate
object that identifies the modification date of the keychain item represented by receiver. (read-only)
@property (retain, readonly) NSDate *modificationDate
Discussion
This is a read-only property, you cannot modify the modification date of an keychain item in WaxSealCore framework and Keychain Services API, as the value you specify will be overwritten with the current time.
One more thing
If you want to change the modification date to something other than the current time, use a CSSM (Common Security Services Manager) function to do so.
Declared In
WSCKeychainItem.h
secKeychainItem
The reference of the SecKeychainItem
opaque object, which wrapped by WSCKeychainItem
object. (read-only)
@property (unsafe_unretained, readonly) SecKeychainItemRef secKeychainItem
Discussion
If you are familiar with the underlying Keychain Services API, you can move freely back and forth between WaxSealCore framework and Keychain Services API with this property.
Declared In
WSCKeychainItem.h
Class Methods
keychainItemWithSecKeychainItemRef:
Creates and returns a WSCKeychainItem
object using the given reference to the instance of SecKeychainItem
opaque type.
+ (instancetype)keychainItemWithSecKeychainItemRef:(SecKeychainItemRef)_SecKeychainItemRef
Parameters
- _SecKeychainItemRef
A reference to the instance of
SecKeychainItem
opaque type.
Return Value
A WSCKeychainItem
object initialized with the given reference to the instance of SecKeychainItem
opaque type.
Return nil
if _SecKeychainItemRef is nil
or an error occured.
Discussion
If you are familiar with the underlying Keychain Services API, you can move freely back and forth between WaxSealCore framework and Keychain Services API with this class method.
Warning: This method is just used for bridge between WaxSealCore framework and Keychain Services API.
Instead of invoking this method, you should construct a WSCKeychainItem
object by invoking:
Declared In
WSCKeychainItem.h