summaryrefslogtreecommitdiffstats
path: root/src/crypto/hmac
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/hmac')
-rw-r--r--src/crypto/hmac/CMakeLists.txt2
-rw-r--r--src/crypto/hmac/hmac.c2
-rw-r--r--src/crypto/hmac/hmac_tests.txt3
3 files changed, 5 insertions, 2 deletions
diff --git a/src/crypto/hmac/CMakeLists.txt b/src/crypto/hmac/CMakeLists.txt
index 392ce01..11d267f 100644
--- a/src/crypto/hmac/CMakeLists.txt
+++ b/src/crypto/hmac/CMakeLists.txt
@@ -1,4 +1,4 @@
-include_directories(../../include)
+include_directories(. .. ../../include)
add_library(
hmac
diff --git a/src/crypto/hmac/hmac.c b/src/crypto/hmac/hmac.c
index d37a249..556e7f9 100644
--- a/src/crypto/hmac/hmac.c
+++ b/src/crypto/hmac/hmac.c
@@ -97,7 +97,7 @@ void HMAC_CTX_cleanup(HMAC_CTX *ctx) {
EVP_MD_CTX_cleanup(&ctx->i_ctx);
EVP_MD_CTX_cleanup(&ctx->o_ctx);
EVP_MD_CTX_cleanup(&ctx->md_ctx);
- OPENSSL_cleanse(ctx, sizeof(HMAC_CTX));
+ OPENSSL_cleanse(ctx, sizeof(ctx));
}
int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, size_t key_len,
diff --git a/src/crypto/hmac/hmac_tests.txt b/src/crypto/hmac/hmac_tests.txt
index 53f3f8f..012f593 100644
--- a/src/crypto/hmac/hmac_tests.txt
+++ b/src/crypto/hmac/hmac_tests.txt
@@ -1,3 +1,6 @@
+# This test file is shared between evp_test and hmac_test, to test the legacy
+# EVP_PKEY_HMAC API.
+
HMAC = MD5
# Note: The empty key results in passing NULL to HMAC_Init_ex, so this tests
# that HMAC_CTX and HMAC treat NULL as the empty key initially.