| 345 | |
| 346 | #if USE_SSL |
| 347 | void PostgreSQLHandler::makeSecureConnectionSSL() |
| 348 | { |
| 349 | message_transport->send('S', true); |
| 350 | Poco::Net::Context::Ptr ctx; |
| 351 | if (!params.privateKeyFile.empty() && !params.certificateFile.empty()) |
| 352 | { |
| 353 | ctx = Poco::Net::SSLManager::instance().getCustomServerContext(prefix); |
| 354 | if (!ctx) |
| 355 | { |
| 356 | ctx = new Poco::Net::Context(usage, params); |
| 357 | ctx->disableProtocols(disabled_protocols); |
| 358 | ctx->enableExtendedCertificateVerification(extended_verification); |
| 359 | if (prefer_server_ciphers) |
| 360 | ctx->preferServerCiphers(); |
| 361 | CertificateReloader::instance().tryLoad(config, ctx->sslContext(), prefix); |
| 362 | ctx = Poco::Net::SSLManager::instance().setCustomServerContext(prefix, ctx); |
| 363 | } |
| 364 | } |
| 365 | else |
| 366 | { |
| 367 | ctx = Poco::Net::SSLManager::instance().defaultServerContext(); |
| 368 | } |
| 369 | ss = std::make_shared<Poco::Net::SecureStreamSocket>(Poco::Net::SecureStreamSocket::attach(socket(), ctx)); |
| 370 | changeIO(*ss); |
| 371 | } |
| 372 | #else |
| 373 | void PostgreSQLHandler::makeSecureConnectionSSL() {} |
| 374 | #endif |
nothing calls this directly
no test coverage detected