fix: Remove misleading TODO comment from handleUpdateAgent
The TODO claimed update system was a "placeholder" but the code that follows implements complete functionality: - downloadUpdatePackage() downloads the package - computeSHA256() verifies checksum - verifyBinarySignature() with ed25519.Verify() checks signature - installNewBinary() performs atomic installation - Full rollback/cleanup with defer on failure The comment was incorrect and misleading about the code quality.
This commit is contained in:
@@ -652,9 +652,6 @@ func handleUpdateAgent(apiClient *client.Client, cfg *config.Config, ackTracker
|
|||||||
log.Printf("Failed to report update start log: %v\n", err)
|
log.Printf("Failed to report update start log: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Implement actual download, signature verification, and update installation
|
|
||||||
// This is a placeholder that simulates the update process
|
|
||||||
// Phase 5: Actual Ed25519-signed update implementation
|
|
||||||
log.Printf("Starting secure update process for version %s", version)
|
log.Printf("Starting secure update process for version %s", version)
|
||||||
log.Printf("Download URL: %s", downloadURL)
|
log.Printf("Download URL: %s", downloadURL)
|
||||||
log.Printf("Signature: %s...", signature[:16]) // Log first 16 chars of signature
|
log.Printf("Signature: %s...", signature[:16]) // Log first 16 chars of signature
|
||||||
|
|||||||
Reference in New Issue
Block a user