mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-09-10 10:29:02 +02:00
Fix keyType constants being Data instead of String, specify in update calls (#830)
This commit is contained in:
@@ -67,6 +67,7 @@ import SecretKit
|
|||||||
public func update(certificate: Certificate) throws {
|
public func update(certificate: Certificate) throws {
|
||||||
let updateQuery = KeychainDictionary([
|
let updateQuery = KeychainDictionary([
|
||||||
kSecClass: Constants.keyClass,
|
kSecClass: Constants.keyClass,
|
||||||
|
kSecAttrService: Constants.keyTag,
|
||||||
kSecAttrAccount: certificate.id,
|
kSecAttrAccount: certificate.id,
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -134,7 +135,7 @@ extension CertificateStore {
|
|||||||
|
|
||||||
enum Constants {
|
enum Constants {
|
||||||
static let keyClass = kSecClassGenericPassword as String
|
static let keyClass = kSecClassGenericPassword as String
|
||||||
static let keyTag = Data("com.maxgoedjen.certificatestore.opensshcertificate".utf8)
|
static let keyTag = "com.maxgoedjen.certificatestore.opensshcertificate"
|
||||||
static let notificationToken = UUID().uuidString
|
static let notificationToken = UUID().uuidString
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ extension SecureEnclave {
|
|||||||
let attributes = try JSONEncoder().encode(attributes)
|
let attributes = try JSONEncoder().encode(attributes)
|
||||||
let updatedAttributes = KeychainDictionary([
|
let updatedAttributes = KeychainDictionary([
|
||||||
kSecAttrLabel: name,
|
kSecAttrLabel: name,
|
||||||
|
kSecAttrService: Constants.keyTag,
|
||||||
kSecAttrGeneric: attributes,
|
kSecAttrGeneric: attributes,
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -294,7 +295,7 @@ extension SecureEnclave.Store {
|
|||||||
|
|
||||||
enum Constants {
|
enum Constants {
|
||||||
static let keyClass = kSecClassGenericPassword as String
|
static let keyClass = kSecClassGenericPassword as String
|
||||||
static let keyTag = Data("com.maxgoedjen.secretive.secureenclave.key".utf8)
|
static let keyTag = "com.maxgoedjen.secretive.secureenclave.key"
|
||||||
static let notificationToken = UUID().uuidString
|
static let notificationToken = UUID().uuidString
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user