Files
ylib/include/net/http_ssl.h
2024-05-29 00:00:47 +08:00

48 lines
2.0 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
#include "http_define.h"
#if USE_NET_HTTP_WEBSITE
#include <functional>
#include "http_interface.h"
#include <map>
namespace ylib
{
namespace network
{
namespace http
{
class server;
/******************************************************
* class域名器
******************************************************/
class ssl :public ylib::error_base, public network::http::interface_
{
public:
/**********************************************************************************************
* function构造函数
* param
* server HTTP服务
* config 配置
**********************************************************************************************/
ssl(network::http::server* server,ssl_config config);
~ssl();
/**********************************************************************************************
* function注册证书
**********************************************************************************************/
bool regist();
/**********************************************************************************************
* function绑定
**********************************************************************************************/
bool bind(const std::string& host);
private:
ssl_config m_config;
std::string m_pem_cert_data;
std::string m_pem_key_data;
std::string m_pem_ca_data;
network::http::server* m_server;
int32 m_index;
};
}
}
}
#endif