isislovecruft / python-gnupg

A modified version of python-gnupg, including security patches, extensive documentation, and extra features.
Other
424 stars 172 forks source link

Fix gpg>=1.4.18 bug where --edit-key continually asks for a passphrase. #238

Closed isislovecruft closed 6 years ago

isislovecruft commented 6 years ago

This is a really gross hack.

The problem is that, with gpg>=1.4.18, there appears to be absolutely no way to tell it to not ask for a passphrase on stdin if the first passphrase given to it was wrong. None of the options that are supposed to stop it from doing this actually work: not --no-tty, not --batch, not --passphrase-fd 0, nothing. It'll just hang there forever like a drooling idiot. (Thanks, howler monkeys.)

So! This gross hack will feed it the expiration timestamp as a second wrong passphrase to get it to finally give the fuck up. (I seriously hope that no uses their key expiration as actual key passphrase, but even if so, this will also fix the bug.)

007 commented 5 years ago

No build since ~September has passed on Travis, did this change not work, or was it insufficient?