void HttpServer::bind(const std::string& address, SSLContext ctx, const std::string& port) { auto acc = HttpServer::bind(service_, address, port); acc->setSSLContext(std::move(ctx)); BOOST_LOG_TRIVIAL(debug) << "SSL bind address: " << address << " on port: " << port; acceptors_.push_back(acc); ++running_acceptors_; start_accept(acc); }
/** * Sets the soap-endpoint & SSL context for the given ICAT proxy. */ void ICat4Catalog::setICATProxySettings(ICATPortBindingProxy &icat) { // The soapEndPoint is only set when the user logs into the catalog. // If it's not set the correct error is returned (invalid sessionID) from the // ICAT server. if (m_session->getSoapEndpoint().empty()) return; // Stop receiving packets from ICAT server after period of time. icat.recv_timeout = boost::lexical_cast<int>( ConfigService::Instance().getString("catalog.timeout.value")); // Set the soap-endpoint of the catalog we want to use. icat.soap_endpoint = m_session->getSoapEndpoint().c_str(); // Sets SSL authentication scheme setSSLContext(icat); }
void HttpServer::bind(const std::string& address, SSLContext ctx, const std::string& port) { if (not running_) { throw std::logic_error( "Http server must be started before bind is called"); } auto acc = HttpServer::bind(pool_->getService(), address, port); acc->setSSLContext(std::move(ctx)); LOG(server_logger, debug) << "SSL bind address: " << address << " on port: " << port; acceptors_.push_back(acc); ++running_acceptors_; start_accept(acc); }