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
@ -125,11 +125,17 @@ check_result (gpgme_verify_result_t result, int no_of_sigs, int skip_sigs,
|
|||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
if (strcmp (sig->fpr, fpr))
|
if (strcmp (sig->fpr, fpr))
|
||||||
|
{
|
||||||
|
if (strlen (sig->fpr) == 16 && strlen (fpr) == 40
|
||||||
|
&& !strncmp (sig->fpr, fpr + 24, 16))
|
||||||
|
; /* okay because gnupg < 2.2.6 only shows the keyid. */
|
||||||
|
else
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s:%i:sig-%d: Unexpected fingerprint: %s\n",
|
fprintf (stderr, "%s:%i:sig-%d: Unexpected fingerprint: %s\n",
|
||||||
PGM, __LINE__, skip_sigs, sig->fpr);
|
PGM, __LINE__, skip_sigs, sig->fpr);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (gpgme_err_code (sig->status) != status)
|
if (gpgme_err_code (sig->status) != status)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s:%i:sig-%d: Unexpected signature status: %s\n",
|
fprintf (stderr, "%s:%i:sig-%d: Unexpected signature status: %s\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user