core: Return bad data error instead of general error on unexpected data
* src/verify.c (_gpgme_verify_status_handler): Return GPG_ERR_BAD_DATA instead of GPG_ERR_GENERAL. -- This gives users trying to decrypt and/or verify for example a public key block a more useful error. GnuPG-bug-id: 6617
This commit is contained in:
parent
0518ed32e2
commit
777cf7f2d1
@ -979,7 +979,7 @@ _gpgme_verify_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
case GPGME_STATUS_UNEXPECTED:
|
||||
opd->only_newsig_seen = 0;
|
||||
if (!sig)
|
||||
return gpg_error (GPG_ERR_GENERAL);
|
||||
return gpg_error (GPG_ERR_BAD_DATA);
|
||||
sig->status = gpg_error (GPG_ERR_NO_DATA);
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user