m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2015-01-12 23:04:39 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2015-01-12 23:04:49 +0100
commitec8140b0f1a422aad16d41d0c322f3a6ceef74fe (patch)
treefcedfce2b66561273f378fd9d912037603013cca /src
parentc9dc5538a8158b10a226eeb44d865e57d3d81c88 (diff)
Only examine subkeys that are capable of encrypting.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/password-store.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index 727967e..9e32372 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -100,7 +100,7 @@ reencrypt_path() {
IFS=";" eval 'GPG_RECIPIENTS+=( $group )' # http://unix.stackexchange.com/a/92190
unset GPG_RECIPIENTS[$index]
done
- gpg_keys="$($GPG --list-keys --keyid-format long "${GPG_RECIPIENTS[@]}" | sed -n 's/sub *.*\/\([A-F0-9]\{16\}\) .*/\1/p' | LC_ALL=C sort -u)"
+ gpg_keys="$($GPG --list-keys --keyid-format long --list-options show-usage "${GPG_RECIPIENTS[@]}" | sed -n 's/sub *.*\/\([A-F0-9]\{16\}\) .*\[[A-Z]\{0,2\}E[A-Z]\{0,2\}\].*/\1/p' | LC_ALL=C sort -u)"
fi
current_keys="$($GPG -v --no-secmem-warning --no-permission-warning --list-only --keyid-format long "$passfile" 2>&1 | cut -d ' ' -f 5 | LC_ALL=C sort -u)"