summaryrefslogtreecommitdiffstats
path: root/auth_algo.cpp
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@linux.intel.com>2017-11-30 10:48:08 -0800
committerVernon Mauery <vernon.mauery@linux.intel.com>2017-12-04 08:37:47 -0800
commit2207f51cbdd3962b1e94fb8432edfc2e294fd9c7 (patch)
tree9cad36c54c03c1e60559d72e49bbe1bd67ffbc8e /auth_algo.cpp
parent2c15f0c3dfd3cb5ecece1156ba9372b987f53acd (diff)
downloadphosphor-net-ipmid-2207f51cbdd3962b1e94fb8432edfc2e294fd9c7.tar.gz
phosphor-net-ipmid-2207f51cbdd3962b1e94fb8432edfc2e294fd9c7.zip
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>
Diffstat (limited to 'auth_algo.cpp')
-rw-r--r--auth_algo.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/auth_algo.cpp b/auth_algo.cpp
index d2acebf..b71636b 100644
--- a/auth_algo.cpp
+++ b/auth_algo.cpp
@@ -37,6 +37,7 @@ std::vector<uint8_t> AlgoSHA1::generateICV(std::vector<uint8_t>& input) const
std::cerr << "Generate Session Integrity Key failed\n";
output.resize(0);
}
+ output.resize(integrityCheckValueLength);
return output;
}
OpenPOWER on IntegriCloud