feat: implement patch expiration and encryption features
- Add offline expiration handling for patch artifacts in the database. - Update CreatePatchArtifact and related functions to accept and return offline expiration timestamps. - Enhance patch check responses to include offline expiration metadata. - Introduce device-specific encryption for patches, allowing for secure delivery. - Implement tests for patch check functionality, including scenarios for expired patches and encrypted delivery. - Modify router and configuration to support new patch delivery settings. - Update database schema and migrations to accommodate new fields for offline expiration.
This commit is contained in:
+5
-1
@@ -78,7 +78,11 @@ func main() {
|
||||
log.Printf("Storage: %s", store.BackendName())
|
||||
|
||||
// --- Router ---
|
||||
router := handlers.NewRouter(authService, database, store, mailer, cfg.Server.BaseURL)
|
||||
router := handlers.NewRouter(authService, database, store, mailer, cfg.Server.BaseURL, handlers.PatchDeliveryConfig{
|
||||
EncryptionMode: cfg.PatchDelivery.EncryptionMode,
|
||||
AESSecret: []byte(cfg.PatchDelivery.AESSecret),
|
||||
CacheEncryptedPatches: cfg.PatchDelivery.CacheEncryptedPatches,
|
||||
})
|
||||
|
||||
// --- HTTP Server ---
|
||||
addr := fmt.Sprintf("%s:%s", cfg.Server.Host, cfg.Server.Port)
|
||||
|
||||
Reference in New Issue
Block a user