mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 14:26:23 -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
|
@ -14,7 +14,7 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/edgelesssys/constellation/v2/disk-mapper/internal/mapper"
|
||||
"github.com/edgelesssys/constellation/v2/disk-mapper/internal/diskencryption"
|
||||
"github.com/edgelesssys/constellation/v2/disk-mapper/internal/recoveryserver"
|
||||
"github.com/edgelesssys/constellation/v2/disk-mapper/internal/rejoinclient"
|
||||
"github.com/edgelesssys/constellation/v2/disk-mapper/internal/setup"
|
||||
|
@ -119,11 +119,11 @@ func main() {
|
|||
}
|
||||
|
||||
// initialize device mapper
|
||||
mapper, err := mapper.New(diskPath, log)
|
||||
mapper, free, err := diskencryption.New(diskPath, log)
|
||||
if err != nil {
|
||||
log.With(zap.Error(err)).Fatalf("Failed to initialize device mapper")
|
||||
}
|
||||
defer mapper.Close()
|
||||
defer free()
|
||||
|
||||
// Use TDX if available
|
||||
openDevice := vtpm.OpenVTPM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue