Upgraded to OpenSSL 1.1.0+

This commit is contained in:
evilny0 2021-02-06 14:47:39 +01:00
parent b0bd473e96
commit 046dc79a04
2 changed files with 6 additions and 7 deletions

View File

@ -6,7 +6,7 @@ Cryptocurrencies portfolio manager.
* MySQL * MySQL
* C++ REST SDK : https://github.com/Microsoft/cpprestsdk * C++ REST SDK : https://github.com/Microsoft/cpprestsdk
* OpenSSL * OpenSSL (1.1.0+)
* GMP * GMP
* Boost * Boost
* sqlpp11 (modified to handle decimal type) : https://github.com/evilny0/sqlpp11/tree/decimal * sqlpp11 (modified to handle decimal type) : https://github.com/evilny0/sqlpp11/tree/decimal

View File

@ -222,14 +222,13 @@ vector<unsigned char> ExchangeHandlerKraken::hmac_sha512(const vector<unsigned c
unsigned int len = EVP_MAX_MD_SIZE; unsigned int len = EVP_MAX_MD_SIZE;
vector<unsigned char> digest(len); vector<unsigned char> digest(len);
HMAC_CTX ctx; HMAC_CTX* ctx = HMAC_CTX_new();
HMAC_CTX_init(&ctx);
HMAC_Init_ex(&ctx, key.data(), key.size(), EVP_sha512(), NULL); HMAC_Init_ex(ctx, key.data(), key.size(), EVP_sha512(), NULL);
HMAC_Update(&ctx, data.data(), data.size()); HMAC_Update(ctx, data.data(), data.size());
HMAC_Final(&ctx, digest.data(), &len); HMAC_Final(ctx, digest.data(), &len);
HMAC_CTX_cleanup(&ctx); HMAC_CTX_free(ctx);
return digest; return digest;
} }