SSLSecurity
open class SSLSecurity : NSObject
A wrapper around Starscream’s SSLSecurity that provides a minimal Objective-C interface.
-
The internal Starscream SSLSecurity.
Declaration
Swift
public let security: Starscream.SSLSecurity
-
Creates a new SSLSecurity that specifies whether to use publicKeys or certificates should be used for SSL pinning validation
Declaration
Swift
@objc public convenience init(usePublicKeys: Bool = true)
Parameters
usePublicKeys
is to specific if the publicKeys or certificates should be used for SSL pinning validation
-
Designated init
Declaration
Swift
public convenience init(certs: [SSLCert], usePublicKeys: Bool)
Parameters
certs
is the certificates or public keys to use
usePublicKeys
is to specific if the publicKeys or certificates should be used for SSL pinning validation
Return Value
a representation security object to be used with
-
Returns whether or not the given trust is valid.
Declaration
Swift
public func isValid(_ trust: SecTrust, domain: String?) -> Bool
Parameters
trust
The trust to validate.
domain
The CN domain to validate.
Return Value
Whether or not this is valid.