fix objective-c

This commit is contained in:
Erik 2016-09-20 16:57:09 -04:00
parent 0849a75686
commit 8ba3518fbc
No known key found for this signature in database
GPG Key ID: 4930B7C5FBC1A69D

View File

@ -55,7 +55,7 @@ public class SSLSecurity : NSObject {
var isReady = false //is the key processing done?
var certificates: [Data]? //the certificates
var pubKeys: [SecKey]? //the public keys
@nonobjc var pubKeys: [SecKey]? //the public keys
var usePublicKeys = false //use public keys or certificate validation?
/**
@ -239,7 +239,7 @@ public class SSLSecurity : NSObject {
- returns: the public keys from the certifcate chain for the trust
*/
func publicKeyChain(_ trust: SecTrust) -> [SecKey] {
@nonobjc func publicKeyChain(_ trust: SecTrust) -> [SecKey] {
let policy = SecPolicyCreateBasicX509()
let keys = (0..<SecTrustGetCertificateCount(trust)).reduce([SecKey]()) { (keys: [SecKey], index: Int) -> [SecKey] in
var keys = keys