Fix keyType constants being Data instead of String, specify in update calls (#830)

This commit is contained in:
Max Goedjen
2026-09-07 16:48:57 -07:00
committed by GitHub
parent 6122662b23
commit 59aca9327f
2 changed files with 4 additions and 2 deletions

View File

@@ -67,6 +67,7 @@ import SecretKit
public func update(certificate: Certificate) throws {
let updateQuery = KeychainDictionary([
kSecClass: Constants.keyClass,
kSecAttrService: Constants.keyTag,
kSecAttrAccount: certificate.id,
])
@@ -134,7 +135,7 @@ extension CertificateStore {
enum Constants {
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
}

View File

@@ -183,6 +183,7 @@ extension SecureEnclave {
let attributes = try JSONEncoder().encode(attributes)
let updatedAttributes = KeychainDictionary([
kSecAttrLabel: name,
kSecAttrService: Constants.keyTag,
kSecAttrGeneric: attributes,
])
@@ -294,7 +295,7 @@ extension SecureEnclave.Store {
enum Constants {
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
}