@@ -181,7 +181,7 @@ extension Keychain: SecItemStore {
181181// MARK: - GenericPassword
182182
183183extension 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 {
185185 try store ( . data( data. rawRepresentation) , query: query, accessPolicy: accessPolicy)
186186 }
187187
@@ -202,7 +202,7 @@ extension Keychain: SecDataStore {
202202// MARK: - InternetPassword
203203
204204extension 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 {
206206 try store ( . data( data. rawRepresentation) , query: query, accessPolicy: accessPolicy)
207207 }
208208
@@ -223,7 +223,7 @@ extension Keychain {
223223// MARK: - SecKey
224224
225225extension 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 {
227227 var error : Unmanaged < CFError > ?
228228 guard
229229 let key: AnyObject = SecKeyCreateWithData ( data. x963Representation as CFData , query. rawValue as CFDictionary , & error)
@@ -259,7 +259,7 @@ extension Keychain: SecKeyStore {
259259// MARK: - SecCertificate
260260
261261extension 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 {
263263 guard let certificate = SecCertificateCreateWithData ( nil , data. derRepresentation as CFData ) else {
264264 throw SwiftSecurityError . invalidParameter
265265 }
@@ -307,7 +307,7 @@ extension Keychain: SecIdentityStore {
307307 }
308308 }
309309
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 {
311311 guard let identity = item. identity else {
312312 throw SwiftSecurityError . invalidParameter
313313 }
@@ -334,7 +334,7 @@ extension Keychain: SecIdentityStore {
334334// MARK: - Private
335335
336336private 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 {
338338 var query = query
339339 query [ . accessGroup] = accessGroup. rawValue
340340 query [ . accessControl] = try accessPolicy. accessControl
@@ -455,7 +455,7 @@ extension Keychain {
455455
456456 switch attribute {
457457 case . accessible:
458- return SecAccessPolicy . Accessibility ( rawValue: rawValue)
458+ return AccessPolicy . Accessibility ( rawValue: rawValue)
459459 case . protocolType:
460460 return ProtocolType ( rawValue: rawValue)
461461 case . authenticationType:
0 commit comments