I noticed 2 problems with a bad passphrase using GPGME++. In both cases, I'm using loopback pinentry with version 1.15.0 on Arch Linux.
- Setting secret key expiry time with GpgSetExpiryTimeEditInteractor
Error e = ctx->edit(k, std::unique_ptr<ExtendedExpiryTimeEditInteractor> (interactor), d);
With a right passphrase, the expiry time is changed as expected.
With a wrong passphrase, the expiry time is not changed, but the returned error code() is 0.
- Exporting a secret key
Error e = ctx->exportPublicKeys(fpr, kData, Context::ExportSecret);
With a right passphrase, kData is assigned the secret key.
With a wrong passphrase, the application crashes on above line with 'free(): double free detected in tcache 2' in console.
I can provide more information as per your instructions.
Thanks for considering.