Merge pull request #301 from Narrat/small_things

Small things
This commit is contained in:
Jaromil 2018-01-09 10:42:40 +01:00 committed by GitHub
commit f42a4c2a0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

13
tomb
View File

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