summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-04-09 15:34:14 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-04-09 15:34:14 +0000
commit8eec77bdde05b5e8503a5c19a7c40c60473e21cf (patch)
treed9d5298394aa2a33d7fc2b44993373b46edb7965 /src
parent4e6b5f4b56fb68781193a65e087ca8be9f637dc4 (diff)
Debug, and we seem to be sending capab twice
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6771 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index f145783bc..b0a7e3205 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -73,17 +73,9 @@ TreeSocket::TreeSocket(SpanningTreeUtilities* Util, InspIRCd* SI, int newfd, cha
* socket, and set a timer waiting for handshake before we send CAPAB etc.
*/
if (Hook)
- {
InspSocketHookRequest(this, (Module*)Utils->Creator, Hook).Send();
- Instance->Timers->AddTimer(new HandshakeTimer(Instance, this, &(Utils->LinkBlocks[0]), this->Utils));
- }
- else
- {
- /* Otherwise, theres no lower layer transport in plain TCP/IP,
- * so just send the capabilities right now.
- */
- this->SendCapabilities();
- }
+
+ Instance->Timers->AddTimer(new HandshakeTimer(Instance, this, &(Utils->LinkBlocks[0]), this->Utils));
}
ServerState TreeSocket::GetLinkState()
@@ -109,6 +101,7 @@ const std::string& TreeSocket::GetOurChallenge()
void TreeSocket::SetOurChallenge(const std::string &c)
{
+ Instance->Log(DEBUG,"SetOurChallenge: "+c);
this->ourchallenge = c;
}
@@ -119,11 +112,13 @@ const std::string& TreeSocket::GetTheirChallenge()
void TreeSocket::SetTheirChallenge(const std::string &c)
{
+ Instance->Log(DEBUG,"SetTheirChallenge: "+c);
this->theirchallenge = c;
}
std::string TreeSocket::MakePass(const std::string &password, const std::string &challenge)
{
+ Instance->Log(DEBUG,"MakePass('"+password+"','"+challenge+"')");
Module* sha256 = Instance->FindModule("m_sha256.so");
if (sha256 && !challenge.empty())
{
@@ -136,13 +131,19 @@ std::string TreeSocket::MakePass(const std::string &password, const std::string
hmac2 += static_cast<char>(password[n] ^ 0x36);
}
+ Instance->Log(DEBUG,"MakePass hmac1="+hmac1+" hmac="+hmac2);
+
HashResetRequest(Utils->Creator, sha256).Send();
hmac2 = HashSumRequest(Utils->Creator, sha256, hmac2).Send();
+ Instance->Log(DEBUG,"MakePass hmac1="+hmac1+" hmac="+hmac2);
+
HashResetRequest(Utils->Creator, sha256).Send();
std::string hmac = hmac1 + hmac2 + challenge;
hmac = HashSumRequest(Utils->Creator, sha256, hmac).Send();
+ Instance->Log(DEBUG,"MakePass hmac="+hmac);
+
return hmac;
}
else if (!challenge.empty() && !sha256)