Commit 9fd7bdf9 authored by Greg Williams's avatar Greg Williams
Browse files

Added #pragmas to kinetic_hmac.c to disable deprecation warnings for API...

Added #pragmas to kinetic_hmac.c to disable deprecation warnings for API future deprecations in OpenSSL, since no info can be found on how to use the 'new'/'desired' API.
parent b4a918e6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -96,6 +96,10 @@ static void KineticHMAC_Compute(
    unsigned int len = protobuf_c_message_get_packed_size((ProtobufCMessage*)proto->command);
    uint8_t* command = malloc(len);
    protobuf_c_message_pack((ProtobufCMessage*)proto->command, command);

#pragma push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

    HMAC_CTX_init(&ctx);
    HMAC_Init_ex(&ctx, key, keyLen, EVP_sha1(), NULL);

@@ -109,5 +113,7 @@ static void KineticHMAC_Compute(
    HMAC_Final(&ctx, hmac->value, &hmac->valueLength);
    HMAC_CTX_cleanup(&ctx);

#pragma pop

    free(command);
}