mirror of
https://github.com/pocoproject/poco.git
synced 2025-12-24 14:19:08 +01:00
Merge remote-tracking branch 'pocoproject@github/develop' into pr/1113
This commit is contained in:
@@ -51,6 +51,11 @@ Transaction::~Transaction()
|
||||
|
||||
_rSession.rollback();
|
||||
}
|
||||
catch (Poco::Exception& exc)
|
||||
{
|
||||
if (_pLogger)
|
||||
_pLogger->error("Error while rolling back database transaction: %s", exc.displayText());
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
if (_pLogger)
|
||||
@@ -93,7 +98,7 @@ void Transaction::execute(const std::vector<std::string>& sql)
|
||||
}
|
||||
catch (Exception& ex)
|
||||
{
|
||||
if (_pLogger) _pLogger->error(ex.displayText());
|
||||
if (_pLogger) _pLogger->log(ex);
|
||||
}
|
||||
|
||||
rollback();
|
||||
|
||||
@@ -368,10 +368,18 @@ void Context::createSSLContext()
|
||||
switch (_usage)
|
||||
{
|
||||
case CLIENT_USE:
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
_pSSLContext = SSL_CTX_new(TLS_client_method());
|
||||
#else
|
||||
_pSSLContext = SSL_CTX_new(SSLv23_client_method());
|
||||
#endif
|
||||
break;
|
||||
case SERVER_USE:
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
_pSSLContext = SSL_CTX_new(TLS_server_method());
|
||||
#else
|
||||
_pSSLContext = SSL_CTX_new(SSLv23_server_method());
|
||||
#endif
|
||||
break;
|
||||
#if defined(SSL_OP_NO_TLSv1) && !defined(OPENSSL_NO_TLS1)
|
||||
case TLSV1_CLIENT_USE:
|
||||
|
||||
@@ -148,7 +148,8 @@ Context::Ptr SSLManager::defaultClientContext()
|
||||
catch (Poco::IllegalStateException&)
|
||||
{
|
||||
_ptrClientCertificateHandler = new RejectCertificateHandler(false);
|
||||
_ptrDefaultClientContext = new Context(Context::TLSV1_CLIENT_USE, "", Context::VERIFY_RELAXED, 9, true);
|
||||
_ptrDefaultClientContext = new Context(Context::CLIENT_USE, "", Context::VERIFY_RELAXED, 9, true);
|
||||
_ptrDefaultClientContext->disableProtocols(Context::PROTO_SSLV2 | Context::PROTO_SSLV3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user