Unverified Commit 0cd28c07 authored by Davide De Rosa's avatar Davide De Rosa Committed by GitHub
Browse files

Merge pull request #1 from pia-foss/relax-keychain-access-level

Relax keychain access level
parents 2a0585a2 fe3771ee
...@@ -66,6 +66,7 @@ public class Keychain { ...@@ -66,6 +66,7 @@ public class Keychain {
setScope(query: &query) setScope(query: &query)
query[kSecClass as String] = kSecClassGenericPassword query[kSecClass as String] = kSecClassGenericPassword
query[kSecAttrAccount as String] = username query[kSecAttrAccount as String] = username
query[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
query[kSecValueData as String] = password.data(using: .utf8) query[kSecValueData as String] = password.data(using: .utf8)
let status = SecItemAdd(query as CFDictionary, nil) let status = SecItemAdd(query as CFDictionary, nil)
...@@ -91,6 +92,7 @@ public class Keychain { ...@@ -91,6 +92,7 @@ public class Keychain {
setScope(query: &query) setScope(query: &query)
query[kSecClass as String] = kSecClassGenericPassword query[kSecClass as String] = kSecClassGenericPassword
query[kSecAttrAccount as String] = username query[kSecAttrAccount as String] = username
query[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
query[kSecMatchLimit as String] = kSecMatchLimitOne query[kSecMatchLimit as String] = kSecMatchLimitOne
query[kSecReturnData as String] = true query[kSecReturnData as String] = true
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment