Prevent SSL downgrade during redirect

This commit is contained in:
Silas Parker 2017-02-22 11:25:47 +00:00 committed by Andy Green
parent 3db9eca06a
commit 2e1dcc542e

View file

@ -521,6 +521,13 @@ lws_client_interpret_server_handshake(struct lws *wsi)
}
}
#ifdef LWS_OPENSSL_SUPPORT
if (wsi->use_ssl && !ssl) {
cce = "HS: Redirect attempted SSL downgrade";
goto bail3;
}
#endif
if (!lws_client_reset(&wsi, ssl, ads, port, path, ads)) {
/* there are two ways to fail out with NULL return...
* simple, early problem where the wsi is intact, or