use sslbase_conf/sslbase_io other than polarssl_conf/polarssl_io

This commit is contained in:
shuxin   zheng 2019-12-18 11:40:41 +08:00
parent 7c86d76c33
commit d8518893b2
16 changed files with 55 additions and 55 deletions

View File

@ -21,8 +21,8 @@ class aio_socket_stream;
class socket_stream;
class zlib_stream;
class websocket;
class polarssl_conf;
class polarssl_io;
class sslbase_conf;
class sslbase_io;
class http_header;
/**
@ -37,9 +37,9 @@ public:
/**
*
* @param handle {aio_handle&}
* @param ssl_conf {polarssl_conf*} NULL SSL
* @param ssl_conf {sslbase_conf*} NULL SSL
*/
http_aclient(aio_handle& handle, polarssl_conf* ssl_conf = NULL);
http_aclient(aio_handle& handle, sslbase_conf* ssl_conf = NULL);
virtual ~http_aclient(void);
/**
@ -74,16 +74,16 @@ public:
* ssl_conf NULL ssl_enable_
* false ssl_conf enable_ssl()
* ssl
* @param ssl_conf {polarssl_conf*} NULL SSL功能
* @param ssl_conf {sslbase_conf*} NULL SSL功能
* @return {http_aclient&}
*/
http_aclient& set_ssl_conf(polarssl_conf* ssl_conf);
http_aclient& set_ssl_conf(sslbase_conf* ssl_conf);
/**
* SSL
* @return {polarssl_conf*} NULL
* @return {sslbase_conf*} NULL
*/
polarssl_conf* get_ssl_conf(void) const
sslbase_conf* get_ssl_conf(void) const
{
return ssl_conf_;
}
@ -384,7 +384,7 @@ protected:
bool keep_alive_;
bool unzip_; // 是否自动解压响应体数据
aio_handle& handle_;
polarssl_conf* ssl_conf_; // 非空时才允许启用 SSL 功能
sslbase_conf* ssl_conf_; // 非空时才允许启用 SSL 功能
bool ssl_enable_; // 是否启用 SSL 功能
aio_socket_stream* conn_;
socket_stream* stream_;

View File

@ -10,7 +10,7 @@ class http_client;
class http_pipe;
class socket_stream;
class charset_conv;
class polarssl_conf;
class sslbase_conf;
class xml;
class json;
@ -60,10 +60,10 @@ public:
/**
* SSL SSL
* @param conf {polarssl_conf*} SSL
* @param conf {sslbase_conf*} SSL
* @return {http_request&}
*/
http_request& set_ssl(polarssl_conf* conf);
http_request& set_ssl(sslbase_conf* conf);
/**
* HTTP HTTP
@ -310,7 +310,7 @@ protected:
private:
char addr_[64];
bool unzip_;
polarssl_conf* ssl_conf_;
sslbase_conf* ssl_conf_;
char local_charset_[64];
charset_conv* conv_;
http_client* client_;

View File

@ -5,7 +5,7 @@
namespace acl
{
class polarssl_conf;
class sslbase_conf;
/**
* HTTP
@ -18,9 +18,9 @@ public:
/**
* SSL
* @param ssl_conf {polarssl_conf*}
* @param ssl_conf {sslbase_conf*}
*/
void set_ssl(polarssl_conf* ssl_conf);
void set_ssl(sslbase_conf* ssl_conf);
protected:
/**
@ -34,7 +34,7 @@ protected:
connect_pool* create_pool(const char* addr, size_t count, size_t idx);
private:
polarssl_conf* ssl_conf_;
sslbase_conf* ssl_conf_;
};
} // namespace acl

View File

@ -5,7 +5,7 @@
namespace acl
{
class polarssl_conf;
class sslbase_conf;
/**
* http connect_pool
@ -29,16 +29,16 @@ public:
/**
* SSL
* @param ssl_conf {polarssl_conf*}
* @param ssl_conf {sslbase_conf*}
*/
void set_ssl(polarssl_conf* ssl_conf);
void set_ssl(sslbase_conf* ssl_conf);
protected:
// 基类纯虚函数,该函数返回后由基类设置该连接池的网络连接及网络 IO 超时时间
virtual connect_client* create_connect();
private:
polarssl_conf* ssl_conf_;
sslbase_conf* ssl_conf_;
};
class ACL_CPP_API http_guard : public connect_guard

View File

