diff --git a/ActiveRecord/Compiler/src/Compiler.cpp b/ActiveRecord/Compiler/src/Compiler.cpp index 140f24be4d..f5bd06faaf 100644 --- a/ActiveRecord/Compiler/src/Compiler.cpp +++ b/ActiveRecord/Compiler/src/Compiler.cpp @@ -78,7 +78,7 @@ class CompilerApp: public Application helpFormatter.setHeader( "\n" "The POCO C++ Libraries ActiveRecord ORM Compiler.\n" - "Copyright (c) 2020-2021 by Applied Informatics Software Engineering GmbH.\n" + "Copyright (c) 2020-2022 by Applied Informatics Software Engineering GmbH.\n" "All rights reserved.\n\n" "This program generates C++ source code from an ActiveRecord " "XML definition. " diff --git a/CHANGELOG b/CHANGELOG index 2cce38b755..dd04b8d0c6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,14 @@ This is the changelog file for the POCO C++ Libraries. +Release 1.11.3 (2022-06-12) +=========================== + +- GH #3567: fix(openssl-initializer): check legacy provider existence for legacy exception +- GH #3587: MySQL UUID binding temporary string +- GH #3632: Redis - add TLS support +- updated a few copyright dates + + Release 1.11.2 (2022-04-16) =========================== diff --git a/Crypto/include/Poco/Crypto/OpenSSLInitializer.h b/Crypto/include/Poco/Crypto/OpenSSLInitializer.h index aa29cc63e2..4bba5455f8 100644 --- a/Crypto/include/Poco/Crypto/OpenSSLInitializer.h +++ b/Crypto/include/Poco/Crypto/OpenSSLInitializer.h @@ -63,10 +63,10 @@ class Crypto_API OpenSSLInitializer /// Shuts down the OpenSSL machinery. static bool isFIPSEnabled(); - // Returns true if FIPS mode is enabled, false otherwise. + /// Returns true if FIPS mode is enabled, false otherwise. static void enableFIPSMode(bool enabled); - // Enable or disable FIPS mode. If FIPS is not available, this method doesn't do anything. + /// Enable or disable FIPS mode. If FIPS is not available, this method doesn't do anything. protected: enum diff --git a/Crypto/src/OpenSSLInitializer.cpp b/Crypto/src/OpenSSLInitializer.cpp index 3cdeb1470a..1d2c925518 100644 --- a/Crypto/src/OpenSSLInitializer.cpp +++ b/Crypto/src/OpenSSLInitializer.cpp @@ -136,8 +136,8 @@ void OpenSSLInitializer::initialize() } if (!_legacyProvider) { - _legacyProvider = OSSL_PROVIDER_load(NULL, "legacy"); - if (!_defaultProvider) throw CryptoException("Failed to load OpenSSL legacy provider"); + _legacyProvider = OSSL_PROVIDER_load(NULL, "legacy"); + if (!_legacyProvider) throw CryptoException("Failed to load OpenSSL legacy provider"); } #endif } @@ -157,7 +157,6 @@ void OpenSSLInitializer::uninitialize() #endif delete [] _mutexes; #endif - } } diff --git a/DLLVersion.rc b/DLLVersion.rc index 4dc20e6f6b..75c78e5781 100644 --- a/DLLVersion.rc +++ b/DLLVersion.rc @@ -4,8 +4,8 @@ #include "winres.h" -#define POCO_VERSION 1,11,2,0 -#define POCO_VERSION_STR "1.11.2" +#define POCO_VERSION 1,11,3,0 +#define POCO_VERSION_STR "1.11.3" VS_VERSION_INFO VERSIONINFO FILEVERSION POCO_VERSION diff --git a/Data/MySQL/src/Binder.cpp b/Data/MySQL/src/Binder.cpp index c1fb4e7df4..9bb19ee9d8 100644 --- a/Data/MySQL/src/Binder.cpp +++ b/Data/MySQL/src/Binder.cpp @@ -213,8 +213,7 @@ void Binder::bind(std::size_t pos, const Time& val, Direction dir) void Binder::bind(std::size_t pos, const UUID& val, Direction dir) { - std::string str = val.toString(); - bind(pos, str, dir); + bind(pos, toString(val), dir); } diff --git a/Data/include/Poco/Data/AbstractBinder.h b/Data/include/Poco/Data/AbstractBinder.h index f0ea633467..f084ab8435 100644 --- a/Data/include/Poco/Data/AbstractBinder.h +++ b/Data/include/Poco/Data/AbstractBinder.h @@ -356,6 +356,13 @@ class Data_API AbstractBinder static bool isInBound(Direction dir); /// Returns true if direction is in bound; + +protected: + const std::string& toString(const UUID& uuid); + +private: + using StringList = std::vector; + std::unique_ptr _pStrings; }; diff --git a/Data/src/AbstractBinder.cpp b/Data/src/AbstractBinder.cpp index 8fe39e256b..f3ac4edcf8 100644 --- a/Data/src/AbstractBinder.cpp +++ b/Data/src/AbstractBinder.cpp @@ -33,6 +33,19 @@ AbstractBinder::AbstractBinder() AbstractBinder::~AbstractBinder() { + if (_pStrings) + { + for (auto& s : *_pStrings) + delete s; + } +} + + +const std::string& AbstractBinder::toString(const UUID& uuid) +{ + if (!_pStrings) _pStrings.reset(new StringList); + _pStrings->push_back(new std::string(uuid.toString())); + return *_pStrings->back(); } diff --git a/Encodings/Compiler/src/TextEncodingCompiler.cpp b/Encodings/Compiler/src/TextEncodingCompiler.cpp index 08299432f6..ff1e410c9c 100644 --- a/Encodings/Compiler/src/TextEncodingCompiler.cpp +++ b/Encodings/Compiler/src/TextEncodingCompiler.cpp @@ -117,7 +117,7 @@ class TextEncodingCompiler: public Application helpFormatter.setHeader( "\n" "The POCO C++ Text Encodings Compiler.\n" - "Copyright (c) 2018-2021 by Applied Informatics Software Engineering GmbH.\n" + "Copyright (c) 2018-2022 by Applied Informatics Software Engineering GmbH.\n" "All rights reserved.\n\n" "This program compiles Unicode character encoding tables " "from http://www.unicode.org/Public/MAPPINGS/ to TextEncoding " diff --git a/Foundation/include/Poco/Version.h b/Foundation/include/Poco/Version.h index a0a05a92c3..9ef9c629ba 100644 --- a/Foundation/include/Poco/Version.h +++ b/Foundation/include/Poco/Version.h @@ -35,7 +35,7 @@ // Ax: alpha releases // Bx: beta releases // -#define POCO_VERSION 0x010B0200 +#define POCO_VERSION 0x010B0300 #endif // Foundation_Version_INCLUDED diff --git a/Redis/include/Poco/Redis/Client.h b/Redis/include/Poco/Redis/Client.h index 079947e9b0..009cd18998 100644 --- a/Redis/include/Poco/Redis/Client.h +++ b/Redis/include/Poco/Redis/Client.h @@ -87,6 +87,11 @@ class Redis_API Client Client(const Net::SocketAddress& addrs); /// Constructor which connects to the given Redis host/port. + Client(const Net::StreamSocket& socket); + /// Constructor which connects using an existing TCP + /// connection. This can be used to connect via TLS, if the + /// given socket is a Poco::Net::SecureStreamSocket. + virtual ~Client(); /// Destroys the Client. @@ -113,6 +118,11 @@ class Redis_API Client void connect(const Net::SocketAddress& addrs, const Timespan& timeout); /// Connects to the given Redis server. + void connect(const Net::StreamSocket& socket); + /// Connects to the given Redis server using an existing TCP + /// connection. This can be used to connect via TLS, if the + /// given socket is a Poco::Net::SecureStreamSocket. + void disconnect(); /// Disconnects from the Redis server. diff --git a/Redis/src/Client.cpp b/Redis/src/Client.cpp index 6d28f6a29d..60b97f4e50 100644 --- a/Redis/src/Client.cpp +++ b/Redis/src/Client.cpp @@ -61,6 +61,16 @@ Client::Client(const Net::SocketAddress& addrs): } +Client::Client(const Net::StreamSocket& socket): + _address(), + _socket(), + _input(0), + _output(0) +{ + connect(socket); +} + + Client::~Client() { delete _input; @@ -133,6 +143,18 @@ void Client::connect(const Net::SocketAddress& addrs, const Timespan& timeout) } +void Client::connect(const Poco::Net::StreamSocket& socket) +{ + poco_assert(! _input); + poco_assert(! _output); + + _address = socket.peerAddress(); + _socket = socket; + _input = new RedisInputStream(_socket); + _output = new RedisOutputStream(_socket); +} + + void Client::disconnect() { delete _input; diff --git a/VERSION b/VERSION index ca7176690d..0a5af26df3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.11.2 +1.11.3 diff --git a/doc/99100-ReleaseNotes.page b/doc/99100-ReleaseNotes.page index ca8c4214e1..201ade50e7 100644 --- a/doc/99100-ReleaseNotes.page +++ b/doc/99100-ReleaseNotes.page @@ -1,6 +1,16 @@ POCO C++ Libraries Release Notes AAAIntroduction +!!!Release 1.11.3 + +!!Summary of Changes + + - GH #3567: fix(openssl-initializer): check legacy provider existence for legacy exception + - GH #3587: MySQL UUID binding temporary string + - GH #3632: Redis - add TLS support + - updated a few copyright dates + + !!!Release 1.11.2 !!Summary of Changes diff --git a/libversion b/libversion index 9d1ce53f8c..24af08a487 100644 --- a/libversion +++ b/libversion @@ -1 +1 @@ -82 \ No newline at end of file +83 \ No newline at end of file