The class SSLManager (NetSSL_OpenSSL/include/Poco/Net/SSLManager.h) declares a variable _socketIndex, the value of which is used in SecureSocketImpl to store and retrieve application data in SSL*
This is not initialized and can lead to errors.
It should be initialized using the function SSL_get_ex_new_index in the constructor.