@ -13,7 +13,7 @@ namespace acl
class dbuf_pool;
class redis_result;
class redis_request;
class polarssl_conf;
class sslbase_conf;
/**
* redis redis redis
@ -44,9 +44,9 @@ public:
* SSL NULL SSL
* SSL
* set SSL communication with Redis-server if ssl_conf not NULL
* @param ssl_conf {polarssl_conf*}
* @param ssl_conf {sslbase_conf*}
*/
void set_ssl_conf(polarssl_conf* ssl_conf);
void set_ssl_conf(sslbase_conf* ssl_conf);
/**
* redis
@ -180,7 +180,7 @@ private:
bool slice_req_;
bool slice_res_;
int dbnum_;
polarssl_conf* ssl_conf_;
sslbase_conf* ssl_conf_;
redis_result* get_redis_objects(dbuf_pool* pool, size_t nobjs);
redis_result* get_redis_object(dbuf_pool* pool);

View File

@ -10,7 +10,7 @@
namespace acl
{
class polarssl_conf;
class sslbase_conf;
class redis_client_pool;
@ -140,10 +140,10 @@ public:
* SSL NULL SSL
* SSL
* set SSL communication with Redis-server if ssl_conf not NULL
* @param ssl_conf {polarssl_conf*}
* @param ssl_conf {sslbase_conf*}
* @return {redis_client_cluster&}
*/
redis_client_cluster& set_ssl_conf(polarssl_conf* ssl_conf);
redis_client_cluster& set_ssl_conf(sslbase_conf* ssl_conf);
/**
* redis
@ -200,7 +200,7 @@ private:
int redirect_max_;
int redirect_sleep_;
std::map<string, string> passwds_;
polarssl_conf* ssl_conf_;
sslbase_conf* ssl_conf_;
};
} // namespace acl

View File

@ -7,7 +7,7 @@
namespace acl
{
class polarssl_conf;
class sslbase_conf;
/**
* redis connect_pool connect_pool
@ -38,10 +38,10 @@ public:
* SSL NULL SSL
* SSL
* set SSL communication with Redis-server if ssl_conf not NULL
* @param ssl_conf {polarssl_conf*}
* @param ssl_conf {sslbase_conf*}
* @return {redis_client_pool&}
*/
redis_client_pool& set_ssl_conf(polarssl_conf* ssl_conf);
redis_client_pool& set_ssl_conf(sslbase_conf* ssl_conf);
/**
* redis
@ -80,7 +80,7 @@ protected:
private:
char* pass_;
int dbnum_;
polarssl_conf* ssl_conf_;
sslbase_conf* ssl_conf_;
};
} // namespace acl

View File

@ -11,7 +11,7 @@ struct SMTP_CLIENT;
namespace acl {
class istream;
class polarssl_conf;
class sslbase_conf;
class mail_message;
/**
@ -60,10 +60,10 @@ public:
/**
* SSL
* @param ssl_conf {polarssl_conf*} SSL
* @param ssl_conf {sslbase_conf*} SSL
* @return {smtp_client&}
*/
smtp_client& set_ssl(polarssl_conf* ssl_conf);
smtp_client& set_ssl(sslbase_conf* ssl_conf);
/**
* SMTP
@ -207,7 +207,7 @@ public:
}
private:
polarssl_conf* ssl_conf_;
sslbase_conf* ssl_conf_;
char* addr_;
int conn_timeout_;
int rw_timeout_;

View File

@ -5,8 +5,8 @@
#include "acl_cpp/stream/aio_handle.hpp"
#include "acl_cpp/stream/socket_stream.hpp"
#include "acl_cpp/stream/aio_socket_stream.hpp"
#include "acl_cpp/stream/polarssl_conf.hpp"
#include "acl_cpp/stream/polarssl_io.hpp"
#include "acl_cpp/stream/sslbase_conf.hpp"
#include "acl_cpp/stream/sslbase_io.hpp"
#include "acl_cpp/http/http_header.hpp"
#include "acl_cpp/http/websocket.hpp"
#include "acl_cpp/http/http_aclient.hpp"
@ -22,7 +22,7 @@ enum {
HTTP_ACLIENT_STATUS_WS_READING,
};
http_aclient::http_aclient(aio_handle& handle, polarssl_conf* ssl_conf /* NULL */)
http_aclient::http_aclient(aio_handle& handle, sslbase_conf* ssl_conf /* NULL */)
: status_(HTTP_ACLIENT_STATUS_NONE)
, rw_timeout_(0)
, gzip_header_left_(0)
@ -81,7 +81,7 @@ http_aclient& http_aclient::unzip_body(bool on)
return *this;
}
http_aclient& http_aclient::set_ssl_conf(polarssl_conf* ssl_conf)
http_aclient& http_aclient::set_ssl_conf(sslbase_conf* ssl_conf)
{
ssl_conf_ = ssl_conf;
return *this;
@ -407,7 +407,7 @@ bool http_aclient::handle_ssl_handshake(void)
{
#if defined(HAS_POLARSSL_DLL) || defined(HAS_POLARSSL)
// 否则,则是第一次进行 SSL 握手阶段的 IO 过程
polarssl_io* ssl_io = (polarssl_io*) conn_->get_hook();
sslbase_io* ssl_io = (sslbase_io*) conn_->get_hook();
if (ssl_io == NULL) {
logger_error("no ssl_io hooked!");
return false;

View File

@ -5,8 +5,8 @@
#include "acl_cpp/stdlib/xml.hpp"
#include "acl_cpp/stdlib/json.hpp"
#include "acl_cpp/stdlib/string.hpp"
#include "acl_cpp/stream/polarssl_conf.hpp"
#include "acl_cpp/stream/polarssl_io.hpp"
#include "acl_cpp/stream/sslbase_conf.hpp"
#include "acl_cpp/stream/sslbase_io.hpp"
#include "acl_cpp/stream/socket_stream.hpp"
#include "acl_cpp/stdlib/charset_conv.hpp"
#include "acl_cpp/stdlib/pipe_stream.hpp"
@ -120,7 +120,7 @@ http_request& http_request::set_unzip(bool on)
return *this;
}
http_request& http_request::set_ssl(polarssl_conf* ssl_conf)
http_request& http_request::set_ssl(sslbase_conf* ssl_conf)
{
ssl_conf_ = ssl_conf;
return *this;

View File

@ -16,7 +16,7 @@ http_request_manager::~http_request_manager()
{
}
void http_request_manager::set_ssl(polarssl_conf* ssl_conf)
void http_request_manager::set_ssl(sslbase_conf* ssl_conf)
{
ssl_conf_ = ssl_conf;
}

View File

@ -18,7 +18,7 @@ http_request_pool::~http_request_pool()
{
}
void http_request_pool::set_ssl(polarssl_conf* ssl_conf)
void http_request_pool::set_ssl(sslbase_conf* ssl_conf)
{
ssl_conf_ = ssl_conf;
}

View File

@ -5,8 +5,8 @@
#include "acl_cpp/stdlib/log.hpp"
#include "acl_cpp/stdlib/snprintf.hpp"
#include "acl_cpp/stream/socket_stream.hpp"
#include "acl_cpp/stream/polarssl_conf.hpp"
#include "acl_cpp/stream/polarssl_io.hpp"
#include "acl_cpp/stream/sslbase_conf.hpp"
#include "acl_cpp/stream/sslbase_io.hpp"
#include "acl_cpp/redis/redis_result.hpp"
#include "acl_cpp/redis/redis_connection.hpp"
#include "acl_cpp/redis/redis_client.hpp"
@ -50,7 +50,7 @@ void redis_client::set_check_addr(bool on)
check_addr_ = on;
}
void redis_client::set_ssl_conf(polarssl_conf* ssl_conf)
void redis_client::set_ssl_conf(sslbase_conf* ssl_conf)
{
ssl_conf_ = ssl_conf;
}

View File

@ -171,7 +171,7 @@ void redis_client_cluster::set_all_slot(const char* addr, size_t max_conns,
}
}
redis_client_cluster& redis_client_cluster::set_ssl_conf(polarssl_conf* ssl_conf)
redis_client_cluster& redis_client_cluster::set_ssl_conf(sslbase_conf* ssl_conf)
{
ssl_conf_ = ssl_conf;
return *this;

View File

@ -24,7 +24,7 @@ redis_client_pool::~redis_client_pool(void)
acl_myfree(pass_);
}
redis_client_pool& redis_client_pool::set_ssl_conf(polarssl_conf* ssl_conf)
redis_client_pool& redis_client_pool::set_ssl_conf(sslbase_conf* ssl_conf)
{
ssl_conf_ = ssl_conf;
return *this;

View File

@ -3,8 +3,8 @@
#include "acl_cpp/stdlib/log.hpp"
#include "acl_cpp/stdlib/util.hpp"
#include "acl_cpp/stream/istream.hpp"
#include "acl_cpp/stream/polarssl_conf.hpp"
#include "acl_cpp/stream/polarssl_io.hpp"
#include "acl_cpp/stream/sslbase_conf.hpp"
#include "acl_cpp/stream/sslbase_io.hpp"
#include "acl_cpp/mime/rfc822.hpp"
#include "acl_cpp/smtp/mail_message.hpp"
#include "acl_cpp/smtp/smtp_client.hpp"
@ -33,7 +33,7 @@ smtp_client::~smtp_client(void)
close();
}
smtp_client& smtp_client::set_ssl(polarssl_conf* ssl_conf)
smtp_client& smtp_client::set_ssl(sslbase_conf* ssl_conf)
{
ssl_conf_ = ssl_conf;
return *this;