Skip to content

Commit 5137e76

Browse files
vojtechtrefnyrichm
authored andcommitted
fix: Use correct names when getting encryption parameters
It's 'encryption_key' for key file and 'encryption_password' for password/passphrase.
1 parent f596c73 commit 5137e76

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

library/blivet.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,8 @@ def _update_from_device(self, param_name):
704704
self._volume['encryption'] = encrypted
705705
elif param_name == 'encryption_key_size' and encrypted:
706706
self._volume['encryption_key_size'] = luks_fmt.key_size
707-
elif param_name == 'encryption_key_file' and encrypted:
708-
self._volume['encryption_key_file'] = luks_fmt.key_file
707+
elif param_name == 'encryption_key' and encrypted:
708+
self._volume['encryption_key'] = luks_fmt.key_file
709709
elif param_name == 'encryption_cipher' and encrypted:
710710
self._volume['encryption_cipher'] = luks_fmt.cipher
711711
elif param_name == 'encryption_luks_version' and encrypted:
@@ -1633,8 +1633,8 @@ def _look_up_device(self):
16331633

16341634
# Apply encryption keys as appropriate
16351635
if any(d.encrypted for d in self._device.parents):
1636-
passphrase = self._pool.get("encryption_passphrase")
1637-
key_file = self._pool.get("encryption_key_file")
1636+
passphrase = self._pool.get("encryption_password")
1637+
key_file = self._pool.get("encryption_key")
16381638
for member in self._device.parents:
16391639
if member.parents[0].format.type == "luks":
16401640
if passphrase:
@@ -1658,8 +1658,8 @@ def _update_from_device(self, param_name):
16581658
self._pool['encryption'] = encrypted
16591659
elif param_name == 'encryption_key_size' and encrypted:
16601660
self._pool['encryption_key_size'] = self._device.parents[0].parents[0].format.key_size
1661-
elif param_name == 'encryption_key_file' and encrypted:
1662-
self._pool['encryption_key_file'] = self._device.parents[0].parents[0].format.key_file
1661+
elif param_name == 'encryption_key' and encrypted:
1662+
self._pool['encryption_key'] = self._device.parents[0].parents[0].format.key_file
16631663
elif param_name == 'encryption_cipher' and encrypted:
16641664
self._pool['encryption_cipher'] = self._device.parents[0].parents[0].format.cipher
16651665
elif param_name == 'encryption_luks_version' and encrypted:

0 commit comments

Comments
 (0)