summaryrefslogtreecommitdiffstats
path: root/src/plugins/unittest/crypto_test.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2019-03-20 02:43:20 -0700
committerDamjan Marion <dmarion@me.com>2019-03-22 17:32:25 +0000
commit063dfa1587a58319fac139eab5e655ad1c555e33 (patch)
tree53c704e5e382842dcc037025b6814ba084c0c831 /src/plugins/unittest/crypto_test.c
parent831d23866ab1010a7d7343aa1df024c8b65790b9 (diff)
crypto: implement rfc4231 test cases
Change-Id: I540241672a20f687d20bb70adbf2b33200f34167 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/plugins/unittest/crypto_test.c')
-rw-r--r--src/plugins/unittest/crypto_test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/unittest/crypto_test.c b/src/plugins/unittest/crypto_test.c
index 1df483efd56..6d57cea82c7 100644
--- a/src/plugins/unittest/crypto_test.c
+++ b/src/plugins/unittest/crypto_test.c
@@ -69,6 +69,7 @@ test_crypto (vlib_main_t * vm, crypto_test_main_t * tm)
op->dst = computed_data + computed_data_total_len;
op->len = r->data.length;
op->key_len = r->key.length;
+ op->hmac_trunc_len = r->hmac_trunc_len;
computed_data_total_len += r->expected.length;
/* next */
r = r->next;
@@ -95,7 +96,7 @@ test_crypto (vlib_main_t * vm, crypto_test_main_t * tm)
if (fail & tm->verbose)
{
vlib_cli_output (vm, "Expected:\n%U\nCalculated:\n%U",
- format_hexdump, r->expected, r->expected.length,
+ format_hexdump, r->expected.data, r->expected.length,
format_hexdump, op->dst, r->expected.length);
}
}