Skip to content

Commit

Permalink
Prevent SSL downgrade during redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
skyhisi authored and lws-team committed Feb 23, 2017
1 parent 3db9eca commit 2e1dcc5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/client.c
Expand Up @@ -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
Expand Down

0 comments on commit 2e1dcc5

Please sign in to comment.