2
0
mirror of https://opendev.org/x/pyghmi synced 2025-02-20 12:30:48 +00:00

Fix the integrity pad calculation (shame python doesn't have a 'use strict')

This commit is contained in:
Jarrod Johnson 2013-05-19 18:51:42 -04:00
parent f44ad79391
commit c8ac83cccc

View File

@ -245,7 +245,7 @@ class IPMISession:
if self.integrityalgo: #see table 13-8, RMCP+ packet format TODO: SHA256 which is now allowed
neededpad=(len(message)-2)%4
if neededpad:
needpad = 4-neededpad
neededpad = 4-neededpad
message += [0xff]*neededpad
message.append(neededpad)
message.append(7) #reserved, 7 is the required value for the specification followed