* https://bugs.g10code.com/gnupg/issue1179
* This bug has resurfaced several times in GnuPG's history, and as far as I've
understood it, it is due to a generation or an attempt at parsing a .gpg
file (a message/file, or one of the keyrings) which is generated/formatted
such that the GnuPG data packets comprise a certain number of bytes (562
bytes precisely) and/or the demarcation signal (two equal signs, '==') of
the trailing ctb (I assume 'ctb' stands for cipher text bytes; it's
everywhere in GnuPG's sourcecode) CRC checksum ends up on its own line, like
so:
-----BEGIN PGP MESSAGE-----
hQIMA1DJjYe0ARAPAQ/6A7PWiyfiBIpbJ7+XbaptYPB0muoi3rXF4cuIXU37uDug
04Cck+8u9hcMjhYd0pN6zJMJLO8CUOdUKJblpxPSYc7yanJDc33n1jsdkr7XNbbz
Xjh1z3EJZPhhp3YE7lqgnTTXQsGUihnhwiQqsuNgCVZfSwXpVFa+IHC+/AXhAPLl
/BoY6+YOupD8G4bOUCU/XBvQp8uH9kh9n9101+6SopJ94H354X0PtZJs5BISCW7g
/tUxAqxLesDaZkHF91HL7AJE8+/pheTc8vHGP+Zu8/Q5Lr+GW2cUrCXXxUV/xRIh
P7t7WDdU5V1BXyughEBP7Jwr8G3llKr42ZRVgvOyFIe+sMVibq2dEhxJr/sjR0j6
lYws+tZVWbmuxOnMDCjgIaEverU0nnd1SqQ/tS7yFh8lpBfMay2IdVVh+Bi3zDeT
Kb/h3tCjG0++h5FuG8UBWv13LRlfcF817ShnwoG80y4cESgCXxZGkd9DRExH8wy8
VJpIaVKiaZs5jlHLHX4JWy2IVmEvk/6xwZZwrNV4sGYzDGkxHLyTUUQu/NOkCtAb
2Zs9mGrtsSGSoP6lfKDk9hh8fJtPGxGzIezVR9WXYKeYAfGZOzMI1Ji1jF1fO21G
KqTaF2WnWfaWmsuICTiBntgNntZRsXwmMNkcBt5LVK8uRpWQqIQmAkN4vl6SgovS
QAHrC6D9mUmoNvKcS71aH4uZjkfYtNmgp8i5cmTP6UaGouVeqzDCtK/vIy1V/iaX
89vcdsILlMMVB/10Rtscyus
==suET
-----END PGP MESSAGE-----
When this happens, GnuPG *stops* parsing entirely before the CRC checksum
following the '==', and thus the next time it starts parsing again the
first thing it gets is the end header '-----END PGP MESSAGE-----'.
* My solution for hacking around this is to export directly to a keyring,
which can either be one we create for this purpose, or the keyring set as
self.pubring. I do not know yet if this will affect --list-keys.
* Add DeprecationWarning for gnupg.GPG.keyring parameter, and first steps
towards moving to use gnupg.GPG.secring and pubring instead, because
'keyring' seemed unclear as to which keyring it was referring to.
* Add checks for keyring files, and create them if they are not there.
* Update documentation for gnupg.GPG.__init__().