diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2014-07-18 20:41:28 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2014-07-18 20:41:28 +0000 |
commit | 7a0a7f9635ad77eaa0a0300bc64ebadee3830962 (patch) | |
tree | 00af6268ff97a00f31c8ca9e41c6cd36c93310b1 /modules | |
parent | d2b88476ce99f305b14dc2f02caf2f66a67b02e3 (diff) |
- Cleaned up and sanitized /challenge relatedcode
- rsa.c:get_randomness(): removed EGD support; also don't fall back to RAND_pseudo_bytes()
if RAND_bytes() fails. If RAND_bytes() fails, just reject the /challenge request.
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@4257 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'modules')
-rw-r--r-- | modules/m_challenge.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/m_challenge.c b/modules/m_challenge.c index 7e673cd..f080b84 100644 --- a/modules/m_challenge.c +++ b/modules/m_challenge.c @@ -164,12 +164,14 @@ m_challenge(struct Client *client_p, struct Client *source_p, } } - if (!generate_challenge(&challenge, &(source_p->localClient->response), + if (!generate_challenge(&challenge, &source_p->localClient->response, conf->rsa_public_key)) + { sendto_one(source_p, form_str(RPL_RSACHALLENGE), me.name, source_p->name, challenge); + source_p->localClient->auth_oper = xstrdup(conf->name); + } - source_p->localClient->auth_oper = xstrdup(conf->name); MyFree(challenge); return 0; } |