diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-03-01 15:09:09 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-03-01 15:09:09 +0000 |
commit | 57d57860a81e620db083d6a45ecc32dc3e69da55 (patch) | |
tree | 3dc6bed0cbf46b6a67f11218f5e1e7de5b94938f /perl-install/diskdrake/interactive.pm | |
parent | 289056715adc5bcf16d138c0165bc35a658e3077 (diff) | |
download | drakx-backup-do-not-use-57d57860a81e620db083d6a45ecc32dc3e69da55.tar drakx-backup-do-not-use-57d57860a81e620db083d6a45ecc32dc3e69da55.tar.gz drakx-backup-do-not-use-57d57860a81e620db083d6a45ecc32dc3e69da55.tar.bz2 drakx-backup-do-not-use-57d57860a81e620db083d6a45ecc32dc3e69da55.tar.xz drakx-backup-do-not-use-57d57860a81e620db083d6a45ecc32dc3e69da55.zip |
allow to choose encryption algorithm (#13472)
Diffstat (limited to 'perl-install/diskdrake/interactive.pm')
-rw-r--r-- | perl-install/diskdrake/interactive.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index d48379ed9..5ed05a39e 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -948,8 +948,8 @@ sub Options { if (!check($in, $hd, $part, $all_hds)) { $options->{encrypted} = 0; } elsif (!$part->{encrypt_key} && !isSwap($part)) { - if (my $encrypt_key = choose_encrypt_key($in)) { - $options->{'encryption='} = 'AES128'; + if (my ($encrypt_key, $encrypt_algo) = choose_encrypt_key($in)) { + $options->{'encryption='} = $encrypt_algo; $part->{encrypt_key} = $encrypt_key; } else { $options->{encrypted} = 0; @@ -1260,6 +1260,9 @@ sub choose_encrypt_key { my ($in) = @_; my ($encrypt_key, $encrypt_key2); + my @algorithms = map { "AES$_" } 128, 196, 256, 512, 1024, 2048; + my $encrypt_algo = "AES128"; + $in->ask_from_( { title => N("Filesystem encryption key"), @@ -1272,7 +1275,8 @@ sub choose_encrypt_key { } } }, [ { label => N("Encryption key"), val => \$encrypt_key, hidden => 1 }, { label => N("Encryption key (again)"), val => \$encrypt_key2, hidden => 1 }, - ]) && $encrypt_key; +{ label => N("Encryption algorithm"), type => 'list', val => \$encrypt_algo, list => \@algorithms } + ]) && ($encrypt_key, $encrypt_algo); } |