diff options
author | Arne Schwabe | 2021-12-13 16:06:54 +0100 |
---|---|---|
committer | Gert Doering | 2021-12-13 19:43:28 +0100 |
commit | b39725cf811cbe9334355d4c90990047494a6cc2 (patch) | |
tree | 757d1b7fc74071628915b4e3e9a83b6a9cf4ed10 /tests | |
parent | 985e9dbda4688280014a3ea01ffe99def1ce5be8 (diff) | |
download | openvpn-b39725cf811cbe9334355d4c90990047494a6cc2.zip openvpn-b39725cf811cbe9334355d4c90990047494a6cc2.tar.gz |
Remove md_kt_t and change crypto API to use const char*
As with the removal of cipher_kt_t, this is allows better support of
OpenSSL 3.0 and mbed TLS 3.0
Patch v2: rebase
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20211213150654.3993358-2-arne@rfc2549.org>
URL: https://www.mail-archive.com/search?l=mid&q=20211213150654.3993358-2-arne@rfc2549.org
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit_tests/openvpn/test_crypto.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/unit_tests/openvpn/test_crypto.c b/tests/unit_tests/openvpn/test_crypto.c index 344817e..51672f9 100644 --- a/tests/unit_tests/openvpn/test_crypto.c +++ b/tests/unit_tests/openvpn/test_crypto.c @@ -174,14 +174,13 @@ static void crypto_test_hmac(void **state) { hmac_ctx_t *hmac = hmac_ctx_new(); - const md_kt_t *sha1 = md_kt_get("SHA1"); - assert_int_equal(md_kt_size(sha1), 20); + assert_int_equal(md_kt_size("SHA1"), 20); uint8_t key[20]; memcpy(key, testkey, sizeof(key)); - hmac_ctx_init(hmac, key, sha1); + hmac_ctx_init(hmac, key, "SHA1"); hmac_ctx_update(hmac, (const uint8_t *)ipsumlorem, (int) strlen(ipsumlorem)); hmac_ctx_update(hmac, (const uint8_t *)ipsumlorem, (int) strlen(ipsumlorem)); |