diff --git a/include/re.h b/include/re.h index 209354b..1c4e28b 100644 --- a/include/re.h +++ b/include/re.h @@ -26,6 +26,7 @@ extern "C" { #include "re_crc32.h" #include "re_dns.h" #include "re_hash.h" +#include "re_hmac.h" #include "re_http.h" #include "re_httpauth.h" #include "re_ice.h" diff --git a/include/re_hmac.h b/include/re_hmac.h index 13fa68c..9660d04 100644 --- a/include/re_hmac.h +++ b/include/re_hmac.h @@ -14,7 +14,7 @@ void hmac_sha1(const uint8_t *k, /* secret key */ enum hmac_hash { - HMAC_SHA1 + HMAC_HASH_SHA1 }; struct hmac; diff --git a/src/hmac/hmac.c b/src/hmac/hmac.c index 5a916c5..2c407b6 100644 --- a/src/hmac/hmac.c +++ b/src/hmac/hmac.c @@ -32,7 +32,7 @@ int hmac_create(struct hmac **hmacp, enum hmac_hash hash, if (!hmacp || !key || !key_len) return EINVAL; - if (hash != HMAC_SHA1) + if (hash != HMAC_HASH_SHA1) return ENOTSUP; if (key_len > SHA_DIGEST_LENGTH) diff --git a/src/hmac/openssl/hmac.c b/src/hmac/openssl/hmac.c index 53c1e76..4735ca8 100644 --- a/src/hmac/openssl/hmac.c +++ b/src/hmac/openssl/hmac.c @@ -32,7 +32,7 @@ int hmac_create(struct hmac **hmacp, enum hmac_hash hash, if (!hmacp || !key || !key_len) return EINVAL; - if (hash != HMAC_SHA1) + if (hash != HMAC_HASH_SHA1) return ENOTSUP; hmac = mem_zalloc(sizeof(*hmac), destructor);