diff options
author | Daiki Ueno <ueno@gnu.org> | 2021-04-23 10:11:35 +0000 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2021-04-23 10:11:35 +0000 |
commit | badb8e4a67bd0b5657f5f7d2fe4d48f2bba30283 (patch) | |
tree | 4616629a4e2efa96e07d12182db2a3185bfa63cd | |
parent | c1a3f1e3173d779af5d3f1d7e5c26d4bbf0fcad3 (diff) | |
parent | 3565b4b742fb1287b65d16d9b62765a2f894e853 (diff) | |
download | gnutls-badb8e4a67bd0b5657f5f7d2fe4d48f2bba30283.tar.gz |
Merge branch 'wip/dueno/hash-copy-selftests' into 'master'
crypto-selftests: tolerate errors of gnutls_{hash,hmac}_copy
See merge request gnutls/gnutls!1412
-rw-r--r-- | lib/crypto-selftests.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/crypto-selftests.c b/lib/crypto-selftests.c index d076ad1324..36b7d067b2 100644 --- a/lib/crypto-selftests.c +++ b/lib/crypto-selftests.c @@ -2298,8 +2298,10 @@ static int test_digest(gnutls_digest_algorithm_t dig, return gnutls_assert_val(GNUTLS_E_SELF_TEST_ERROR); copy = gnutls_hash_copy(hd); - if (!copy) - return gnutls_assert_val(GNUTLS_E_SELF_TEST_ERROR); + if (!copy) { + _gnutls_debug_log("copy is not supported for: %s\n", + gnutls_digest_get_name(dig)); + } ret = gnutls_hash(hd, &vectors[i].plaintext[1], @@ -2602,8 +2604,10 @@ static int test_mac(gnutls_mac_algorithm_t mac, return gnutls_assert_val(GNUTLS_E_SELF_TEST_ERROR); copy = gnutls_hmac_copy(hd); - if (!copy) - return gnutls_assert_val(GNUTLS_E_SELF_TEST_ERROR); + if (!copy) { + _gnutls_debug_log("copy is not supported for: %s\n", + gnutls_mac_get_name(mac)); + } ret = gnutls_hmac(hd, &vectors[i].plaintext[1], |