4435 secure sock thread (#4512)

* fix(SecureSocket): Refactor detection of timeout when reading, writing or handshaking. (#3725)

* enh(SecureSocket): some trivial C++17 modernisation changes.

* chore: indentation and compiler warning

* fix(SecureSocketImpl): not thread-safe (1st attempt) #4435

* fix(SecureSocketImpl): silence CodeQL cpp/certificate-not-checked

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
This commit is contained in:
Aleksandar Fabijanic
2024-04-02 11:53:42 -05:00
committed by GitHub
parent 8d3de8a5ed
commit ece360393f
2 changed files with 43 additions and 7 deletions

View File

@@ -284,16 +284,21 @@ protected:
/// Callback to handle new session data sent by server.
private:
using MutexT = Poco::FastMutex;
using LockT = MutexT::ScopedLock;
using UnLockT = Poco::ScopedLockWithUnlock<MutexT>;
SecureSocketImpl(const SecureSocketImpl&);
SecureSocketImpl& operator = (const SecureSocketImpl&);
SSL* _pSSL;
std::atomic<SSL*> _pSSL;
Poco::AutoPtr<SocketImpl> _pSocket;
Context::Ptr _pContext;
bool _needHandshake;
std::string _peerHostName;
Session::Ptr _pSession;
bool _bidirectShutdown = true;
mutable MutexT _mutex;
friend class SecureStreamSocketImpl;
friend class Context;