Page MenuHome GnuPG

Importing secret key with wrong passphrase may result GPG_ERR_MISSING_VALUE (should be able to be tried 3 times)
Closed, ResolvedPublic

Description

When gpg --import for a secret key, wrong passphrase may result interaction error.

When the first passphrase resulted partially-looking-good secret key, it causes confusing interaction.

A user should be able to try three times always (according to the dialog), but the second try results GPG_ERR_MISSING_VALUE even if good passphrase.
And no third try.

This is because the variable SKEY is overwritten within the function do_unprotect, at the initial call.

Revisions and Commits

Related Objects

Event Timeline

gniibe renamed this task from Importing secret key with wrong passphrase results GPG_ERR_MISSING_VALUE (should be able to be tried 3 times) to Importing secret key with wrong passphrase may result GPG_ERR_MISSING_VALUE (should be able to be tried 3 times).Jun 9 2021, 3:38 AM

I encountered this bug last year, but I realized that it's hard to make a reproducible case.

gniibe changed the task status from Open to Testing.Jun 9 2021, 4:00 AM

Fixed.
I'm not sure if it's worth backporting this to 2.2.