SSLSecurity
open class SSLSecurity : SSLTrustValidator
Undocumented
-
Undocumented
Declaration
Swift
public var validatedDN = true -
Undocumented
Declaration
Swift
public var validateEntireChain = true -
Use certs from main app bundle
Declaration
Swift
public convenience init(usePublicKeys: Bool = false)Parameters
usePublicKeysis to specific if the publicKeys or certificates should be used for SSL pinning validation
Return Value
a representation security object to be used with
-
Designated init
Declaration
Swift
public init(certs: [SSLCert], usePublicKeys: Bool)Parameters
certsis the certificates or public keys to use
usePublicKeysis to specific if the publicKeys or certificates should be used for SSL pinning validation
Return Value
a representation security object to be used with
-
Valid the trust and domain name.
Declaration
Swift
open func isValid(_ trust: SecTrust, domain: String?) -> BoolParameters
trustis the serverTrust to validate
domainis the CN domain to validate
Return Value
if the key was successfully validated
-
Get the public key from a certificate data
Declaration
Swift
public func extractPublicKey(_ data: Data) -> SecKey?Parameters
datais the certificate to pull the public key from
Return Value
a public key
-
Get the public key from a certificate
Declaration
Swift
public func extractPublicKey(_ cert: SecCertificate, policy: SecPolicy) -> SecKey?Parameters
datais the certificate to pull the public key from
Return Value
a public key
-
Get the certificate chain for the trust
Declaration
Swift
public func certificateChain(_ trust: SecTrust) -> [Data]Parameters
trustis the trust to lookup the certificate chain for
Return Value
the certificate chain for the trust
-
Get the public key chain for the trust
Declaration
Swift
public func publicKeyChain(_ trust: SecTrust) -> [SecKey]Parameters
trustis the trust to lookup the certificate chain and extract the public keys
Return Value
the public keys from the certifcate chain for the trust
View on GitHub
Install in Dash