Skip to content

Commit bdfff32

Browse files
committed
fix: Use correct names when getting encryption parameters
It's 'encryption_key' for key file and 'encryption_password' for password/passphrase.
1 parent 38b680b commit bdfff32

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:
@@ -1630,8 +1630,8 @@ def _look_up_device(self):
16301630

16311631
# Apply encryption keys as appropriate
16321632
if any(d.encrypted for d in self._device.parents):
1633-
passphrase = self._pool.get("encryption_passphrase")
1634-
key_file = self._pool.get("encryption_key_file")
1633+
passphrase = self._pool.get("encryption_password")
1634+
key_file = self._pool.get("encryption_key")
16351635
for member in self._device.parents:
16361636
if member.parents[0].format.type == "luks":
16371637
if passphrase:
@@ -1655,8 +1655,8 @@ def _update_from_device(self, param_name):
16551655
self._pool['encryption'] = encrypted
16561656
elif param_name == 'encryption_key_size' and encrypted:
16571657
self._pool['encryption_key_size'] = self._device.parents[0].parents[0].format.key_size
1658-
elif param_name == 'encryption_key_file' and encrypted:
1659-
self._pool['encryption_key_file'] = self._device.parents[0].parents[0].format.key_file
1658+
elif param_name == 'encryption_key' and encrypted:
1659+
self._pool['encryption_key'] = self._device.parents[0].parents[0].format.key_file
16601660
elif param_name == 'encryption_cipher' and encrypted:
16611661
self._pool['encryption_cipher'] = self._device.parents[0].parents[0].format.cipher
16621662
elif param_name == 'encryption_luks_version' and encrypted:

0 commit comments

Comments
 (0)