Skip to content

Commit

Permalink
nghttpx: Drop connection if client TLS handshake packet is too large
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuhiro-t committed Aug 12, 2015
1 parent 0c4cbc8 commit 4733112
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/shrpx_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,13 @@ int Connection::tls_handshake() {
auto err = SSL_get_error(tls.ssl, rv);
switch (err) {
case SSL_ERROR_WANT_READ:
if (read_buffer_full(tls.rbuf)) {
if (LOG_ENABLED(INFO)) {
LOG(INFO) << "tls: handshake message is too large";
}
return -1;
}
break;
case SSL_ERROR_WANT_WRITE:
break;
default:
Expand Down

0 comments on commit 4733112

Please sign in to comment.