[PATCH] Limit digest checks to enabled algorithms
Werner Koch
wk at gnupg.org
Thu Mar 13 11:43:17 CET 2014
On Wed, 12 Mar 2014 19:10, dbaryshkov at gmail.com said:
> * tests/basic.c (check_digests): put #ifdef USE_xxx around checks to
> disable checks for algorithms being compiled out.
I do not think this is a good idea. It would be too easy to accidently
skip a test for an algorithm which is actually included. A runtime
tests seems to be better. I did it this way:
PASS: t-lock
PASS: prime
hash algorithm 5 not available - skipping tests
hash algorithm 5 not available - skipping tests
hash algorithm 5 not available - skipping tests
PASS: basic
PASS: keygen
By inspecting the test output you would immediately notice that an
algtoithm was not tested. I consider disabling algorithms an exception
and thus the diagnostics won't harm. For MD2 I would silent the
diagnotics, though.
Shalom-Salam,
Werner
--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
More information about the Gcrypt-devel
mailing list