[mod_secdownload] support if HMAC() is a macro

support if HMAC() is a macro, which may not handle CONST_BUF_LEN()
expanding to two arguments
personal/stbuehler/fix-fdevent
Glenn Strauss 2018-09-25 21:42:57 -04:00
parent 5b327e0089
commit e1f21b2adb
1 changed files with 2 additions and 2 deletions

View File

@ -189,7 +189,7 @@ static int secdl_verify_mac(server *srv, plugin_config *config, const char* prot
if (NULL == HMAC(
EVP_sha1(),
(unsigned char const*) CONST_BUF_LEN(config->secret),
(unsigned char const*) config->secret->ptr, buffer_string_length(config->secret),
(unsigned char const*) protected_path, strlen(protected_path),
digest, NULL)) {
log_error_write(srv, __FILE__, __LINE__, "s",
@ -211,7 +211,7 @@ static int secdl_verify_mac(server *srv, plugin_config *config, const char* prot
if (NULL == HMAC(
EVP_sha256(),
(unsigned char const*) CONST_BUF_LEN(config->secret),
(unsigned char const*) config->secret->ptr, buffer_string_length(config->secret),
(unsigned char const*) protected_path, strlen(protected_path),
digest, NULL)) {
log_error_write(srv, __FILE__, __LINE__, "s",