fixing compilation for openssl-1.1.0 (chacha20.cc, HMAC structure, part 2)

This commit is contained in:
csoler 2017-02-19 11:10:25 +01:00
parent d7bfc3264b
commit 57bbd15893

View File

@ -548,7 +548,7 @@ bool AEAD_chacha20_sha256(uint8_t key[32], uint8_t nonce[12],uint8_t *data,uint3
#else
HMAC_CTX *hmac_ctx = HMAC_CTX_new();
HMAC_Init_ex(hmac_ctx,key,32,EVP_sha256()) ;
HMAC_Init_ex(hmac_ctx,key,32,EVP_sha256(),NULL) ;
HMAC_Update(hmac_ctx,aad,aad_size) ;
HMAC_Update(hmac_ctx,data,data_size) ;
HMAC_Final(hmac_ctx,computed_tag,&md_size) ;
@ -579,7 +579,7 @@ bool AEAD_chacha20_sha256(uint8_t key[32], uint8_t nonce[12],uint8_t *data,uint3
#else
HMAC_CTX *hmac_ctx = HMAC_CTX_new();
HMAC_Init_ex(hmac_ctx,key,32,EVP_sha256()) ;
HMAC_Init_ex(hmac_ctx,key,32,EVP_sha256(),NULL) ;
HMAC_Update(hmac_ctx,aad,aad_size) ;
HMAC_Update(hmac_ctx,data,data_size) ;
HMAC_Final(hmac_ctx,computed_tag,&md_size) ;