This commit is contained in:
Max Goedjen
2026-06-11 12:40:57 -07:00
parent 3ad23b0506
commit a66db7fe2e
12 changed files with 66 additions and 142 deletions

View File

@@ -365,6 +365,16 @@
},
"shouldTranslate" : false
},
"%@ - %@" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "%1$@ - %2$@"
}
}
}
},
"about_build_log_button" : {
"extractionState" : "manual",
"localizations" : {
@@ -19967,6 +19977,12 @@
}
}
}
},
"Review" : {
},
"Review All" : {
},
"secret_detail_certificate_path_label" : {
"extractionState" : "manual",

View File

@@ -35,13 +35,15 @@ import XPCWrappers
self.osVersion = osVersion
self.currentVersion = currentVersion
Task {
if checkOnLaunch {
try await checkForUpdates()
}
while !Task.isCancelled {
try? await Task.sleep(for: .seconds(Int(checkFrequency)))
try await checkForUpdates()
}
do {
if checkOnLaunch {
try await checkForUpdates()
}
while !Task.isCancelled {
try? await Task.sleep(for: .seconds(Int(checkFrequency)))
try await checkForUpdates()
}
} catch {}
}
}

View File

@@ -10,11 +10,8 @@ import SSHProtocolKit
public final class Agent: Sendable {
private let storeList: SecretStoreList
<<<<<<< HEAD
private let authenticationHandler: AuthenticationHandler
=======
private let certificateStore: CertificateStore
>>>>>>> main
private let witness: SigningWitness?
private let publicKeyWriter = OpenSSHPublicKeyWriter()
private let signatureWriter = OpenSSHSignatureWriter()
@@ -24,17 +21,16 @@ public final class Agent: Sendable {
/// - Parameters:
/// - storeList: The `SecretStoreList` to make available.
/// - witness: A witness to notify of requests.
<<<<<<< HEAD
public init(storeList: SecretStoreList, authenticationHandler: AuthenticationHandler, witness: SigningWitness? = nil) {
logger.debug("Agent is running")
self.storeList = storeList
self.authenticationHandler = authenticationHandler
=======
public init(storeList: SecretStoreList, certificateStore: CertificateStore, witness: SigningWitness? = nil) {
public init(
storeList: SecretStoreList,
certificateStore: CertificateStore,
authenticationHandler: AuthenticationHandler,
witness: SigningWitness? = nil
) {
logger.debug("Agent is running")
self.storeList = storeList
self.certificateStore = certificateStore
>>>>>>> main
self.authenticationHandler = authenticationHandler
self.witness = witness
}

View File

@@ -75,6 +75,7 @@ public actor AuthenticationHandler {
}
public func waitForAuthentication(for request: SignatureRequest) async throws -> any AuthenticationContextProtocol {
logger.log("Entering waitForAuthentication for \(request.id)")
if let existing = existingAuthenticationContext(for: request) {
logger.log("Short circuiting wait, existing valid context already exists.")
return existing

View File

@@ -94,7 +94,7 @@ extension SocketController {
guard !data.isEmpty else {
logger.debug("Socket controller received empty data, ending continuation.")
messagesContinuation.finish()
try fileHandle.close()
try? fileHandle.close()
return
}
messagesContinuation.yield(data)
@@ -126,8 +126,8 @@ private extension SocketPort {
convenience init(path: String) {
var addr = sockaddr_un()
let length = unsafe withUnsafeMutablePointer(to: &addr.sun_path.0) { pointer in
unsafe path.withCString { cstring in
let length = withUnsafeMutablePointer(to: &addr.sun_path.0) { pointer in
path.withCString { cstring in
let len = unsafe strlen(cstring)
unsafe strncpy(pointer, cstring, len)
return len