TLSIdentity
@available(macOS 10.12, iOS 10.0, *)
public class TLSIdentityENTERPRISE EDITION ONLY.
TLSIdentity 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 SecCertificate object. DeclarationSwift public var certs: [SecCertificate] { get }
- 
                  
                  The identity expiration date which is the expiration date of the first certificate in the chain. DeclarationSwift public var expiration: Date { get }
- 
                  
                  Get an identity from the Keychain with the given label. DeclarationSwift public static func identity(withLabel label: String) throws -> TLSIdentity?
- 
                  
                  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. DeclarationSwift public static func identity(withIdentity identity: SecIdentity, certs: [SecCertificate]?) throws -> TLSIdentity
- 
                  
                  Creates a self-signed identity and persist the identity in the Keychain with the given label. Note that the Common Name (certAttrCommonName) attribute is required. If the Common Name attribute is not included, an error will be returned. DeclarationSwift public static func createIdentity(forServer server: Bool, attributes: [String: String], expiration: Date?, label: String) throws -> TLSIdentity
- 
                  
                  Imports and creates a identity from the given PKCS12 Data. The imported identity will be stored in the Keychain with the given label. DeclarationSwift public static func importIdentity(withData data: Data, password: String?, label: String) throws -> TLSIdentity
- 
                  
                  Delete the identity in the Keychain with the given label. DeclarationSwift public static func deleteIdentity(withLabel label: String) throws
 TLSIdentity Class Reference
        TLSIdentity Class Reference