File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -61,18 +61,18 @@ class MqttClient : RCTEventEmitter {
61
61
String ( kSecAttrApplicationTag) : keyTag as AnyObject ,
62
62
String ( kSecReturnRef) : true as AnyObject
63
63
]
64
-
64
+
65
65
if #available( iOS 10 , * ) {
66
66
query [ String ( kSecAttrKeyType) ] = kSecAttrKeyTypeECSECPrimeRandom
67
67
} else {
68
68
// Fallback on earlier versions
69
69
query [ String ( kSecAttrKeyType) ] = kSecAttrKeyTypeEC
70
70
}
71
-
71
+
72
72
var result : AnyObject ?
73
-
73
+
74
74
let status = SecItemCopyMatching ( query as CFDictionary , & result)
75
-
75
+
76
76
if status == errSecSuccess {
77
77
print ( " \( keyTag) Key existed! " )
78
78
block ( ( result as! SecKey ? ) !)
@@ -99,7 +99,7 @@ class MqttClient : RCTEventEmitter {
99
99
reject ( " RANGE_ERROR " , " invalid certificate " , nil )
100
100
return
101
101
}
102
-
102
+
103
103
let block : SecKeyPerformBlock = { privateKey in
104
104
do {
105
105
// adds the private key to the keychain
@@ -162,7 +162,7 @@ class MqttClient : RCTEventEmitter {
162
162
self . certArray = [ identity!, caCert] as CFArray
163
163
resolve ( nil )
164
164
}
165
-
165
+
166
166
self . loadPrivateKeyFromKeychain ( keyTag: keyTag, reject: reject, block: block)
167
167
}
168
168
You can’t perform that action at this time.
0 commit comments