Skip to content

Commit

Permalink
coordinator: remove obsolete GetRecoveryData
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasten committed Jan 15, 2025
1 parent c0ea5c1 commit 183281e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
8 changes: 0 additions & 8 deletions coordinator/clientapi/clientapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,13 +638,6 @@ func (a *ClientAPI) UpdateManifest(ctx context.Context, rawUpdateManifest []byte
return fmt.Errorf("regenerating shared secrets for updated manifest: %w", err)
}

// Retrieve current recovery data before we seal the state again
currentRecoveryData, err := a.recovery.GetRecoveryData()
if err != nil {
a.log.Error("Could not retrieve the current recovery data from the recovery module. Cannot reseal the state, the update manifest will not be applied.")
return fmt.Errorf("retrieving current recovery data: %w", err)
}

a.updateLog.Reset()
for pkgName, pkg := range updateManifest.Packages {
a.updateLog.Info("SecurityVersion increased", zap.String("user", updater.Name()), zap.String("package", pkgName), zap.Uint("new version", *pkg.SecurityVersion))
Expand Down Expand Up @@ -679,7 +672,6 @@ func (a *ClientAPI) UpdateManifest(ctx context.Context, rawUpdateManifest []byte
a.log.Info("An update manifest overriding package settings from the original manifest was set.")
a.log.Info("Please restart your Marbles to enforce the update.")

a.txHandle.SetRecoveryData(currentRecoveryData)
if err := commit(ctx); err != nil {
return fmt.Errorf("updating manifest failed: committing store transaction: %w", err)
}
Expand Down
1 change: 0 additions & 1 deletion coordinator/recovery/recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ type Recovery interface {
GenerateEncryptionKey(recoveryKeys map[string]string) ([]byte, error)
GenerateRecoveryData(recoveryKeys map[string]string) (map[string][]byte, []byte, error)
RecoverKey(secret []byte) (int, []byte, error)
GetRecoveryData() ([]byte, error)
SetRecoveryData(data []byte) error
}

Expand Down
5 changes: 0 additions & 5 deletions coordinator/recovery/single.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ func (r *SinglePartyRecovery) RecoverKey(secret []byte) (int, []byte, error) {
return 0, secret, nil
}

// GetRecoveryData returns the current recovery hash map. Given that we do not need to store any additional data in the state for Single Party Recovery, it does nothing here.
func (r *SinglePartyRecovery) GetRecoveryData() ([]byte, error) {
return nil, nil
}

// SetRecoveryData sets the recovery hash map retrieved from the sealer on (failed) decryption. Given that we do not need to store any additional data in the state for Single Party Recovery, it does nothing here.
func (r *SinglePartyRecovery) SetRecoveryData(_ []byte) error {
return nil
Expand Down

0 comments on commit 183281e

Please sign in to comment.