mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-12-22 18:18:59 +00:00
important fix for backward compatibility to 1.2
a grave bug has been affecting 1.3 and 1.3.1 releases, which makes keys created with those versions incompatible with other Tomb versions. This bug is now fixed and Tomb should be able again to open old tombs. A script to sanitize keys will be released soon.
This commit is contained in:
parent
8d46ff46e1
commit
551a7839f5
10
tomb
10
tomb
@ -605,7 +605,11 @@ change_passwd() {
|
||||
drop_key
|
||||
|
||||
{
|
||||
gen_key $lukskey > ${tmpnewkey}
|
||||
|
||||
local algo
|
||||
{ option_is_set -o } && { algopt="`option_value -o`" }
|
||||
|
||||
gen_key $lukskey $algopt > ${tmpnewkey}
|
||||
|
||||
if ! is_valid_key $tmpnewkey; then
|
||||
die "Error: the newly generated keyfile does not seem valid"
|
||||
@ -718,7 +722,7 @@ get_lukskey() {
|
||||
-d "${keyfile}" 2> $res
|
||||
|
||||
unset tombpass
|
||||
grep 'DECRYPTION_OKAY' $res
|
||||
grep 'DECRYPTION_OKAY' $res > /dev/null
|
||||
ret=$?; rm -f $res
|
||||
|
||||
fi
|
||||
@ -733,7 +737,7 @@ gen_key() {
|
||||
# $1 the lukskey to encrypt
|
||||
# $2 is the --cipher-algo to use (string taken by GnuPG)
|
||||
local lukskey="$1"
|
||||
local algo="$2"
|
||||
local algo="${2:-AES256}"
|
||||
# here user is prompted for key password
|
||||
local tombpass=""
|
||||
local tombpasstmp=""
|
||||
|
Loading…
Reference in New Issue
Block a user