mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-05 04:47:56 +00:00
commit
f42a4c2a0b
13
tomb
13
tomb
@ -1359,16 +1359,15 @@ gen_key() {
|
||||
|
||||
# prints an array of ciphers available in gnupg (to encrypt keys)
|
||||
list_gnupg_ciphers() {
|
||||
# prints an error if GnuPG is not found
|
||||
which gpg 2>/dev/null || _failure "gpg (GnuPG) is not found, Tomb cannot function without it."
|
||||
|
||||
# On gpg1 and gpg2 line 10 always point to available ciphers.
|
||||
# Print those until the next section is found
|
||||
ciphers=(`gpg --version | awk '
|
||||
BEGIN { ciphers=0 }
|
||||
/^Cipher:/ { gsub(/,/,""); sub(/^Cipher:/,""); print; ciphers=1; next }
|
||||
/^Hash:/ { ciphers=0 }
|
||||
NR==11 { gsub(/,/,""); sub(/^.*:/,""); print; ciphers=1; next }
|
||||
/^.*:/ { ciphers=0 }
|
||||
{ if(ciphers==0) { next } else { gsub(/,/,""); print; } }
|
||||
'`)
|
||||
print " ${ciphers}"
|
||||
print "${ciphers}"
|
||||
return 1
|
||||
}
|
||||
|
||||
@ -3106,7 +3105,7 @@ main() {
|
||||
cat <<EOF
|
||||
`sudo -V | head -n1`
|
||||
`cryptsetup --version`
|
||||
`pinentry --version`
|
||||
`pinentry --version | head -n1`
|
||||
`findmnt -V`
|
||||
`gpg --version | head -n1` - key forging algorithms (GnuPG symmetric ciphers):
|
||||
`list_gnupg_ciphers`
|
||||
|
Loading…
Reference in New Issue
Block a user