tests: Fix t-verify test for GnuPG < 2.2.7.
* tests/gpg/t-verify.c (check_result): Tweak for gnupg < 2.2.7.
--
The not yet releases 2.2.7-beta may print a full fingerprint in the
ERRSIG status. This is compliant with the dscription but the new
t-verify test case did not took in account that older GnuPG versions
print only a keyid.
Fixes-commit: b99502274a
GnUPG-bug-id: 3920
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
d98f08fa63
commit
3d8e5c0751
@ -126,9 +126,15 @@ check_result (gpgme_verify_result_t result, int no_of_sigs, int skip_sigs,
|
|||||||
}
|
}
|
||||||
if (strcmp (sig->fpr, fpr))
|
if (strcmp (sig->fpr, fpr))
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s:%i:sig-%d: Unexpected fingerprint: %s\n",
|
if (strlen (sig->fpr) == 16 && strlen (fpr) == 40
|
||||||
PGM, __LINE__, skip_sigs, sig->fpr);
|
&& !strncmp (sig->fpr, fpr + 24, 16))
|
||||||
exit (1);
|
; /* okay because gnupg < 2.2.6 only shows the keyid. */
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fprintf (stderr, "%s:%i:sig-%d: Unexpected fingerprint: %s\n",
|
||||||
|
PGM, __LINE__, skip_sigs, sig->fpr);
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (gpgme_err_code (sig->status) != status)
|
if (gpgme_err_code (sig->status) != status)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user