summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsrc/password-store.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index 19b3124..b852d06 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# Copyright (C) 2012 - 2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
+# Copyright (C) 2012 - 2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
# This file is licensed under the GPLv2+. Please see COPYING for more information.
umask "${PASSWORD_STORE_UMASK:-077}"
@@ -58,7 +58,7 @@ die() {
verify_file() {
[[ -n $PASSWORD_STORE_SIGNING_KEY ]] || return 0
[[ -f $1.sig ]] || die "Signature for $1 does not exist."
- local fingerprints="$($GPG $PASSWORD_STORE_GPG_OPTS --verify --status-fd=1 "$1.sig" "$1" 2>/dev/null | sed -n 's/\[GNUPG:\] VALIDSIG \([A-F0-9]\{40\}\) .* \([A-F0-9]\{40\}\)$/\1\n\2/p')"
+ local fingerprints="$($GPG $PASSWORD_STORE_GPG_OPTS --verify --status-fd=1 "$1.sig" "$1" 2>/dev/null | sed -n 's/^\[GNUPG:\] VALIDSIG \([A-F0-9]\{40\}\) .* \([A-F0-9]\{40\}\)$/\1\n\2/p')"
local fingerprint found=0
for fingerprint in $PASSWORD_STORE_SIGNING_KEY; do
[[ $fingerprint =~ ^[A-F0-9]{40}$ ]] || continue
@@ -123,7 +123,7 @@ reencrypt_path() {
IFS=";" eval 'GPG_RECIPIENTS+=( $group )' # http://unix.stackexchange.com/a/92190
unset "GPG_RECIPIENTS[$index]"
done
- 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)"
+ 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)"
fi
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)"
@@ -334,7 +334,7 @@ cmd_init() {
signing_keys+=( --default-key $key )
done
$GPG "${GPG_OPTS[@]}" "${signing_keys[@]}" --detach-sign "$gpg_id" || die "Could not sign .gpg_id."
- key="$($GPG --verify --status-fd=1 "$gpg_id.sig" "$gpg_id" 2>/dev/null | sed -n 's/\[GNUPG:\] VALIDSIG [A-F0-9]\{40\} .* \([A-F0-9]\{40\}\)$/\1/p')"
+ key="$($GPG --verify --status-fd=1 "$gpg_id.sig" "$gpg_id" 2>/dev/null | sed -n 's/^\[GNUPG:\] VALIDSIG [A-F0-9]\{40\} .* \([A-F0-9]\{40\}\)$/\1/p')"
[[ -n $key ]] || die "Signing of .gpg_id unsuccessful."
git_add_file "$gpg_id.sig" "Signing new GPG id with ${key//[$IFS]/,}."
fi
ass instances in restoreJason A. Donenfeld1-2/+4 We now make sure a previous pass clip restore finishes immediately when copying another password to the clipboard. This is currently only implemented on Linux. 2014-03-20Style.Jason A. Donenfeld1-3/+1 2014-03-19Simplify exports.Jason A. Donenfeld1-4/+3 2014-03-19Copyright noticeJason A. Donenfeld1-1/+1 2014-03-19Team pass: enable multiple keys and per directoryJason A. Donenfeld2-40/+75 The .gpg-id file may now have multiple keys in it, one per line. If a .gpg-id file exists inside a subdirectory, passwords inside that directory are encrypted to that/those ids. The init command has learned a -p/--path option for writing such a sub directory .gpg-id and now can take several arguments for ids. 2014-03-18Shred shm files.Jason A. Donenfeld3-1/+4 2014-03-18Do not compress passwords.Jason A. Donenfeld1-1/+1 According to a forthcoming paper by Alfredo Pironti, OpenPGP compression can reveal entropy levels. We thus disable compression. Existing password stores can be reencrypted without compression using the "--reencrypt" flag for "init". Reported-by: Alfredo Pironti <alfredo.pironti@inria.fr> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> 2013-09-14Use a glob in the pattern match instead of using two comparisons for [yY].Chris Down1-1/+1 2013-09-14Rephrase awkward/confusing message about enabling echo during password entry.Chris Down1-3/+3 2013-09-14Fix directory traversal for reencryption when $PREFIX is a symlinkBrian Shore1-1/+1 2013-08-26Makefile: Do not install bash completion to /etcLukas Fleischer1-3/+2 `make install` should never install anything to /etc. "/usr/share/bash-completion/completions/" is the right place for completions that are installed by software packages. Signed-off-by: Lukas Fleischer <info@cryptocrack.de> 2013-05-22check if a passfile exists before checking for directoryBrian Mattern1-13/+12