fixed compiling error for samples with ssl

This commit is contained in:
zhengshuxin 2020-07-16 09:12:39 +08:00
parent 2e70cef3e7
commit 88c756a462
10 changed files with 10 additions and 10 deletions

View File

@ -234,7 +234,7 @@ public:
// 设置 SSL 方式
if (__ssl_conf) {
acl::sslbase_io* ssl = __ssl_conf->open(true);
acl::sslbase_io* ssl = __ssl_conf->create(true);
if (client_->setup_hook(ssl) == ssl) {
std::cout << "open ssl error!" << std::endl;
ssl->destroy();

View File

@ -291,7 +291,7 @@ public:
// SSL 模式下,等待客户端发送握手信息
if (__ssl_conf != NULL) {
// 注册 SSL IO 过程的钩子
acl::sslbase_io* ssl = __ssl_conf->open(true, true);
acl::sslbase_io* ssl = __ssl_conf->create(true);
if (client->setup_hook(ssl) == ssl) {
std::cout << "setup_hook error" << std::endl;

View File

@ -36,7 +36,7 @@ bool https_client::connect_server(const acl::string& server_addr,
if (ssl_conf_) {
logger_debug(DEBUG, 1, "begin open ssl");
acl::sslbase_io* ssl = ssl_conf_->open(false);
acl::sslbase_io* ssl = ssl_conf_->create(false);
if (client.get_stream().setup_hook(ssl) == ssl) {
out_.puts("open ssl client error");
ssl->destroy();

View File

@ -73,7 +73,7 @@ acl::sslbase_io* master_service::setup_ssl(acl::socket_stream& conn,
out_.puts("begin setup ssl hook...");
// 采用阻塞 SSL 握手方式
acl::sslbase_io* ssl = conf.open(false);
acl::sslbase_io* ssl = conf.create(false);
if (conn.setup_hook(ssl) == ssl) {
logger_error("setup_hook error!");
ssl->destroy();

View File

@ -72,7 +72,7 @@ static acl::sslbase_io* setup_ssl(acl::socket_stream& conn, acl::sslbase_conf& c
//logger("begin setup ssl hook...");
// 采用阻塞 SSL 握手方式
acl::sslbase_io* ssl = conf.open(false);
acl::sslbase_io* ssl = conf.create(false);
if (conn.setup_hook(ssl) == ssl) {
logger_error("setup_hook error!");
ssl->destroy();

View File

@ -16,7 +16,7 @@ static bool test(const char* addr, int k, int nloop)
exit (1);
}
acl::sslbase_io* ssl = __ssl_conf->open(false);
acl::sslbase_io* ssl = __ssl_conf->create(false);
if (client.setup_hook(ssl) == ssl) {
std::cout << "open ssl " << addr << " error!" << std::endl;
ssl->destroy();

View File

@ -341,7 +341,7 @@ protected:
logger("begin setup ssl hook...");
acl::sslbase_io* ssl = conf_->open(false);
acl::sslbase_io* ssl = conf_->create(false);
if (stream->setup_hook(ssl) == ssl) {
logger_error("setup_hook error!");
ssl->destroy();

View File

@ -68,7 +68,7 @@ static acl::sslbase_io* setup_ssl(acl::socket_stream& conn,
//logger("begin setup ssl hook...");
// 采用非阻塞 SSL 握手方式
acl::sslbase_io* ssl = conf.open(true);
acl::sslbase_io* ssl = conf.create(true);
if (conn.setup_hook(ssl) == ssl) {
logger_error("setup_hook error!");
ssl->destroy();

View File

@ -16,7 +16,7 @@ static void http_server(ACL_FIBER *, void *ctx)
printf("start one http_server\r\n");
acl::sslbase_io* ssl = __ssl_conf->open(true, false);
acl::sslbase_io* ssl = __ssl_conf->create(false);
if (conn->setup_hook(ssl) == ssl) {
printf("setup_hook error\r\n");

View File

@ -17,7 +17,7 @@ static void echo_fiber(ACL_FIBER *, void *ctx)
printf("start one server\r\n");
if (__ssl_conf != NULL) {
acl::sslbase_io* ssl = __ssl_conf->open(true, false);
acl::sslbase_io* ssl = __ssl_conf->create(false);
if (conn->setup_hook(ssl) == ssl) {
printf("setup_hook error\r\n");