X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Ftreesocket.h;h=ff06f0926691a92e1f539ecb79128565d24a2885;hb=715074dd10079a3ed846e8815290ba0d13cd4bd8;hp=2fd18b35a6c270b10563a81524fff6c8e1e5e7ea;hpb=be36d92f3dcb0ac3772daebff43a5ecfe0a2d364;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h index 2fd18b35a..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(); @@ -149,6 +154,11 @@ class TreeSocket : public InspSocket */ 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