mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 20:13:05 +02:00
Updated web services client classes to use SSLConfigAPI, and to support PolarSSL or OpenSSL.
This commit is contained in:
parent
51fbf93a93
commit
93f10d74e2
@ -38,7 +38,6 @@
|
||||
#include <openvpn/transport/tcplink.hpp>
|
||||
#include <openvpn/http/reply.hpp>
|
||||
#include <openvpn/http/status.hpp>
|
||||
#include <openvpn/ws/sslbase.hpp>
|
||||
|
||||
namespace openvpn {
|
||||
namespace WS {
|
||||
@ -72,7 +71,7 @@ namespace openvpn {
|
||||
max_header_bytes(0),
|
||||
max_content_bytes(0) {}
|
||||
|
||||
SSL::Context::Ptr ssl_ctx;
|
||||
SSLFactoryAPI::Ptr ssl_factory;
|
||||
std::string user_agent;
|
||||
unsigned int connect_timeout;
|
||||
unsigned int general_timeout;
|
||||
@ -408,10 +407,10 @@ namespace openvpn {
|
||||
{
|
||||
host = http_host();
|
||||
if (host.port.empty())
|
||||
host.port = config->ssl_ctx ? "443" : "80";
|
||||
host.port = config->ssl_factory ? "443" : "80";
|
||||
|
||||
if (config->ssl_ctx)
|
||||
ssl_sess = config->ssl_ctx->new_session(host.host);
|
||||
if (config->ssl_factory)
|
||||
ssl_sess = config->ssl_factory->ssl(host.host);
|
||||
|
||||
if (config->connect_timeout)
|
||||
{
|
||||
@ -871,7 +870,7 @@ namespace openvpn {
|
||||
boost::asio::ip::tcp::socket socket;
|
||||
boost::asio::ip::tcp::resolver resolver;
|
||||
|
||||
SSL::Session::Ptr ssl_sess;
|
||||
SSLAPI::Ptr ssl_sess;
|
||||
|
||||
Host host;
|
||||
ContentInfo content_info;
|
||||
|
Loading…
Reference in New Issue
Block a user