Decryption of file encrypted using multiple userIDs fails
Mon, 27 Nov 2000 09:55:38 +0100
I'm writing an extension for a mailer, which allows it to
encrypt/decrypt pgp messages, and I make calls to gpg for this.
When I decrypt a message which has been encrypted for many people,
gpg returns an error, even if it can decrypt the message, because I
don't feed it with all receiver secret key passphrases!
For example, if I encrypt a message like this:
gpg --recipient recipient1 --recipient recipient2 --recipient
recipient3 --armor --encrypt myMessage
When recipient3 receives the message, it tries to decrypt it with:
gpg --no-tty --passphrase-fd 0 --decrypt theMessage
by passing its passphrase to stdin. gpg returns an error code of 2,
stderr states that there is no secret key for decryption available
(receiver1) or that passphrase is bad (receiver2), AND returns the
decrypted message to stdout, as it could be decoded using receiver3
Is there a way to avoid gpg to return an error code in this case?
There is no error, as the message could finally be decrypted; it
doesn't matter if not all identities are known.
Please, cc to firstname.lastname@example.org
Archive is at http://lists.gnupg.org - Unsubscribe by sending mail
with a subject of "unsubscribe" to email@example.com