Reputation: 18046
I am writing a drupal module that encrypts a file using gnupg and sends it to a remote host. There appears to be some bug in my module where it uses the wrong public key to send to the remote host, because they're telling me it fails when they try to decrypt the file. This is the error message they get, from their windows batch file:
Beginning GPG Decryption
Using current version of GNUPG
gpg: encrypted with 2048-bit ELG-E key, ID F1940956, created 2002-04-25
"Wrong Public Key <another_key@another_company.com>"
gpg: decryption failed: secret key not available
However, when I try to decrypt the file I'm sending them, without the key, I get simply
$> gpg --decrypt sensitive_file.gpg
gpg: encrypted with ELG-E key, ID F1940956
gpg: decryption failed: secret key not available
I want gpg to report the email address of the key used to encrypt the file, like in the error message I'm getting from the remote host. I want to see Wrong Public Key <another_key@another_company.com>
, like in their error message. But my gpg doesn't report that.
Am I missing a switch? How can I get this information?
Upvotes: 1
Views: 2095
Reputation: 18046
The reason that the remote host was able to get the email address of the encrypting key was because of the id F1940956
. The remote sign either already has this key, with additional information, on their keyring, or else looked it up in a registry, since this key is a published key.
Upvotes: 2