From f1db07c234ddd54dae936253100883a58d4d7cb2 Mon Sep 17 00:00:00 2001 From: malloc Date: Thu, 19 Apr 2018 15:30:26 -0500 Subject: [PATCH 1/2] disappointment boob --- server/src/crypto/cipher.hpp | 1 + server/src/crypto/keyex.cpp | 4 ++-- server/src/hosts/master.hpp | 8 ++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/server/src/crypto/cipher.hpp b/server/src/crypto/cipher.hpp index 99d1a81..5fedff9 100644 --- a/server/src/crypto/cipher.hpp +++ b/server/src/crypto/cipher.hpp @@ -8,6 +8,7 @@ namespace sosc { namespace cgc { class Cipher { public: + Cipher() {}; Cipher(const KeyExchange& key); void Parse(std::string* data); diff --git a/server/src/crypto/keyex.cpp b/server/src/crypto/keyex.cpp index 533d8b8..a21c442 100644 --- a/server/src/crypto/keyex.cpp +++ b/server/src/crypto/keyex.cpp @@ -3,8 +3,8 @@ sosc::BigUInt sosc::cgc::KeyExchange::secret; sosc::cgc::KeyExchange::KeyExchange() { - if(KeyExchange::secret.IsZero()) - KeyExchange::secret = FastRandomPrime(); + if(this->secret.IsZero()) + this->secret = FastRandomPrime(); this->modulus = FastRandomPrime(); } diff --git a/server/src/hosts/master.hpp b/server/src/hosts/master.hpp index 73bef52..3c15cec 100644 --- a/server/src/hosts/master.hpp +++ b/server/src/hosts/master.hpp @@ -4,6 +4,8 @@ #include "../sock/intrasock.hpp" #include "../sock/scapesock.hpp" #include "../sock/pool.hpp" +#include "../crypto/keyex.hpp" +#include "../crypto/cipher.hpp" namespace sosc { /** MASTER -> CLIENT **/ @@ -13,6 +15,9 @@ public: private: ScapeConnection client; + + cgc::KeyExchange key; + cgc::Cipher cipher; }; class MasterClientPool : public Pool { @@ -29,6 +34,9 @@ public: void Close(); private: IntraClient client; + + cgc::KeyExchange key; + cgc::Cipher cipher; }; class MasterIntraPool : public Pool { From 3c3e6fdf2dda27ebb6a5f716775c82d380c70114 Mon Sep 17 00:00:00 2001 From: malloc Date: Mon, 23 Apr 2018 10:18:13 -0500 Subject: [PATCH 2/2] squidnore --- .gitignore | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3cd9794..02ee487 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,7 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - # additions by alec (tm) build/ connectionStrings.config *.kdev4 .kdev4/ +.idea/ +cmake-build-*/ \ No newline at end of file