nghttpx: Drop connection if client TLS handshake packet is too large

This commit is contained in:
Tatsuhiro Tsujikawa 2015-08-13 01:24:59 +09:00
parent 0c4cbc800b
commit 473311269d
1 changed files with 7 additions and 0 deletions

View File

@ -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: