common: Fix -Wswitch warning.
* common/compliance.c (gnupg_digest_is_allowed): Don't include GCRY_MD_WHIRLPOOL because it is not a digest_algo_t.
Note that Whirlpool is not used anywhere in gpg or gpgsm.
- Signed-off-by: Werner Koch <wk@gnupg.org>
common: Fix -Wswitch warning.
Description
Details
Event TimelineComment Actions % sm/gpgsm --help|grep WHIRL Comment Actions Oh, that merely lists all has algorithms Libgcrypt supports (iirc, within some sensible range). So yes, gpgsm would support that but I have never encountered one and I guess only gpgsm would be able to create such a CMS message. Comment Actions I have see that you used all kind of precautions to avoid problems with the different types (enums/defines). However in --enable-maintainer-mode -Wswitch is enabled for a reasons ;-) Comment Actions No, that is a list of algorithms that gpgsm chooses to allow: static int our_md_test_algo (int algo) { switch (algo) { case GCRY_MD_MD5: case GCRY_MD_SHA1: case GCRY_MD_RMD160: case GCRY_MD_SHA224: case GCRY_MD_SHA256: case GCRY_MD_SHA384: case GCRY_MD_SHA512: case GCRY_MD_WHIRLPOOL: return gcry_md_test_algo (algo); default: return 1; } } ... digests = build_list("Hash: ", gcry_md_algo_name, our_md_test_algo ); Then I propose to change the signature of these functions so that we use a plain int for the algorithms. I implemented the policy described in "that document" and it explicitly allows the use of Whirlpool for some uses. |