core: Fix setting og the verification result.

* src/verify.c (parse_new_sig): Proberly handle the RC in an ERRSIG
status.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-09-16 11:43:32 +02:00
parent ed1f2700a7
commit 1f9641dd0f
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -366,25 +366,10 @@ parse_new_sig (op_data_t opd, gpgme_status_code_t code, char *args,
end++;
/* Parse the return code. */
if (end[0] && (!end[1] || end[1] == ' '))
{
switch (end[0])
{
case '4':
sig->status = gpg_error (GPG_ERR_UNSUPPORTED_ALGORITHM);
break;
case '9':
sig->status = gpg_error (GPG_ERR_NO_PUBKEY);
break;
default:
sig->status = gpg_error (GPG_ERR_GENERAL);
}
}
else
if (!*end)
goto parse_err_sig_fail;
sig->status = strtoul (end, NULL, 10);
goto parse_err_sig_ok;
parse_err_sig_fail: