mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-03 12:36:09 -04:00
AB#1902 Ping Coordinator from initramfs for key (#53)
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
7e990fb91a
commit
49a1a07049
20 changed files with 827 additions and 267 deletions
|
@ -36,6 +36,16 @@ func (m *Mapper) Close() error {
|
|||
return errors.New("unable to close crypt device")
|
||||
}
|
||||
|
||||
// IsLUKSDevice returns true if the device is formatted as a LUKS device.
|
||||
func (m *Mapper) IsLUKSDevice() bool {
|
||||
return m.device.Load(cryptsetup.LUKS2{}) == nil
|
||||
}
|
||||
|
||||
// GetUUID gets the device's UUID.
|
||||
func (m *Mapper) DiskUUID() string {
|
||||
return m.device.GetUUID()
|
||||
}
|
||||
|
||||
// FormatDisk formats the disk and adds passphrase in keyslot 0.
|
||||
func (m *Mapper) FormatDisk(passphrase string) error {
|
||||
luksParams := cryptsetup.LUKS2{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue