diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2020-12-18 14:54:53 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2020-12-18 14:54:53 +0900 |
commit | c90fb0d8fb7a84bbcc8d6832de6a554405591850 (patch) | |
tree | 1688cf36d21b22424501869a57ea3d487061ef60 /cipher/mac-poly1305.c | |
parent | 1a83df98b198902ee6d71549231a3af37088d452 (diff) | |
download | libgcrypt-c90fb0d8fb7a84bbcc8d6832de6a554405591850.tar.gz |
Reorganize self-tests for HMAC.
* cipher/Makefile.am: Prepare merge of hmac-test.c into mac-hmac.c.
* cipher/hmac-tests.c: Ifdef-out run_selftests and _gcry_hmac_selftest.
* cipher/mac-internal.h: Include cipher-proto.h for selftest.
(gcry_mac_spec_ops): Add selftest field.
* cipher/mac-hmac.c: Include hmac-tests.c for migration.
(hmac_selftest) New.
(hmac_ops): Add hmac_selftest.
* cipher/gost28147.c, cipher/mac-cmac.c: Add new field for selftest.
* cipher/mac-gmac.c, cipher/mac-poly1305.c: Likewise..
* cipher/mac.c (_gcry_mac_selftest): New.
* src/fips.c (run_mac_selftests): Rename from run_hmac_selftests.
Use GCRY_MAC_HMAC_*, and call _gcry_mac_selftest.
(_gcry_fips_run_selftests): Use run_mac_selftests.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'cipher/mac-poly1305.c')
-rw-r--r-- | cipher/mac-poly1305.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cipher/mac-poly1305.c b/cipher/mac-poly1305.c index 39ba790f..d27a31c6 100644 --- a/cipher/mac-poly1305.c +++ b/cipher/mac-poly1305.c @@ -323,7 +323,8 @@ static gcry_mac_spec_ops_t poly1305mac_ops = { poly1305mac_verify, poly1305mac_get_maclen, poly1305mac_get_keylen, - NULL + NULL, + NULL, }; |