@@ -181,7 +181,7 @@ extension Keychain: SecItemStore {
181
181
// MARK: - GenericPassword
182
182
183
183
extension Keychain : SecDataStore {
184
- public func store< T: SecDataConvertible > ( _ data: T , query: SecItemQuery < GenericPassword > , accessPolicy: SecAccessPolicy = . default) throws {
184
+ public func store< T: SecDataConvertible > ( _ data: T , query: SecItemQuery < GenericPassword > , accessPolicy: AccessPolicy = . default) throws {
185
185
try store ( . data( data. rawRepresentation) , query: query, accessPolicy: accessPolicy)
186
186
}
187
187
@@ -202,7 +202,7 @@ extension Keychain: SecDataStore {
202
202
// MARK: - InternetPassword
203
203
204
204
extension Keychain {
205
- public func store< T: SecDataConvertible > ( _ data: T , query: SecItemQuery < InternetPassword > , accessPolicy: SecAccessPolicy = . default) throws {
205
+ public func store< T: SecDataConvertible > ( _ data: T , query: SecItemQuery < InternetPassword > , accessPolicy: AccessPolicy = . default) throws {
206
206
try store ( . data( data. rawRepresentation) , query: query, accessPolicy: accessPolicy)
207
207
}
208
208
@@ -223,7 +223,7 @@ extension Keychain {
223
223
// MARK: - SecKey
224
224
225
225
extension Keychain : SecKeyStore {
226
- public func store< T: SecKeyConvertible > ( _ data: T , query: SecItemQuery < SecKey > , accessPolicy: SecAccessPolicy = . default) throws {
226
+ public func store< T: SecKeyConvertible > ( _ data: T , query: SecItemQuery < SecKey > , accessPolicy: AccessPolicy = . default) throws {
227
227
var error : Unmanaged < CFError > ?
228
228
guard
229
229
let key: AnyObject = SecKeyCreateWithData ( data. x963Representation as CFData , query. rawValue as CFDictionary , & error)
@@ -259,7 +259,7 @@ extension Keychain: SecKeyStore {
259
259
// MARK: - SecCertificate
260
260
261
261
extension Keychain : SecCertificateStore {
262
- public func store< T: SecCertificateConvertible > ( _ data: T , query: SecItemQuery < SecCertificate > , accessPolicy: SecAccessPolicy = . default) throws {
262
+ public func store< T: SecCertificateConvertible > ( _ data: T , query: SecItemQuery < SecCertificate > , accessPolicy: AccessPolicy = . default) throws {
263
263
guard let certificate = SecCertificateCreateWithData ( nil , data. derRepresentation as CFData ) else {
264
264
throw SwiftSecurityError . invalidParameter
265
265
}
@@ -307,7 +307,7 @@ extension Keychain: SecIdentityStore {
307
307
}
308
308
}
309
309
310
- public func store( _ item: PKCS12 . SecImportItem , query: SecItemQuery < SecIdentity > , accessPolicy: SecAccessPolicy = . default) throws {
310
+ public func store( _ item: PKCS12 . SecImportItem , query: SecItemQuery < SecIdentity > , accessPolicy: AccessPolicy = . default) throws {
311
311
guard let identity = item. identity else {
312
312
throw SwiftSecurityError . invalidParameter
313
313
}
@@ -334,7 +334,7 @@ extension Keychain: SecIdentityStore {
334
334
// MARK: - Private
335
335
336
336
private extension Keychain {
337
- func store< SecItem> ( _ value: SecValue < SecItem > , query: SecItemQuery < SecItem > , accessPolicy: SecAccessPolicy ) throws {
337
+ func store< SecItem> ( _ value: SecValue < SecItem > , query: SecItemQuery < SecItem > , accessPolicy: AccessPolicy ) throws {
338
338
var query = query
339
339
query [ . accessGroup] = accessGroup. rawValue
340
340
query [ . accessControl] = try accessPolicy. accessControl
@@ -455,7 +455,7 @@ extension Keychain {
455
455
456
456
switch attribute {
457
457
case . accessible:
458
- return SecAccessPolicy . Accessibility ( rawValue: rawValue)
458
+ return AccessPolicy . Accessibility ( rawValue: rawValue)
459
459
case . protocolType:
460
460
return ProtocolType ( rawValue: rawValue)
461
461
case . authenticationType:
0 commit comments