mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
tests: Cope with broken Libgcrypt versions
* common/t-sexputil.c (test_ecc_uncompress): Ignore unknwon curve errors. -- For unknown reasons some versions of Fedora or RHEL provide a patched version of Libgcrypt with Brainpool support removed. We better ignore this error because it is a regression in 2.2.28 although that older versions could not used Brainpool keys. GnuPG-bug-id: 5502 Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
edfe9453be
commit
5df658233a
@ -461,6 +461,21 @@ test_ecc_uncompress (void)
|
||||
if (bbuf)
|
||||
{
|
||||
err = uncompress_ecc_q_in_canon_sexp (bbuf, bbuflen, &rbuf, &rbuflen);
|
||||
if (gpg_err_code (err) == GPG_ERR_UNKNOWN_CURVE)
|
||||
{
|
||||
static int shown;
|
||||
fprintf (stderr, "%s:%d: test %d failed: %s - ignored\n",
|
||||
__FILE__,__LINE__, idx, gpg_strerror (err));
|
||||
if (!shown)
|
||||
{
|
||||
shown = 1;
|
||||
fprintf (stderr, "This is likely due to a patched"
|
||||
" version of Libgcrypt with removed support"
|
||||
" for Brainpool curves\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (err)
|
||||
fail2 (idx,err);
|
||||
if (!rbuf)
|
||||
@ -473,6 +488,7 @@ test_ecc_uncompress (void)
|
||||
if (rbuflen != abuflen || memcmp (rbuf, abuf, abuflen))
|
||||
fail (idx);
|
||||
}
|
||||
}
|
||||
|
||||
xfree (abuf);
|
||||
xfree (bbuf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user