CBLTLSIdentity
@interface CBLTLSIdentity : NSObject
ENTERPRISE EDITION ONLY.
CBLTLSIdentity provides TLS Identity information including a key pair and X.509 certificate chain used for configuring TLS communication to the listener.
-
The certificate chain as an array of SecCertificateRef object.
Declaration
Objective-C
@property (nonatomic, readonly) NSArray *_Nonnull certs;
-
The identity expiration date which is the expiration date of the first certificate in the chain.
Declaration
Objective-C
@property (nonatomic, readonly) NSDate *_Nonnull expiration;
-
Undocumented
Declaration
Objective-C
- (instancetype) init NS_UNAVAILABLE;
-
Get an identity from the Keychain with the given label.
Declaration
Objective-C
+ (nullable CBLTLSIdentity *)identityWithLabel:(nonnull NSString *)label error:(NSError *_Nullable *_Nullable) error;
-
Get an identity with a SecIdentity object. Any intermediate or root certificates required to identify the certificate but not present in the system wide set of trusted anchor certificates need to be specified in the optional certs parameter. In additon, the specified SecIdenetity object is required to be present in the KeyChain, otherwise an exception will be thrown.
Declaration
Objective-C
+ (nullable CBLTLSIdentity *) identityWithIdentity:(nonnull SecIdentityRef)identity certs:(nullable NSArray *)certs error:(NSError *_Nullable *_Nullable)error;
-
Creates a self-signed identity and persist the identity in the Keychain with the given label. Note that the Common Name (kCBLCertAttrCommonName) attribute is required. If the Common Name attribute is not included, an error will be returned.
Declaration
Objective-C
+ (nullable CBLTLSIdentity *) createIdentityForServer:(BOOL)server attributes: (nonnull NSDictionary<NSString *, NSString *> *)attributes expiration:(nullable NSDate *)expiration label:(nonnull NSString *)label error:(NSError *_Nullable *_Nullable)error;
-
Imports and creates a identity from the given PKCS12 Data. The imported identity will be stored in the Keychain with the given label.
Declaration
Objective-C
+ (nullable CBLTLSIdentity *) importIdentityWithData:(nonnull NSData *)data password:(nullable NSString *)password label:(nonnull NSString *)label error:(NSError *_Nullable *_Nullable)error;
-
Delete the identity in the Keychain with the given label.
Declaration
Objective-C
+ (BOOL)deleteIdentityWithLabel:(nonnull NSString *)label error:(NSError *_Nullable *_Nullable)error;