-
Notifications
You must be signed in to change notification settings - Fork 422
SSLSecurity
leeway edited this page Nov 19, 2021
·
1 revision
!((os(Linux)))
-
open class SSLSecurity : SSLTrustValidator
!((os(Linux)))
-
Use certs from main app bundle
public convenience init(usePublicKeys: Bool = false)
- usePublicKeys: is to specific if the publicKeys or certificates should be used for SSL pinning validation
a representation security object to be used with
!((os(Linux)))
-
Designated init
public 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
!((os(Linux)))
-
public var validatedDN = true
!((os(Linux)))
-
public var validateEntireChain = true
!((os(Linux)))
-
Valid the trust and domain name.
open func isValid(_ trust: SecTrust, domain: String?) -> Bool
- trust: is the serverTrust to validate
- domain: is the CN domain to validate
if the key was successfully validated
!((os(Linux)))
-
Get the public key from a certificate data
public func extractPublicKey(_ data: Data) -> SecKey?
- data: is the certificate to pull the public key from
a public key
!((os(Linux)))
-
Get the public key from a certificate
public func extractPublicKey(_ cert: SecCertificate, policy: SecPolicy) -> SecKey?
- data: is the certificate to pull the public key from
a public key
!((os(Linux)))
-
Get the certificate chain for the trust
public func certificateChain(_ trust: SecTrust) -> [Data]
- trust: is the trust to lookup the certificate chain for
the certificate chain for the trust
!((os(Linux)))
-
Get the public key chain for the trust
public func publicKeyChain(_ trust: SecTrust) -> [SecKey]
- trust: is the trust to lookup the certificate chain and extract the public keys
the public keys from the certifcate chain for the trust
Types
- CloseCode
- CocoaMQTT
- CocoaMQTT5
- CocoaMQTT5Message
- CocoaMQTTAUTHReasonCode
- CocoaMQTTCONNACKReasonCode
- CocoaMQTTConnAck
- CocoaMQTTConnState
- CocoaMQTTDISCONNECTReasonCode
- CocoaMQTTError
- CocoaMQTTError.FoundationConnection
- CocoaMQTTLogger
- CocoaMQTTLoggerLevel
- CocoaMQTTMessage
- CocoaMQTTPUBACKReasonCode
- CocoaMQTTPUBCOMPReasonCode
- CocoaMQTTPUBRECReasonCode
- CocoaMQTTPUBRELReasonCode
- CocoaMQTTPropertyName
- CocoaMQTTQoS
- CocoaMQTTSUBACKReasonCode
- CocoaMQTTSocket
- CocoaMQTTUNSUBACKReasonCode
- CocoaMQTTWebSocket
- CocoaMQTTWebSocket.DefaultConnectionBuilder
- CocoaMQTTWebSocket.FoundationConnection
- CocoaMQTTWebSocket.StarscreamConnection
- CocoaRetainHandlingOption
- ErrorType
- FoundationStream
- MqttAuthProperties
- MqttConnectProperties
- MqttDecodeConnAck
- MqttDecodePubAck
- MqttDecodePubComp
- MqttDecodePubRec
- MqttDecodePubRel
- MqttDecodePublish
- MqttDecodeSubAck
- MqttDecodeUnsubAck
- MqttPublishProperties
- MqttSubscription
- PayloadFormatIndicator
- SSLCert
- SSLClientCertificate
- SSLClientCertificateError
- SSLSecurity
- SSLSettings
- WSError
- WebSocket
- WebSocket.OpCode
- WebSocket.WSResponse
- formatInt
Protocols
- CocoaMQTT5Delegate
- CocoaMQTTDelegate
- CocoaMQTTSocketDelegate
- CocoaMQTTSocketProtocol
- CocoaMQTTWebSocketConnection
- CocoaMQTTWebSocketConnectionBuilder
- CocoaMQTTWebSocketConnectionDelegate
- SSLTrustValidator
- WSStream
- WSStreamDelegate
- WebSocketAdvancedDelegate
- WebSocketClient
- WebSocketDelegate
- WebSocketPongDelegate