Documentation ¶
Index ¶
- Constants
- Variables
- func DataSealedKeyUnder(deviceFDEDir string) string
- func FactoryResetFallbackSaveSealedKeyUnder(seedDeviceFDEDir string) string
- func FallbackDataSealedKeyUnder(seedDeviceFDEDir string) string
- func FallbackSaveSealedKeyUnder(seedDeviceFDEDir string) string
- func HasEncryptedMarkerUnder(deviceFDEDir string) bool
- func ReadEncryptionMarkers(dataFDEDir, saveFDEDir string) ([]byte, []byte, error)
- func RecoveryKeyUnder(deviceFDEDir string) string
- func SaveKeyUnder(deviceFDEDir string) string
- func StampSealedKeys(rootdir string, content SealingMethod) error
- func TpmLockoutAuthUnder(saveDeviceFDEDir string) string
- func WriteEncryptionMarkers(dataFDEDir, saveFDEDir string, markerSecret []byte) error
- type SealingMethod
Constants ¶
const ( SealingMethodLegacyTPM = SealingMethod("") SealingMethodTPM = SealingMethod("tpm") SealingMethodFDESetupHook = SealingMethod("fde-setup-hook") )
Variables ¶
var ErrNoSealedKeys = errors.New("no sealed keys")
/ ErrNoSealedKeys error if there are no sealed keys
Functions ¶
func DataSealedKeyUnder ¶
DataSealedKeyUnder returns the path of the sealed key for ubuntu-data.
func FactoryResetFallbackSaveSealedKeyUnder ¶
FactoryResetFallbackSaveSealedKeyUnder returns the path of a fallback ubuntu save key object generated during factory reset.
func FallbackDataSealedKeyUnder ¶
FallbackDataSealedKeyUnder returns the path of a fallback ubuntu data key.
func FallbackSaveSealedKeyUnder ¶
FallbackSaveSealedKeyUnder returns the path of a fallback ubuntu save key.
func HasEncryptedMarkerUnder ¶
HasEncryptedMarkerUnder returns true when there is an encryption marker in a given directory.
func ReadEncryptionMarkers ¶
ReadEncryptionMarkers reads the encryption marker files at the appropriate locations.
func RecoveryKeyUnder ¶
RecoveryKeyUnder returns the path of the recovery key.
func SaveKeyUnder ¶
SaveKeyUnder returns the path of a plain encryption key for ubuntu-save.
func StampSealedKeys ¶
func StampSealedKeys(rootdir string, content SealingMethod) error
StampSealedKeys writes what sealing method was used for key sealing
func TpmLockoutAuthUnder ¶
TpmLockoutAuthUnder return the path of the tpm lockout authority key.
func WriteEncryptionMarkers ¶
WriteEncryptionMarkers writes the encryption marker files at the appropriate locations.
Types ¶
type SealingMethod ¶
type SealingMethod string
SealingMethod represents the sealing method
func SealedKeysMethod ¶
func SealedKeysMethod(rootdir string) (sm SealingMethod, err error)
SealedKeysMethod return whether any keys were sealed at all