Fix backend SSL

The backend SSL connections weren't authenticated due to an inverted
check. This caused all SSL connections to fail.
This commit is contained in:
Markus Makela 2016-11-12 13:19:14 +02:00
parent 2b2d2cc679
commit 11bee30f61
2 changed files with 6 additions and 1 deletions

View File

@ -617,6 +617,11 @@ gw_read_backend_event(DCB *dcb)
gw_reply_on_error(dcb, proto->protocol_auth_state);
}
}
else if (proto->protocol_auth_state == MXS_AUTH_STATE_CONNECTED &&
dcb->ssl_state == SSL_ESTABLISHED)
{
proto->protocol_auth_state = gw_send_backend_auth(dcb);
}
}
return rc;

View File

@ -1339,7 +1339,7 @@ mxs_auth_state_t gw_send_backend_auth(DCB *dcb)
(dcb->session->state != SESSION_STATE_READY &&
dcb->session->state != SESSION_STATE_ROUTER_READY) ||
(dcb->server->server_ssl &&
dcb->ssl_state != SSL_HANDSHAKE_FAILED))
dcb->ssl_state == SSL_HANDSHAKE_FAILED))
{
return MXS_AUTH_STATE_FAILED;
}