[PATCH] Check re-encrypted file has same recipients not that it is identical

Allan Odgaard lists+pass at simplit.com
Fri Sep 13 12:37:37 CEST 2019

What we want to test is that initializing a password store using a PGP 
group and then later re-initializing it using the members of that group, 
has our password items readable by the same recipients, not that the 
bytes on disk hasn’t changed.

The test failed for me on macOS 10.14 with GnuPG 2.2.17 using libgcrypt 
  tests/t0300-reencryption.sh | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/t0300-reencryption.sh b/tests/t0300-reencryption.sh
index 3c88987..2903cbb 100755
--- a/tests/t0300-reencryption.sh
+++ b/tests/t0300-reencryption.sh
@@ -70,7 +70,7 @@ test_expect_success 'Reencryption root group to 
identical individual with no fil
  	"$PASS" init group1 &&
  	cp "$PASSWORD_STORE_DIR/folder/cred1.gpg" "$oldfile" &&
  	"$PASS" init $KEY4 $KEY2 &&
-	test_cmp "$PASSWORD_STORE_DIR/folder/cred1.gpg" "$oldfile"
+	[[ "$(gpg_keys_from_encrypted_file 
"$PASSWORD_STORE_DIR/folder/cred1.gpg")" == 
"$(gpg_keys_from_encrypted_file "$oldfile")" ]]

  test_expect_success 'Reencryption subfolder multiple keys, copy' '

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20190913/3952f38f/attachment.html>

More information about the Password-Store mailing list