Hey.
Would it be possible to indicate cases of a wrong passphrase with a dedicated exit status?
Like when:
- passphrase for the private key was wrong
- passphrase from which directly a session key is derived was wrong
- passphrase with which a session key is decrypted was wrong
Right now that simply seems to be exit status 2 like in many other cases.
I think the differences from these to other error conditions is, that they are likely solvable (by re-entering the correct passphrase) - unlike e.g. things like invalid MDC.
Therefore it would make some sense to have a dedicated exit status, so that e.g. in shell scripting one can easily deduce: oh it makes sense to repeat, as likely just the passprhase was wrong
Sure one could also examine the error messages, but I think these are subject to localisation and the stderr may not always be easily obtainable (at least not just the part what gpg would have printed to it).
Thanks for considering.
Cheers,
Chris.