diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-12-19 01:39:00 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-12-19 01:39:00 +0100 |
commit | 6b53d1164c3b51999ffef9e11587285c1ac9c7c9 (patch) | |
tree | 6f72c2e74e0e259c2bf7bc593501815da1ce2d4f /patches | |
parent | 29120e770a57d04219fe4087210fe959348200a1 (diff) | |
download | Nix-6b53d1164c3b51999ffef9e11587285c1ac9c7c9.tar.gz Nix-6b53d1164c3b51999ffef9e11587285c1ac9c7c9.tar.zst Nix-6b53d1164c3b51999ffef9e11587285c1ac9c7c9.zip |
multiple improvements
Add a generic fetch_git script.
New applications:
pal duplicity duply pdftk googler jrnl apg newsboat vcsh xmr-stak urlwatch pass
Diffstat (limited to 'patches')
-rw-r--r-- | patches/pass-fix-pass-init.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/patches/pass-fix-pass-init.patch b/patches/pass-fix-pass-init.patch new file mode 100644 index 0000000..10a76c1 --- /dev/null +++ b/patches/pass-fix-pass-init.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 33e8f1cd0065639a948d7b5ba3f93d43bdf7f3be Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= <ismael.bouya@normalesup.org> | ||
3 | Date: Sun, 11 Nov 2018 19:47:33 +0100 | ||
4 | Subject: [PATCH] Fix pass init for some gpg keys | ||
5 | |||
6 | This fixes the pass init for gpg keys which have their main key as | ||
7 | encryption key. This may happen for instance with RSA keys and specific | ||
8 | configuration. | ||
9 | --- | ||
10 | src/password-store.sh | 2 +- | ||
11 | tests/t0300-reencryption.sh | 2 +- | ||
12 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/src/password-store.sh b/src/password-store.sh | ||
15 | index d89d455..44d122e 100755 | ||
16 | --- a/src/password-store.sh | ||
17 | +++ b/src/password-store.sh | ||
18 | @@ -124,7 +124,7 @@ reencrypt_path() { | ||
19 | IFS=";" eval 'GPG_RECIPIENTS+=( $group )' # http://unix.stackexchange.com/a/92190 | ||
20 | unset "GPG_RECIPIENTS[$index]" | ||
21 | done | ||
22 | - gpg_keys="$($GPG $PASSWORD_STORE_GPG_OPTS --list-keys --with-colons "${GPG_RECIPIENTS[@]}" | sed -n 's/^sub:[^:]*:[^:]*:[^:]*:\([^:]*\):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[a-zA-Z]*e[a-zA-Z]*:.*/\1/p' | LC_ALL=C sort -u)" | ||
23 | + gpg_keys="$($GPG $PASSWORD_STORE_GPG_OPTS --list-keys --with-colons "${GPG_RECIPIENTS[@]}" | sed -n 's/^[ps]ub:[^:]*:[^:]*:[^:]*:\([^:]*\):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[a-zA-Z]*e[a-zA-Z]*:.*/\1/p' | LC_ALL=C sort -u)" | ||
24 | fi | ||
25 | current_keys="$(LC_ALL=C $GPG $PASSWORD_STORE_GPG_OPTS -v --no-secmem-warning --no-permission-warning --decrypt --list-only --keyid-format long "$passfile" 2>&1 | sed -n 's/^gpg: public key is \([A-F0-9]\+\)$/\1/p' | LC_ALL=C sort -u)" | ||
26 | |||
27 | diff --git a/tests/t0300-reencryption.sh b/tests/t0300-reencryption.sh | ||
28 | index 3c88987..57d873f 100755 | ||
29 | --- a/tests/t0300-reencryption.sh | ||
30 | +++ b/tests/t0300-reencryption.sh | ||
31 | @@ -7,7 +7,7 @@ cd "$(dirname "$0")" | ||
32 | INITIAL_PASSWORD="will this password live? a big question indeed..." | ||
33 | |||
34 | canonicalize_gpg_keys() { | ||
35 | - $GPG --list-keys --with-colons "$@" | sed -n 's/sub:[^:]*:[^:]*:[^:]*:\([^:]*\):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[a-zA-Z]*e[a-zA-Z]*:.*/\1/p' | LC_ALL=C sort -u | ||
36 | + $GPG --list-keys --with-colons "$@" | sed -n 's/[ps]ub:[^:]*:[^:]*:[^:]*:\([^:]*\):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[a-zA-Z]*e[a-zA-Z]*:.*/\1/p' | LC_ALL=C sort -u | ||
37 | } | ||
38 | gpg_keys_from_encrypted_file() { | ||
39 | $GPG -v --no-secmem-warning --no-permission-warning --decrypt --list-only --keyid-format long "$1" 2>&1 | grep "public key is" | cut -d ' ' -f 5 | LC_ALL=C sort -u | ||
40 | -- | ||
41 | 2.19.1 | ||
42 | |||