Adding some details on SSL and fast_forward implementation

pull/4062/head
René Cannaò 3 years ago
parent 9dde792c46
commit cdc8423569

@ -207,12 +207,19 @@ class MySQL_Data_Stream
myconn=mc;
myconn->statuses.myconnpoll_get++;
mc->myds=this;
encrypted = false; // this is the default
// we handle encryption for backend
//
// we have a similar code in MySQL_Connection
// in case of ASYNC_CONNECT_SUCCESSFUL
encrypted = false;
if (sess != NULL && sess->session_fast_forward == true) {
// if frontend and backend connection use SSL we will set
// encrypted = true and we will start using the SSL structure
// directly from P_MARIADB_TLS structure.
//
// For futher details:
// - without ssl: we use the file descriptor from mysql connection
// - with ssl: we use the SSL structure from mysql connection
if (myconn->mysql && myconn->ret_mysql) {
if (myconn->mysql->options.use_ssl == 1) {
encrypted = true;

@ -1118,6 +1118,7 @@ handler_again:
// we handle encryption for backend
//
// we have a similar code in MySQL_Data_Stream::attach_connection()
// see there for further details
if (mysql->options.use_ssl == 1)
if (myds)
if (myds->sess != NULL)

@ -532,7 +532,7 @@ int MySQL_Data_Stream::read_from_net() {
r = recv(fd, queue_w_ptr(queueIN), s, 0);
}
}
} else {
} else { // encrypted == true
/*
if (!SSL_is_init_finished(ssl)) {
int ret = SSL_do_handshake(ssl);

Loading…
Cancel
Save