mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-05 07:45:27 -04:00
cryptsetup: unify code (#2043)
* Add common backend for interacting with cryptsetup * Use common cryptsetup backend in bootstrapper * Use common cryptsetup backend in disk-mapper * Use common cryptsetup backend in csi lib --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
f52c6752e2
commit
ac1128d07f
34 changed files with 1061 additions and 1307 deletions
|
@ -360,8 +360,8 @@ type fakeDisk struct {
|
|||
wantKey []byte
|
||||
}
|
||||
|
||||
func (d *fakeDisk) Open() error {
|
||||
return nil
|
||||
func (d *fakeDisk) Open() (func(), error) {
|
||||
return func() {}, nil
|
||||
}
|
||||
|
||||
func (d *fakeDisk) Close() error {
|
||||
|
@ -381,19 +381,14 @@ func (d *fakeDisk) UpdatePassphrase(passphrase string) error {
|
|||
|
||||
type stubDisk struct {
|
||||
openErr error
|
||||
closeErr error
|
||||
uuid string
|
||||
uuidErr error
|
||||
updatePassphraseErr error
|
||||
updatePassphraseCalled bool
|
||||
}
|
||||
|
||||
func (d *stubDisk) Open() error {
|
||||
return d.openErr
|
||||
}
|
||||
|
||||
func (d *stubDisk) Close() error {
|
||||
return d.closeErr
|
||||
func (d *stubDisk) Open() (func(), error) {
|
||||
return func() {}, d.openErr
|
||||
}
|
||||
|
||||
func (d *stubDisk) UUID() (string, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue