Skip to content

Commit

Permalink
Add --yes option to gpg2 when deleting source keypair
Browse files Browse the repository at this point in the history
  • Loading branch information
rmol committed Oct 14, 2020
1 parent fe70863 commit 5fde141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion securedrop/crypto_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def delete_reply_keypair(self, source_filesystem_id: str) -> None:

# Always delete keys without invoking pinentry-mode = loopback
# see: https://lists.gnupg.org/pipermail/gnupg-users/2016-May/055965.html
temp_gpg = gnupg.GPG(binary='gpg2', homedir=self.gpg_key_dir)
temp_gpg = gnupg.GPG(binary='gpg2', homedir=self.gpg_key_dir, options=["--yes"])

# The subkeys keyword argument deletes both secret and public keys.
temp_gpg.delete_keys(fingerprint, secret=True, subkeys=True)
Expand Down

0 comments on commit 5fde141

Please sign in to comment.