mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-11 07:30:56 +00:00
improve gpg key listing command
This commit is contained in:
parent
ec31d2d280
commit
91e607efb5
4
tomb
4
tomb
@ -955,7 +955,7 @@ is_valid_recipients() {
|
|||||||
|
|
||||||
# All the keys ID must be valid (the public keys must be present in the database)
|
# All the keys ID must be valid (the public keys must be present in the database)
|
||||||
for gpg_id in ${recipients[@]}; do
|
for gpg_id in ${recipients[@]}; do
|
||||||
gpg --list-keys "$gpg_id" &> /dev/null
|
gpg --with-colons --batch --list-keys "$gpg_id" &> /dev/null
|
||||||
[[ $? != 0 ]] && {
|
[[ $? != 0 ]] && {
|
||||||
_warning "Not a valid GPG key ID: ::1 gpgid:: " $gpg_id
|
_warning "Not a valid GPG key ID: ::1 gpgid:: " $gpg_id
|
||||||
return 1
|
return 1
|
||||||
@ -964,7 +964,7 @@ is_valid_recipients() {
|
|||||||
|
|
||||||
# At least one private key must be present
|
# At least one private key must be present
|
||||||
for gpg_id in ${recipients[@]}; do
|
for gpg_id in ${recipients[@]}; do
|
||||||
gpg --list-secret-keys "$gpg_id" &> /dev/null
|
gpg --with-colons --batch --list-secret-keys "$gpg_id" &> /dev/null
|
||||||
[[ $? = 0 ]] && {
|
[[ $? = 0 ]] && {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user