Set the Integrity Algo once the Session setup succeeds
Change-Id: I5c6122b89c345d71e081aadb50c968344b5c697b
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/command/rakp34.cpp b/command/rakp34.cpp
index aa7ad3b..8277195 100644
--- a/command/rakp34.cpp
+++ b/command/rakp34.cpp
@@ -208,6 +208,19 @@
// Insert the HMAC output into the payload
outPayload.insert(outPayload.end(), icv.begin(), icv.end());
+ // Set the Authentication Algorithm to RAKP_HMAC_SHA1
+ switch (authAlgo->intAlgo)
+ {
+ case cipher::integrity::Algorithms::HMAC_SHA1_96:
+ {
+ session->setIntegrityAlgo(
+ std::make_unique<cipher::integrity::AlgoSHA1>(sikOutput));
+ break;
+ }
+ default:
+ break;
+ }
+
session->state = session::State::ACTIVE;
std::cout << "<< RAKP34\n";