summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2013-09-04 17:34:57 -0400
committerTingPing <tingping@tingping.se>2013-09-07 18:59:29 -0400
commitbdb18828e36340c1800a0eec9f4b5edc6ffae2b2 (patch)
treed6235e8c84112a0ceb72a6037304752d47ef47dc /src/common
parenta903f16c68dbcdf812d2e47e2cc3caff34d99176 (diff)
Disable challangeauth without openssl
Diffstat (limited to 'src/common')
-rw-r--r--src/common/proto-irc.c5
-rw-r--r--src/common/util.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c
index a7260896..250a2937 100644
--- a/src/common/proto-irc.c
+++ b/src/common/proto-irc.c
@@ -1151,7 +1151,6 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
 		case WORDL('N','O','T','I'):
 			{
 				int id = FALSE;								/* identified */
-				char *response;
 
 				text = word_eol[4];
 				if (*text == ':')
@@ -1159,9 +1158,10 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
 					text++;
 				}
 
+#ifdef USE_OPENSSL
 				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",
 						CHALLENGEAUTH_NICK,
@@ -1172,6 +1172,7 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
 					g_free (response);
 					return;									/* omit the CHALLENGE <hash> ALGOS message */
 				}
+#endif
 
 				if (serv->have_idmsg)
 				{
diff --git a/src/common/util.c b/src/common/util.c
index 374da6e5..9771b1f6 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -2210,6 +2210,7 @@ find_font (const char *fontname)
 }
 #endif
 
+#ifdef USE_OPENSSL
 static char *
 str_sha256hash (char *string)
 {
@@ -2285,3 +2286,4 @@ challengeauth_response (char *username, char *password, char *challenge)
 
 	return (char *) digest;
 }
+#endif