-
Notifications
You must be signed in to change notification settings - Fork 63
Fix for handles not being unique. #388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for handles not being unique. #388
Conversation
|
Will need to port this to v7 as well. I can open another PR after I merge the current one. |
6a5bd7a to
17fe38e
Compare
f7b5a6c to
8cf029d
Compare
|
This should be already merged in #390? Safe to close? |
ionut-arm
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.
👍🏻
Depends on whether @Superhepper prefers getting rid of the |
|
This basically the same thing this is just to master. |
| error!("Handle({}) is already open", ESYS_TR::from(handle)); | ||
| return Err(Error::local_error(WrapperErrorKind::InvalidHandleState)); | ||
| // It is safe to call unwrap because the existance of the key has already been verified. | ||
| let stored_handle_drop_action = self.open_handles.get(&handle).unwrap(); |
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.
It's possible to avoid the unwrap by using if let just like in the other PR.
I trust you'll adjust it and I don't want to unnecessarily block the workflow so I'll ack the PR now :)
- Handles returned from tpm2-tss APIs does not need to be unique. This an attempt to fix problem parallaxsecond#383 by removing the check in HandleManager that made a check for uniqueness. This has been replaced with handle consistency check. - Enables the integration tests that was disabled due to this issue. Co-authored-by: Ionut Mihalcea <ionut.mihalcea@arm.com> Co-authored-by: Jesper Brynolf <jesper.brynolf@gmail.com> Signed-off-by: Jesper Brynolf <jesper.brynolf@gmail.com>
8cf029d to
4d08f5e
Compare
Handles returned from tpm2-tss APIs does not need to be unique. This an attempt to fix problem #383.
This problem was also discussed in tpm2-software/tpm2-tss#2537.
Signed-off-by: Jesper Brynolf jesper.brynolf@gmail.com