This commit is contained in:
Max Goedjen 2020-03-06 01:05:20 -08:00
parent a6ed2a6ef7
commit 249ac3458a
No known key found for this signature in database
GPG Key ID: E58C21DD77B9B8E8

View File

@ -77,8 +77,7 @@ extension SmartCard.Store {
kSecReturnAttributes: true kSecReturnAttributes: true
] as CFDictionary ] as CFDictionary
var untyped: CFTypeRef? var untyped: CFTypeRef?
let status = SecItemCopyMatching(attributes, &untyped) SecItemCopyMatching(attributes, &untyped)
print(status)
guard let typed = untyped as? [[CFString: Any]] else { return } guard let typed = untyped as? [[CFString: Any]] else { return }
let wrapped: [SmartCard.Secret] = typed.map { let wrapped: [SmartCard.Secret] = typed.map {
let name = $0[kSecAttrLabel] as? String ?? "Unnamed" let name = $0[kSecAttrLabel] as? String ?? "Unnamed"