mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-17 10:05:11 +00:00
remove newline from decrypted key's secret, fixes #125
This commit is contained in:
parent
3bed43bf21
commit
7bd21e4419
5
tomb
5
tomb
@ -682,12 +682,9 @@ get_lukskey() {
|
|||||||
# key needs to be exhumed from an image
|
# key needs to be exhumed from an image
|
||||||
elif [[ `file "$keyfile"` =~ "JP.G" ]]; then
|
elif [[ `file "$keyfile"` =~ "JP.G" ]]; then
|
||||||
exhumedkey="`safe_filename exhumedkey`"
|
exhumedkey="`safe_filename exhumedkey`"
|
||||||
_verbose "lukspass in get_lukskey: $lukspass"
|
|
||||||
|
|
||||||
exhume_key "$keyfile" "$lukspass" "$exhumedkey"
|
exhume_key "$keyfile" "$lukspass" "$exhumedkey"
|
||||||
keyfile="$exhumedkey"
|
keyfile="$exhumedkey"
|
||||||
fi
|
fi
|
||||||
_verbose "lukspass in get_lukskey: $lukspass"
|
|
||||||
|
|
||||||
# check validity, eventually repair adding headers
|
# check validity, eventually repair adding headers
|
||||||
is_valid_key "$keyfile" || {
|
is_valid_key "$keyfile" || {
|
||||||
@ -1625,7 +1622,7 @@ mount_tomb() {
|
|||||||
losetup -d ${nstloop}
|
losetup -d ${nstloop}
|
||||||
_failure "No valid password supplied." }
|
_failure "No valid password supplied." }
|
||||||
|
|
||||||
print "$tomb_secret" | \
|
print -n "$tomb_secret" | \
|
||||||
cryptsetup --key-file - luksOpen ${nstloop} ${mapper}
|
cryptsetup --key-file - luksOpen ${nstloop} ${mapper}
|
||||||
|
|
||||||
# key dropped here
|
# key dropped here
|
||||||
|
Loading…
Reference in New Issue
Block a user