From 6c0aa0abdde2a1e4398f22ab084188c1556d8b4b Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Fri, 6 Oct 2023 15:54:03 +0900 Subject: [PATCH] Clear gpg-agent cache so bad psswds don't pass --- update.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/update.py b/update.py index 9041a45..46ac150 100755 --- a/update.py +++ b/update.py @@ -1616,6 +1616,14 @@ def test_gpg_passphrase( tempnf.write(b"Test file content") tempnf.flush() try: + # Clear gpg password cache so that incorrect passwords don't pass. + subprocess.run( + ("/usr/bin/env", "gpg-connect-agent", "reloadagent", "/bye"), + check=True, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, + env={"GNUPGHOME": signing_gpg_dir}, + ) subprocess.run( ( "/usr/bin/env",