summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-19 15:11:04 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-19 15:11:04 +0000
commit7d2c132c83a9668c0f11eb011f5774aa99cd93c8 (patch)
tree72e6acbebfa2f0fbe9291124eb89c8da400fe7e3 /src/modules
parente63ddbab46fec6fa990e25af955c4ac3060be455 (diff)
Tidied up AES encryption
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2573 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index b7ef6d42d..036cb2798 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -583,10 +583,17 @@ class TreeSocket : public InspSocket
keylength = key.length();
if (!(keylength == 16 || keylength == 24 || keylength == 32))
{
+ WriteOpers("\2ERROR\2: Key length for encryptionkey is not 16, 24 or 32 bytes in length!");
log(DEBUG,"Key length not 16, 24 or 32 characters!");
}
else
{
+ std::string SName = myhost;
+ if (InboundServerName != "")
+ {
+ SName = InboundServerName;
+ }
+ WriteOpers("\2AES\2: Initialized %d bit encryption to server %s",keylength*8,SName.c_str());
ctx->MakeKey(key.c_str(), "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", keylength, keylength);
}
@@ -1141,7 +1148,6 @@ class TreeSocket : public InspSocket
char* data = this->Read();
if (data)
{
- Srv->Log(DEBUG,"m_spanningtree: READ");
this->in_buffer += data;
/* While there is at least one new line in the buffer,
* do something useful (we hope!) with it.