]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Add challenge/challengeauth help.
authorChris Porter <redacted>
Sun, 9 Mar 2008 01:02:16 +0000 (01:02 +0000)
committerChris Porter <redacted>
Sun, 9 Mar 2008 01:02:16 +0000 (01:02 +0000)
chanserv/authcmds/challenge.c
chanserv/authcmds/challengeauth.c
chanserv/authcmds/commandlist.c

index 8d6f5638a00630f6e1cc64b25d831e219e649e34..78317ebf7ffe00a7dc642e0cec991676b6c37d90 100644 (file)
@@ -5,6 +5,10 @@
  * CMDDESC: Returns a challenge for use in challengeauth.
  * CMDFUNC: csa_dochallenge
  * CMDPROTO: int csa_dochallenge(void *source, int cargc, char **cargv);
+ * CMDHELP: Usage: challenge
+ * CMDHELP: Supplies you with a challenge and a list of algorithms accepted
+ * CMDHELP: for challenge response authentication, see CHALLENGEAUTH help
+ * CMDHELP: for more details.
  */
 
 #include "../chanserv.h"
index 361ac3c631580c2830c7e5f5ed383d82fc5e0c6b..289ce2d7377132bf91aae28f0f3861d3e20276c8 100644 (file)
@@ -7,6 +7,14 @@
  * CMDDESC: Authenticates you on the bot using challenge response.
  * CMDFUNC: csa_dochallengeauth
  * CMDPROTO: int csa_dochallengeauth(void *source, int cargc, char **cargv);
+ * CMDHELP: Usage: challengeauth <username> <response> <hmac algorithm>
+ * CMDHELP: Authenticates using challenge response.
+ * CMDHELP: To generate the response from the challenge, calculate the following:
+ * CMDHELP:   HMAC(challenge){k}
+ * CMDHELP: where HMAC is the hash message authentication code as described in
+ * CMDHELP: RFC 2104, k is HEXDIGEST(<lower case username>:HEXDIGEST(<password>))
+ * CMDHELP: and HEXDIGEST is the hash function used in the MAC construction.
+ * CMDHELP: For example code see the website.
  */
 
 #include "../chanserv.h"
index 1da15d62919d2f7193d8044b9916b588c67eb924..a677cf64d1a9ea7cfcc9af7dd5b8d8782b5cdf45 100644 (file)
@@ -20,8 +20,8 @@ int csa_dosetpw(void *source, int cargc, char **cargv);
 void _init() {
   chanservaddcommand("auth", QCMD_ALIAS | QCMD_SECURE | QCMD_NOTAUTHED, 2, csa_doauth, "Authenticates you on the bot.", "");
   chanservaddcommand("authhistory", QCMD_AUTHED, 1, csa_doauthhistory, "View auth history for an account.", "");
-  chanservaddcommand("challenge", QCMD_SECURE | QCMD_NOTAUTHED, 0, csa_dochallenge, "Returns a challenge for use in challengeauth.", "");
-  chanservaddcommand("challengeauth", QCMD_SECURE | QCMD_NOTAUTHED, 3, csa_dochallengeauth, "Authenticates you on the bot using challenge response.", "");
+  chanservaddcommand("challenge", QCMD_SECURE | QCMD_NOTAUTHED, 0, csa_dochallenge, "Returns a challenge for use in challengeauth.", "Usage: challenge\nSupplies you with a challenge and a list of algorithms accepted\nfor challenge response authentication, see CHALLENGEAUTH help\nfor more details.\n");
+  chanservaddcommand("challengeauth", QCMD_SECURE | QCMD_NOTAUTHED, 3, csa_dochallengeauth, "Authenticates you on the bot using challenge response.", "Usage: challengeauth <username> <response> <hmac algorithm>\nAuthenticates using challenge response.\nTo generate the response from the challenge, calculate the following:\n  HMAC(challenge){k}\nwhere HMAC is the hash message authentication code as described in\nRFC 2104, k is HEXDIGEST(<lower case username>:HEXDIGEST(<password>))\nand HEXDIGEST is the hash function used in the MAC construction.\nFor example code see the website.\n");
   chanservaddcommand("checkhashpass", QCMD_OPER, 3, csa_docheckhashpass, "Checks supplied password against a version hashed in the database.", "");
   chanservaddcommand("email", QCMD_SECURE | QCMD_AUTHED, 3, csa_doemail, "Change your email address.", "");
   chanservaddcommand("getpassword", QCMD_OPER, 2, csa_dogetpw, "Gets a users password", "");