Added TLS support for API and many other TLS related changes.

This commit is contained in:
XMRig 2020-03-18 20:09:11 +07:00
parent 92a258f142
commit 5b610e4dfe
No known key found for this signature in database
GPG key ID: 446A53638BE94409
38 changed files with 1601 additions and 178 deletions

View file

@ -28,11 +28,11 @@
#include <uv.h>
#include "base/net/http/HttpServer.h"
#include "3rdparty/http-parser/http_parser.h"
#include "base/kernel/interfaces/IHttpListener.h"
#include "base/net/http/HttpContext.h"
#include "base/net/http/HttpResponse.h"
#include "base/net/http/HttpServer.h"
xmrig::HttpServer::HttpServer(const std::shared_ptr<IHttpListener> &listener) :
@ -56,12 +56,7 @@ void xmrig::HttpServer::onConnection(uv_stream_t *stream, uint16_t)
[](uv_handle_t *, size_t suggested_size, uv_buf_t *buf)
{
buf->base = new char[suggested_size];
# ifdef _WIN32
buf->len = static_cast<unsigned int>(suggested_size);
# else
buf->len = suggested_size;
# endif
buf->len = suggested_size;
},
[](uv_stream_t *tcp, ssize_t nread, const uv_buf_t *buf)
{