summaryrefslogtreecommitdiff
path: root/lib/lanplus/lanplus_crypt.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2020-09-14 12:27:56 +0200
committerJörg Frings-Fürst <debian@jff.email>2020-09-14 12:27:56 +0200
commitcce57c35b301d83ded5e5eaed9705744cffcfb56 (patch)
tree29dc5c93b1bc45be42e68f00b81c1106c3935862 /lib/lanplus/lanplus_crypt.c
parent13dc8738dcd4739941735eab4d1956ccce770525 (diff)
parent808dd89a2beae6ab1d29d35f6119ad5b36969589 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'lib/lanplus/lanplus_crypt.c')
-rw-r--r--lib/lanplus/lanplus_crypt.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/lanplus/lanplus_crypt.c b/lib/lanplus/lanplus_crypt.c
index 5554898..8becfea 100644
--- a/lib/lanplus/lanplus_crypt.c
+++ b/lib/lanplus/lanplus_crypt.c
@@ -155,6 +155,14 @@ int lanplus_rakp2_hmac_matches(const struct ipmi_session * session,
/* ROLEm */
buffer[56] = session->v2_data.requested_role;
+ if (ipmi_oem_active(intf, "i82571spt")) {
+ /* The HMAC calculation code in the Intel 82571 GbE
+ * skips this bit! Looks like a GbE bug, but we need
+ * to work around it here anyway... */
+ buffer[56] &= ~0x10;
+ if (verbose > 2) printf("bitmask for i82571spt\n");
+ }
+
/* ULENGTHm */
buffer[57] = (uint8_t)strlen((const char *)session->username);
@@ -164,7 +172,9 @@ int lanplus_rakp2_hmac_matches(const struct ipmi_session * session,
if (verbose > 2)
{
- lprintf(LOG_DEBUG,"rakp2 mac input buffer (%d bytes)", bufferLength);
+ // lprintf(LOG_DEBUG,"rakp2 mac input buffer (%d bytes)", bufferLength);
+ printbuf((const uint8_t *)buffer, bufferLength, ">> rakp2 mac input buffer");
+ printbuf((const uint8_t *)session->authcode, IPMI_AUTHCODE_BUFFER_SIZE, ">> rakp2 mac key");
}
/*
@@ -179,7 +189,7 @@ int lanplus_rakp2_hmac_matches(const struct ipmi_session * session,
&macLength);
free(buffer);
-
+ buffer = NULL;
if (verbose > 2)
{