Commit 8f3f1f65 authored by Mike Hibler's avatar Mike Hibler
Browse files

use a more accurate test to determine which HMAC routines to use

parent 905c32fe
......@@ -1249,6 +1249,7 @@ address_tuple_free(address_tuple_t tuple)
/*
* Insert an HMAC into the notifcation.
*/
#include <openssl/opensslv.h>
#include <openssl/hmac.h>
/*
......@@ -1313,7 +1314,7 @@ event_notification_insert_hmac(event_handle_t handle,
}
memset(&ctx, 0, sizeof(ctx));
#ifdef linux
#if (OPENSSL_VERSION_NUMBER < 0x0090703f)
HMAC_Init(&ctx, handle->keydata, handle->keylen, EVP_sha1());
#else
HMAC_CTX_init(&ctx);
......@@ -1387,7 +1388,7 @@ event_notification_check_hmac(event_handle_t handle,
}
memset(&ctx, 0, sizeof(ctx));
#ifdef linux
#if (OPENSSL_VERSION_NUMBER < 0x0090703f)
HMAC_Init(&ctx, handle->keydata, handle->keylen, EVP_sha1());
#else
HMAC_CTX_init(&ctx);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment