Skip to content

Commit

Permalink
chore(Crypto): fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
aleks-f committed Aug 21, 2022
1 parent c023404 commit 9b8fe57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Crypto/src/EVPCipherImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ namespace
throwError(Poco::format(fmt, std::string("EVP_PKEY_encrypt(NULL)")));
if (EVP_PKEY_encrypt(_pCtx, output, &outLen, _pBuf, static_cast<std::size_t>(maxSize)) <= 0)
throwError(Poco::format(fmt, std::string("EVP_PKEY_encrypt")));
rc += outLen;
rc += static_cast<int>(outLen);
output += outLen;
outputLength -= outLen;
_pos = 0;
Expand Down Expand Up @@ -241,7 +241,7 @@ namespace
throwError(Poco::format(fmt, std::string("EVP_PKEY_decrypt(NULL)")));
if (EVP_PKEY_decrypt(_pCtx, output, &outLen, _pBuf, static_cast<std::size_t>(_pos)) <= 0)
throwError(Poco::format(fmt, std::string("EVP_PKEY_decrypt")));
rc += outLen;
rc += static_cast<int>(outLen);
output += outLen;
outputLength -= outLen;
_pos = 0;
Expand Down
4 changes: 3 additions & 1 deletion Crypto/src/Envelope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
#include "Poco/Crypto/Envelope.h"

#if OPENSSL_VERSION_NUMBER >= 0x10100000L
#define EVP_CIPHER_CTX_init(a) 1
#if !defined(EVP_CIPHER_CTX_init)
#define EVP_CIPHER_CTX_init(a)
#endif
#endif

namespace Poco {
Expand Down

0 comments on commit 9b8fe57

Please sign in to comment.