password-store

Simple password manager using gpg and ordinary unix directories
git clone https://git.zx2c4.com/password-store
Log | Files | Refs | README | LICENSE

commit 5d48eae5c3c8155a4f12ba443bec03deeb687c73
parent 1edb675f4a2c7eb79149e1c026ec5b186470e272
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date:   Wed, 23 Apr 2014 05:40:11 +0200

tests: have multiple gpg keys available

Diffstat:
Atests/gnupg/gpg.conf | 3+++
Mtests/gnupg/pubring.gpg | 0
Mtests/gnupg/secring.gpg | 0
Mtests/gnupg/trustdb.gpg | 0
Mtests/setup.sh | 13+++++++++----
5 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/tests/gnupg/gpg.conf b/tests/gnupg/gpg.conf @@ -0,0 +1,3 @@ +group group1 = E4691410 D774A374 +group group2 = E4691410 +group big group = CF90C77B D774A374 EB7D54A8 E4691410 39E5020C diff --git a/tests/gnupg/pubring.gpg b/tests/gnupg/pubring.gpg Binary files differ. diff --git a/tests/gnupg/secring.gpg b/tests/gnupg/secring.gpg Binary files differ. diff --git a/tests/gnupg/trustdb.gpg b/tests/gnupg/trustdb.gpg Binary files differ. diff --git a/tests/setup.sh b/tests/setup.sh @@ -4,7 +4,7 @@ # $GNUPGHOME Full path to test GPG directory # $PASS Full path to password-store script to test # $GPG Name of gpg executable -# $PASSWORD_STORE_KEY GPG key id of testing key +# $PASSWORD_STORE_KEY{1..5} GPG key ids of testing keys # $PASSWORD_STORE_TEST_HOME This folder # @@ -29,7 +29,6 @@ fi # Note: the assumption is the test key is unencrypted. export GNUPGHOME="${PASSWORD_STORE_TEST_HOME}/gnupg/" chmod 700 "$GNUPGHOME" -export PASSWORD_STORE_KEY="3DEEA12D" # "Password-store Test Key" GPG="gpg" which gpg2 &>/dev/null && GPG="gpg2" @@ -38,6 +37,12 @@ which gpg2 &>/dev/null && GPG="gpg2" # We don't need a real agent. Hence: export GPG_AGENT_INFO=" " +export PASSWORD_STORE_KEY1="CF90C77B" # pass test key 1 +export PASSWORD_STORE_KEY2="D774A374" # pass test key 2 +export PASSWORD_STORE_KEY3="EB7D54A8" # pass test key 3 +export PASSWORD_STORE_KEY4="E4691410" # pass test key 4 +export PASSWORD_STORE_KEY5="39E5020C" # pass test key 5 + # pass_init() # # Initialize a password store, setting PASSWORD_STORE_DIR @@ -46,7 +51,7 @@ export GPG_AGENT_INFO=" " # Returns: Nothing, sets PASSWORD_STORE_DIR pass_init() { export PASSWORD_STORE_DIR="${SHARNESS_TRASH_DIRECTORY}/test-store/" - echo "Initializing test password store (${PASSWORD_STORE_DIR}) with key ${PASSWORD_STORE_KEY}" + echo "Initializing test password store (${PASSWORD_STORE_DIR}) with key ${PASSWORD_STORE_KEY1}" if [[ -d "${PASSWORD_STORE_DIR}" ]] ; then echo "Removing old store" @@ -57,7 +62,7 @@ pass_init() { fi fi - $PASS init ${PASSWORD_STORE_KEY} || return 1 + $PASS init ${PASSWORD_STORE_KEY1} || return 1 echo "Initialization of ${PASSWORD_STORE_DIR} complete." }