mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
missing include <cstring>
This commit is contained in:
parent
88a8b2b723
commit
57bd673b01
@ -16,14 +16,14 @@
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
@ -40,6 +40,7 @@
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/rsa.h>
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
@ -50,7 +51,7 @@ static void throwError()
|
||||
{
|
||||
unsigned long err;
|
||||
std::string msg;
|
||||
|
||||
|
||||
while ((err = ERR_get_error()))
|
||||
{
|
||||
if (!msg.empty())
|
||||
@ -73,7 +74,7 @@ public:
|
||||
const RSA* pRSA);
|
||||
|
||||
~RSAEncryptImpl();
|
||||
|
||||
|
||||
std::size_t blockSize() const;
|
||||
|
||||
std::streamsize transform(
|
||||
@ -81,7 +82,7 @@ public:
|
||||
std::streamsize inputLength,
|
||||
unsigned char* output,
|
||||
std::streamsize outputLength);
|
||||
|
||||
|
||||
std::streamsize finalize(
|
||||
unsigned char* output,
|
||||
std::streamsize length);
|
||||
@ -121,7 +122,7 @@ std::streamsize RSAEncryptImpl::transform(
|
||||
unsigned char* output,
|
||||
std::streamsize outputLength)
|
||||
{
|
||||
|
||||
|
||||
// always fill up the buffer before writing!
|
||||
std::streamsize rsaSize = blockSize();
|
||||
poco_assert_dbg(_pos <= rsaSize);
|
||||
@ -142,7 +143,7 @@ std::streamsize RSAEncryptImpl::transform(
|
||||
output += tmp;
|
||||
outputLength -= tmp;
|
||||
_pos = 0;
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -190,7 +191,7 @@ public:
|
||||
const RSA* pRSA);
|
||||
|
||||
~RSADecryptImpl();
|
||||
|
||||
|
||||
std::size_t blockSize() const;
|
||||
|
||||
std::streamsize transform(
|
||||
@ -198,7 +199,7 @@ public:
|
||||
std::streamsize inputLength,
|
||||
unsigned char* output,
|
||||
std::streamsize outputLength);
|
||||
|
||||
|
||||
std::streamsize finalize(
|
||||
unsigned char* output,
|
||||
std::streamsize length);
|
||||
@ -238,7 +239,7 @@ std::streamsize RSADecryptImpl::transform(
|
||||
unsigned char* output,
|
||||
std::streamsize outputLength)
|
||||
{
|
||||
|
||||
|
||||
// always fill up the buffer before decrypting!
|
||||
std::streamsize rsaSize = blockSize();
|
||||
poco_assert_dbg(_pos <= rsaSize);
|
||||
@ -258,7 +259,7 @@ while (inputLength > 0)
|
||||
output += tmp;
|
||||
outputLength -= tmp;
|
||||
_pos = 0;
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user