better loggin on auth error

This commit is contained in:
nohar 2005-05-15 22:46:28 +00:00
parent e9884c5b03
commit 43384d8bd5
2 changed files with 9 additions and 5 deletions

View File

@ -1135,11 +1135,13 @@ static int SSLize(connection_t *cn, int *nc)
if (len > 0) if (len > 0)
buf[len-1] = '\0'; buf[len-1] = '\0';
mylog(LOG_DEBUG, "Negociated cyphers: %s",buf); mylog(LOG_DEBUG, "Negociated cyphers: %s",buf);
/* if (SSL_get_verify_result(cn->ssl_h) != X509_V_OK) { /*
if (SSL_get_verify_result(cn->ssl_h) != X509_V_OK) {
mylog(LOG_ERROR, "Invalid certificate !"); mylog(LOG_ERROR, "Invalid certificate !");
cn->connected = CONN_ERROR; cn->connected = CONN_ERROR;
return 1; return 1;
}*/ }
*/
cn->connected = CONN_OK; cn->connected = CONN_OK;
*nc = 1; *nc = 1;
return 0; return 0;

View File

@ -567,6 +567,10 @@ static int irc_cli_startup(struct link_client *ic, struct line *line,
} }
} }
if (!LINK(ic))
mylog(LOG_ERROR, "Invalid credentials (user: %s realname:%s)",
ic->init_user, ic->init_real_name);
free(ic->init_pass); free(ic->init_pass);
ic->init_pass = NULL; ic->init_pass = NULL;
init_nick = ic->init_nick; init_nick = ic->init_nick;
@ -2054,10 +2058,8 @@ void irc_main(connection_t *inc, list_t *ll)
"closing..."); "closing...");
goto prot_err_lines; goto prot_err_lines;
} }
if (r == ERR_AUTH) { if (r == ERR_AUTH)
mylog(LOG_ERROR, "Invalid credentials");
goto prot_err_lines; goto prot_err_lines;
}
/* XXX: not real error */ /* XXX: not real error */
if (r == OK_CLOSE) if (r == OK_CLOSE)
goto prot_err_lines; goto prot_err_lines;