Fix OpenSSL 1.0 memleak when using RSA.

This commit is contained in:
Xie Han
2023-02-22 16:35:00 +08:00
parent a580f0b618
commit 844c8ea7bb

View File

@@ -27,8 +27,8 @@
#include <openssl/bio.h>
#include "WFTaskError.h"
#include "WFTaskFactory.h"
#include "MySQLMessage.h"
#include "StringUtil.h"
#include "WFGlobal.h"
#include "mysql_types.h"
using namespace protocol;
@@ -212,6 +212,9 @@ CommMessageOut *ComplexMySQLTask::message_out()
auth_switch_req->set_password(password_);
auth_switch_req->set_auth_plugin_name(std::move(conn->str));
auth_switch_req->set_seed(conn->seed);
#if OPENSSL_VERSION_NUMBER < 0x10100000L
WFGlobal::get_ssl_client_ctx();
#endif
break;
case ST_SHA256_PUBLIC_KEY_REQUEST: