Commit a42faf1c authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Write TLS alert during handshake

parent 4aac05e1
...@@ -461,12 +461,21 @@ int Connection::tls_handshake() { ...@@ -461,12 +461,21 @@ int Connection::tls_handshake() {
break; break;
case SSL_ERROR_WANT_WRITE: case SSL_ERROR_WANT_WRITE:
break; break;
case SSL_ERROR_SSL: case SSL_ERROR_SSL: {
if (LOG_ENABLED(INFO)) { if (LOG_ENABLED(INFO)) {
LOG(INFO) << "tls: handshake libssl error: " LOG(INFO) << "tls: handshake libssl error: "
<< ERR_error_string(ERR_get_error(), nullptr); << ERR_error_string(ERR_get_error(), nullptr);
} }
struct iovec iov;
auto iovcnt = tls.wbuf.riovec(&iov, 1);
auto nwrite = writev_clear(&iov, iovcnt);
if (nwrite > 0) {
tls.wbuf.drain(nwrite);
}
return SHRPX_ERR_NETWORK; return SHRPX_ERR_NETWORK;
}
default: default:
if (LOG_ENABLED(INFO)) { if (LOG_ENABLED(INFO)) {
LOG(INFO) << "tls: handshake libssl error " << err; LOG(INFO) << "tls: handshake libssl error " << err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment