Rename encryption method (#1888)
* Rename encryption method * Update --------- Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
This commit is contained in:
parent
4eae8f656f
commit
885f89c3a1
|
|
@ -777,13 +777,12 @@ class DeviceModification:
|
||||||
|
|
||||||
class EncryptionType(Enum):
|
class EncryptionType(Enum):
|
||||||
NoEncryption = "no_encryption"
|
NoEncryption = "no_encryption"
|
||||||
Partition = "partition"
|
Luks = "luks"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _encryption_type_mapper(cls) -> Dict[str, 'EncryptionType']:
|
def _encryption_type_mapper(cls) -> Dict[str, 'EncryptionType']:
|
||||||
return {
|
return {
|
||||||
# str(_('Full disk encryption')): EncryptionType.FullDiskEncryption,
|
'Luks': EncryptionType.Luks
|
||||||
str(_('Partition encryption')): EncryptionType.Partition
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
@ -800,7 +799,7 @@ class EncryptionType(Enum):
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class DiskEncryption:
|
class DiskEncryption:
|
||||||
encryption_type: EncryptionType = EncryptionType.Partition
|
encryption_type: EncryptionType = EncryptionType.Luks
|
||||||
encryption_password: str = ''
|
encryption_password: str = ''
|
||||||
partitions: List[PartitionModification] = field(default_factory=list)
|
partitions: List[PartitionModification] = field(default_factory=list)
|
||||||
hsm_device: Optional[Fido2Device] = None
|
hsm_device: Optional[Fido2Device] = None
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ class DiskEncryptionMenu(AbstractSubMenu):
|
||||||
def select_encryption_type(preset: EncryptionType) -> Optional[EncryptionType]:
|
def select_encryption_type(preset: EncryptionType) -> Optional[EncryptionType]:
|
||||||
title = str(_('Select disk encryption option'))
|
title = str(_('Select disk encryption option'))
|
||||||
options = [
|
options = [
|
||||||
EncryptionType.type_to_text(EncryptionType.Partition)
|
EncryptionType.type_to_text(EncryptionType.Luks)
|
||||||
]
|
]
|
||||||
|
|
||||||
preset_value = EncryptionType.type_to_text(preset)
|
preset_value = EncryptionType.type_to_text(preset)
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ def parse_disk_encryption():
|
||||||
partitions += list(filter(lambda x: x.mountpoint != Path('/boot'), mod.partitions))
|
partitions += list(filter(lambda x: x.mountpoint != Path('/boot'), mod.partitions))
|
||||||
|
|
||||||
archinstall.arguments['disk_encryption'] = disk.DiskEncryption(
|
archinstall.arguments['disk_encryption'] = disk.DiskEncryption(
|
||||||
encryption_type=disk.EncryptionType.Partition,
|
encryption_type=disk.EncryptionType.Luks,
|
||||||
encryption_password=enc_password,
|
encryption_password=enc_password,
|
||||||
partitions=partitions
|
partitions=partitions
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ disk_config = disk.DiskLayoutConfiguration(
|
||||||
# disk encryption configuration (Optional)
|
# disk encryption configuration (Optional)
|
||||||
disk_encryption = disk.DiskEncryption(
|
disk_encryption = disk.DiskEncryption(
|
||||||
encryption_password="enc_password",
|
encryption_password="enc_password",
|
||||||
encryption_type=disk.EncryptionType.Partition,
|
encryption_type=disk.EncryptionType.Luks,
|
||||||
partitions=[home_partition],
|
partitions=[home_partition],
|
||||||
hsm_device=None
|
hsm_device=None
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ def parse_disk_encryption():
|
||||||
partitions += list(filter(lambda x: x.mountpoint != Path('/boot'), mod.partitions))
|
partitions += list(filter(lambda x: x.mountpoint != Path('/boot'), mod.partitions))
|
||||||
|
|
||||||
archinstall.arguments['disk_encryption'] = disk.DiskEncryption(
|
archinstall.arguments['disk_encryption'] = disk.DiskEncryption(
|
||||||
encryption_type=disk.EncryptionType.Partition,
|
encryption_type=disk.EncryptionType.Luks,
|
||||||
encryption_password=enc_password,
|
encryption_password=enc_password,
|
||||||
partitions=partitions
|
partitions=partitions
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue