From 0e9b185152b56ff33fe8a2a89a4f84923a308300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 14 Sep 2020 12:27:22 +0200 Subject: New upstream version 3.1.7 --- lib/lanplus/lanplus_crypt.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/lanplus/lanplus_crypt.c') 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) { -- cgit v1.2.3