Authentication Algo keeps record of the Confidentiality algo

The confidentiality algo negotiated during Open Session Request
would be stored in the Authentication algorithm and is activated
once the session setup is successful.

Change-Id: I4d5efd71a992dd0cf505bcf7a6d9ebb394bcb880
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/auth_algo.hpp b/auth_algo.hpp
index 73e2c2b..828b56b 100644
--- a/auth_algo.hpp
+++ b/auth_algo.hpp
@@ -2,6 +2,7 @@
 
 #include <array>
 #include <vector>
+#include "crypt_algo.hpp"
 #include "integrity_algo.hpp"
 
 namespace cipher
@@ -46,7 +47,11 @@
 class Interface
 {
     public:
-        explicit Interface(integrity::Algorithms intAlgo) : intAlgo(intAlgo) {}
+        explicit Interface(integrity::Algorithms intAlgo,
+                           crypt::Algorithms cryptAlgo) :
+                intAlgo(intAlgo),
+                cryptAlgo(cryptAlgo) {}
+
         Interface() = delete;
         virtual ~Interface() = default;
         Interface(const Interface&) = default;
@@ -104,10 +109,19 @@
          * Integrity Algorithm is activated and set in the session data only
          * once the session setup is succeeded in the RAKP34 command. But the
          * integrity algorithm is negotiated in the Open Session Request command
-         * . So the authentication algorithm successfully negotiated is stored
-         * in the authentication algorithm.
+         * . So the integrity algorithm successfully negotiated is stored
+         * in the authentication algorithm's instance.
          */
         integrity::Algorithms intAlgo;
+
+        /*
+         * Confidentiality Algorithm is activated and set in the session data
+         * only once the session setup is succeeded in the RAKP34 command. But
+         * the confidentiality algorithm is negotiated in the Open Session
+         * Request command. So the confidentiality algorithm successfully
+         * negotiated is stored in the authentication algorithm's instance.
+         */
+        crypt::Algorithms cryptAlgo;
 };
 
 /*
@@ -123,7 +137,10 @@
 class AlgoSHA1 : public Interface
 {
     public:
-        explicit AlgoSHA1(integrity::Algorithms intAlgo) : Interface(intAlgo) {}
+        explicit AlgoSHA1(integrity::Algorithms intAlgo,
+                          crypt::Algorithms cryptAlgo) :
+                Interface(intAlgo, cryptAlgo) {}
+
         AlgoSHA1() = delete;
         ~AlgoSHA1() = default;
         AlgoSHA1(const AlgoSHA1&) = default;