An execption is thrown if a message is encrypted for multiple recipients but not all secret keys are found

Feb 14, 2012 at 12:52 PM

If a pgp message is encrypted for multiple recipients, gpg tries to find the secret key for each single recipient and tries to decrypt it, even if it has already found a matching secret key, and successfully decrypted the message.

The multiple occurrences of NO_SECKEY throw GpGAPI off and the Execute ends with an error.

I tried looking for command line options to ignore this - to no avail.

The GPG option --try-all-secrets does not work either...

Tested with cygwin gpg v1.4.9 and Gpg4win 2.1.0


Feb 15, 2012 at 5:48 PM


I fixed this bug by adding a little check when NO_SECKEY is emitted by GPG.

Since the password is only requested to decrypt a message. "GOOD_PASSPHRASE" means that gpg has found a good secret key and the user entered the good password for this secret key.

I hope it helps you :)

Thanks for your bug report.