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