Skip to content

Commit

Permalink
secboot: remove dead mock for secboot.AddRecoveryKeyToLUKS2Container
Browse files Browse the repository at this point in the history
Its use was removed in 3988a93 which was in PR #11715
  • Loading branch information
valentindavid committed Aug 22, 2024
1 parent 5c4bd6b commit 4b5bc57
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
3 changes: 1 addition & 2 deletions secboot/encrypt_sb.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ import (
)

var (
sbInitializeLUKS2Container = sb.InitializeLUKS2Container
sbAddRecoveryKeyToLUKS2Container = sb.AddRecoveryKeyToLUKS2Container
sbInitializeLUKS2Container = sb.InitializeLUKS2Container
)

const keyslotsAreaKiBSize = 2560 // 2.5MB
Expand Down
8 changes: 0 additions & 8 deletions secboot/export_sb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,6 @@ func MockSbInitializeLUKS2Container(f func(devicePath, label string, key []byte,
}
}

func MockSbAddRecoveryKeyToLUKS2Container(f func(devicePath string, key []byte, recoveryKey sb.RecoveryKey, opts *sb.KDFOptions) error) (restore func()) {
old := sbAddRecoveryKeyToLUKS2Container
sbAddRecoveryKeyToLUKS2Container = f
return func() {
sbAddRecoveryKeyToLUKS2Container = old
}
}

func MockIsTPMEnabled(f func(tpm *sb_tpm2.Connection) bool) (restore func()) {
old := isTPMEnabled
isTPMEnabled = f
Expand Down

0 comments on commit 4b5bc57

Please sign in to comment.