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