Show reason for failed outgoing SSL handshakes to opers.

Also add a comment that ircd does not care about the
reason for failed incoming SSL handshakes.
ircd-ratbox r25651
This commit is contained in:
Jilles Tjoelker 2008-06-29 21:56:31 +02:00
parent 78dfd39d42
commit a444bb7837

View file

@ -647,6 +647,7 @@ ssl_process_accept_cb(rb_fde_t * F, int status, struct sockaddr *addr, rb_sockle
conn_plain_read_cb(conn->plain_fd, conn); conn_plain_read_cb(conn->plain_fd, conn);
return; return;
} }
/* ircd doesn't care about the reason for this */
close_conn(conn, NO_WAIT, 0); close_conn(conn, NO_WAIT, 0);
return; return;
} }
@ -659,10 +660,13 @@ ssl_process_connect_cb(rb_fde_t * F, int status, void *data)
{ {
conn_mod_read_cb(conn->mod_fd, conn); conn_mod_read_cb(conn->mod_fd, conn);
conn_plain_read_cb(conn->plain_fd, conn); conn_plain_read_cb(conn->plain_fd, conn);
return;
} }
close_conn(conn, NO_WAIT, 0); else if(status == RB_ERR_TIMEOUT)
return; close_conn(conn, WAIT_PLAIN, "SSL handshake timed out");
else if(status == RB_ERROR_SSL)
close_conn(conn, WAIT_PLAIN, "%s", rb_get_ssl_strerror(conn->mod_fd));
else
close_conn(conn, WAIT_PLAIN, "SSL handshake failed");
} }