From 7d2c132c83a9668c0f11eb011f5774aa99cd93c8 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 19 Dec 2005 15:11:04 +0000 Subject: [PATCH] Tidied up AES encryption git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2573 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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. -- 2.39.2