-
Notifications
You must be signed in to change notification settings - Fork 16
cnap: add event log replay and verify RTMR value with measurement #185
Conversation
72ddc9b to
007dcc0
Compare
4758f63 to
d8c46d6
Compare
1f875ee to
bf3615f
Compare
cnap/core/keybroker.py
Outdated
| key (SWK) to encrypt the user key (wrapped_key). | ||
| - Encrypt the SWK by the public key from client (wrapped_swk). | ||
| For a key broker client, here is an example flow to get a key from KBS: | ||
| - Verify Event Logs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=> Get and replay all event logs, and verify by the measurement register.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
cnap/core/eventlog.py
Outdated
| if index not in measurement_dict or measurement_dict[index] == {}: | ||
| LOG.error("IMR[%d] verify failed, the replayed value from event logs doesn't exist", | ||
| index) | ||
| flag = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
cnap/core/eventlog.py
Outdated
| LOG.info("IMR[%d] passed the verification.", index) | ||
| else: | ||
| LOG.error("IMR[%d] did not pass the verification.", index) | ||
| flag = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
Signed-off-by: Longyin Hu <longyin.hu@intel.com>
bf3615f to
0607f94
Compare
dongx1x
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This PR is to add event log replay and verify RTMR value with measurement.