cisco / go-mls

Message Layer Security
BSD 2-Clause "Simplified" License
48 stars 17 forks source link

Actually change state in tests #38

Closed bifurcation closed 4 years ago

bifurcation commented 4 years ago

The existing tests of Update and Remove behavior do not actually store the updated/removed states, so as a result, it's as of each Update/Remove were being applied on the clean group as created. Instead, they need to be applied to the group on top of each other.

Fixing this bug revealed several ways in which the State logic was incorrect. Most notably, the transcript hash computations were wrong, using digest.Sum() incorrectly.

suhasHere commented 4 years ago

LGTM .. ah! that digest error !!