log ip address and port when tls_handshake fails

These connection are not otherwise logged and it could be helpful
to track down the bad ip.
This commit is contained in:
Omar Polo 2023-08-28 21:42:58 +00:00
parent 6be41efe33
commit c440a0ded9
1 changed files with 2 additions and 1 deletions

View File

@ -373,7 +373,8 @@ handle_handshake(int fd, short ev, void *d)
case 0: /* success */
break;
case -1:
log_warnx("tls_handshake failed: %s", tls_error(c->ctx));
log_warnx("(%s:%s) tls_handshake failed: %s",
c->rhost, c->rserv, tls_error(c->ctx));
client_close(c);
return;
case TLS_WANT_POLLIN: