]> jfr.im git - solanum.git/commitdiff
Show reason for failed outgoing SSL handshakes to opers.
authorJilles Tjoelker <redacted>
Sun, 29 Jun 2008 19:56:31 +0000 (21:56 +0200)
committerJilles Tjoelker <redacted>
Sun, 29 Jun 2008 19:56:31 +0000 (21:56 +0200)
Also add a comment that ircd does not care about the
reason for failed incoming SSL handshakes.
ircd-ratbox r25651

ssld/ssld.c

index f6e49ccb2b8a456ea8f619ed30d2978d375d4892..d79735e233821186e4a9ad9d301fa886b0815e47 100644 (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);
                return;
        }
+       /* ircd doesn't care about the reason for this */
        close_conn(conn, NO_WAIT, 0);
        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_plain_read_cb(conn->plain_fd, conn);
-               return;
        }
-       close_conn(conn, NO_WAIT, 0);
-       return;
+       else if(status == RB_ERR_TIMEOUT)
+               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");
 }