Truncate Integrity Check Value to the correct length
According to the RMCP+ spec:
RAKP-HMAC-SHA1 specifies the use of RAKP messages for the key exchange
portion of establishing the session, and that HMAC-SHA1 (per [RFC2104])
is used to create 20-byte Key Exchange Authentication Code fields in
RAKP Message 2 and RAKP Message 3. HMAC-SHA1-96 (per [RFC2404]) is used
for generating a 12-byte Integrity Check Value field for RAKP Message 4.
Change-Id: Ic85b79a748ceb4083b613a0df1c253d8099a6c22
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/auth_algo.hpp b/auth_algo.hpp
index cf5ccfe..2c3b0da 100644
--- a/auth_algo.hpp
+++ b/auth_algo.hpp
@@ -137,6 +137,8 @@
class AlgoSHA1 : public Interface
{
public:
+ static constexpr size_t integrityCheckValueLength = 12;
+
explicit AlgoSHA1(integrity::Algorithms intAlgo,
crypt::Algorithms cryptAlgo) :
Interface(intAlgo, cryptAlgo) {}