Skip to content

Commit

Permalink
Don't pass --secret-keyring with GPG 2.4.4 (noble)
Browse files Browse the repository at this point in the history
It emits a warning saying it has no effect, so just drop it entirely.
Since noble will use a fixed version of GPG, we can just check equality
of the version instead of implementing proper version comparison
schemes.
  • Loading branch information
legoktm committed Oct 16, 2024
1 parent bf22c9f commit 370b0c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion securedrop/pretty_bad_protocol/_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,8 @@ def _make_args(self, args, passphrase=False): # type: ignore[no-untyped-def]

if self.keyring:
cmd.append("--no-default-keyring --keyring %s" % self.keyring)
if self.secring:
if self.secring and self.binary_version != "2.4.4":
# In GnuPG 2.4.4, --secret-keyring has no effect
cmd.append("--secret-keyring %s" % self.secring)

if passphrase:
Expand Down

0 comments on commit 370b0c0

Please sign in to comment.