X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Ftreesocket.h;h=ff06f0926691a92e1f539ecb79128565d24a2885;hb=715074dd10079a3ed846e8815290ba0d13cd4bd8;hp=58f2b4bf1a2a2808a1369b017765e88d999bb521;hpb=4af9d414367511e260f713b0a97bb5e15c922977;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h index 58f2b4bf1..ff06f0926 100644 --- a/src/modules/m_spanningtree/treesocket.h +++ b/src/modules/m_spanningtree/treesocket.h @@ -94,6 +94,7 @@ class TreeSocket : public InspSocket Module* Hook; /* I/O hooking module that we're attached to for this socket */ std::string ourchallenge; /* Challenge sent for challenge/response */ std::string theirchallenge; /* Challenge recv for challenge/response */ + std::string OutboundPass; /* Outbound password */ public: @@ -137,6 +138,10 @@ class TreeSocket : public InspSocket */ void SetTheirChallenge(const std::string &c); + /** Compare two passwords based on authentication scheme + */ + bool ComparePass(const std::string &ours, const std::string &theirs); + /** Return the module which we are hooking to for I/O encapsulation */ Module* GetHook(); @@ -145,6 +150,15 @@ class TreeSocket : public InspSocket */ ~TreeSocket(); + /** Generate random string used for challenge-response auth + */ + std::string RandString(unsigned int length); + + /** Construct a password, optionally hashed with the other side's + * challenge string + */ + std::string MakePass(const std::string &password, const std::string &challenge); + /** When an outbound connection finishes connecting, we receive * this event, and must send our SERVER string to the other * side. If the other side is happy, as outlined in the server