1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-25 10:42:18 -05:00

Disable challangeauth without openssl

This commit is contained in:
TingPing 2013-09-04 17:34:57 -04:00
parent a903f16c68
commit bdb18828e3
3 changed files with 13 additions and 2 deletions

View File

@ -1151,7 +1151,6 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
case WORDL('N','O','T','I'): case WORDL('N','O','T','I'):
{ {
int id = FALSE; /* identified */ int id = FALSE; /* identified */
char *response;
text = word_eol[4]; text = word_eol[4];
if (*text == ':') if (*text == ':')
@ -1159,9 +1158,10 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
text++; text++;
} }
#ifdef USE_OPENSSL
if (!strncmp (text, "CHALLENGE ", 10)) /* QuakeNet CHALLENGE upon our request */ if (!strncmp (text, "CHALLENGE ", 10)) /* QuakeNet CHALLENGE upon our request */
{ {
response = challengeauth_response (((ircnet *)serv->network)->user ? ((ircnet *)serv->network)->user : prefs.hex_irc_user_name, serv->password, word[5]); char *response = challengeauth_response (((ircnet *)serv->network)->user ? ((ircnet *)serv->network)->user : prefs.hex_irc_user_name, serv->password, word[5]);
tcp_sendf (serv, "PRIVMSG %s :CHALLENGEAUTH %s %s %s\r\n", tcp_sendf (serv, "PRIVMSG %s :CHALLENGEAUTH %s %s %s\r\n",
CHALLENGEAUTH_NICK, CHALLENGEAUTH_NICK,
@ -1172,6 +1172,7 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
g_free (response); g_free (response);
return; /* omit the CHALLENGE <hash> ALGOS message */ return; /* omit the CHALLENGE <hash> ALGOS message */
} }
#endif
if (serv->have_idmsg) if (serv->have_idmsg)
{ {

View File

@ -2210,6 +2210,7 @@ find_font (const char *fontname)
} }
#endif #endif
#ifdef USE_OPENSSL
static char * static char *
str_sha256hash (char *string) str_sha256hash (char *string)
{ {
@ -2285,3 +2286,4 @@ challengeauth_response (char *username, char *password, char *challenge)
return (char *) digest; return (char *) digest;
} }
#endif

View File

@ -120,11 +120,15 @@ static int login_types_conf[] =
{ {
LOGIN_DEFAULT, /* default entry - we don't use this but it makes indexing consistent with login_types[] so it's nice */ LOGIN_DEFAULT, /* default entry - we don't use this but it makes indexing consistent with login_types[] so it's nice */
LOGIN_SASL, LOGIN_SASL,
#ifdef USE_OPENSSL
LOGIN_SASLEXTERNAL, LOGIN_SASLEXTERNAL,
#endif
LOGIN_PASS, LOGIN_PASS,
LOGIN_MSG_NICKSERV, LOGIN_MSG_NICKSERV,
LOGIN_NICKSERV, LOGIN_NICKSERV,
#ifdef USE_OPENSSL
LOGIN_CHALLENGEAUTH, LOGIN_CHALLENGEAUTH,
#endif
LOGIN_CUSTOM LOGIN_CUSTOM
#if 0 #if 0
LOGIN_NS, LOGIN_NS,
@ -137,11 +141,15 @@ static const char *login_types[]=
{ {
"Default", "Default",
"SASL (username + password)", "SASL (username + password)",
#ifdef USE_OPENSSL
"SASL EXTERNAL (cert)", "SASL EXTERNAL (cert)",
#endif
"Server Password (/PASS password)", "Server Password (/PASS password)",
"NickServ (/MSG NickServ + password)", "NickServ (/MSG NickServ + password)",
"NickServ (/NICKSERV + password)", "NickServ (/NICKSERV + password)",
#ifdef USE_OPENSSL
"Challenge Auth (username + password)", "Challenge Auth (username + password)",
#endif
"Custom... (connect commands)", "Custom... (connect commands)",
#if 0 #if 0
"NickServ (/NS + password)", "NickServ (/NS + password)",