* pgg-gpg.el: Sync back with Gnus 5.10, reverting changes that add
symmetric encryption features and a new asynchronous interface to
GnuPG. This new version is version 1.4, plus whitespace changes.
* pgg-gpg.el (pgg-gpg-start-process): Don't bind
default-enable-multibyte-characters. This reverts the change from
revision 6.17 which is no longer necessary because the passphrase
is sent separately now. GnuPG messages are unreadable under
multibyte locales with default-enable-multibyte-characters set to
nil.
* pgg-gpg.el: Invoke gpg asynchronous, to avoid querying for
passphrases when it is not needed.
(pgg-gpg-use-agent): Add, to hard code that pgg shouldn't wait for
passphrase stuff from gpg, should only be necessary when you use
gpg with a smartcard.
* pgg-gpg.el (pgg-gpg-update-agent): Check for
make-network-process, so we can use the same code in Gnus v5-10
too and have this file fully synchronized with that release.
* pgg-gpg.el (pgg-gpg-use-agent): Disable by default.
(pgg-gpg-update-agent): New function.
(pgg-gpg-use-agent-p): New function.
(pgg-gpg-process-region, pgg-gpg-encrypt-region)
(pgg-gpg-encrypt-symmetric-region, pgg-gpg-decrypt-region)
(pgg-gpg-sign-region): Use it.
* pgg-gpg.el: Ideas below based on patch from Sascha Wilde
<wilde@sha-bang.de>.
(pgg-gpg-use-agent): New variable.
(pgg-gpg-process-region): Use it.
(pgg-gpg-encrypt-region): Likewise.
(pgg-gpg-encrypt-symmetric-region): Likewise.
(pgg-gpg-decrypt-region): Likewise.
(pgg-gpg-sign-region): Likewise.
(pgg-gpg-possibly-cache-passphrase): Don't cache a nil password.
decoded armor to find the key-identifier.
(pgg-gpg-lookup-key-owner): New function to return the
human-readable identifier of a key owner.
(pgg-gpg-lookup-id-from-key-owner): Make it easy to identify the
key itself.
(pgg-gpg-decrypt-region): Prompt with the key owner (rather
than the key value) if we have a key and can match it against a
secret key. Also, added an XXX note pointing out fact that the
prompt only indicates the first matching key.
(pgg-pgp-encrypt-region)
(pgg-pgp-encrypt-symmetric-region, pgg-pgp-encrypt-symmetric)
(pgg-pgp-encrypt, pgg-pgp-decrypt-region, pgg-pgp-decrypt)
(pgg-pgp-sign-region, pgg-pgp-sign): Add optional 'passphrase'
argument to all these routines, so the passphrase can be managed
externally and passed in to the system.
(pgg-gpg-possibly-cache-passphrase): Add optional
'notruncate' argument, so the passphrase cache can be used
reliably with identifiers besides a pgp packet's key id.
(pgg-gpg-encrypt-symmetric-region): New function for
symmetric encryption.
(pgg-gpg-symmetric-key-p): New function to check for an symmetric
encrypted session key.
(pgg-gpg-decrypt-region): When decrypting a symmetric encrypted
message ask for the passphrase in a proper way.