Error C2664: unable to convert the argument 1 from 'const EVP_PKEY *' to 'EVP_PKEY *'

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>
This commit is contained in:
Francis ANDRE 2022-08-19 07:38:22 +02:00
parent a41d802ccd
commit 5c612d80a7

View File

@ -84,7 +84,7 @@ namespace
if (EVP_PKEY_encrypt_init(_pCtx) <= 0)
throwError(Poco::format(fmt, std::string("EVP_PKEY_encrypt_init")));
_blockSize = EVP_PKEY_size(_pEVP);
_blockSize = EVP_PKEY_size(const_cast<EVP_PKEY*>(_pEVP));
if (!_blockSize)
throwError(Poco::format(fmt, std::string("EVP_PKEY_size")));
_pBuf = new unsigned char[_blockSize];
@ -197,7 +197,7 @@ namespace
if (EVP_PKEY_decrypt_init(_pCtx) <= 0)
throwError(Poco::format(fmt, std::string("EVP_PKEY_decrypt_init")));
_blockSize = EVP_PKEY_size(_pEVP);
_blockSize = EVP_PKEY_size(const_cast<EVP_PKEY*>(_pEVP));
if (!_blockSize)
throwError(Poco::format(fmt, std::string("EVP_PKEY_size")));
_pBuf = new unsigned char[_blockSize];