Skip to content
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

Update keys.go documentation #204

Merged
merged 1 commit into from
Jun 1, 2022
Merged

Update keys.go documentation #204

merged 1 commit into from
Jun 1, 2022

Conversation

alexmwu
Copy link
Contributor

@alexmwu alexmwu commented Jun 1, 2022

We should clearly state that the Key object does not support concurrent access except with the crypto.Signer from GetSigner. This was found because someone asked why only the tpmSigner.Sign method allows concurrent accesses.

@alexmwu alexmwu requested review from josephlr and jkl73 June 1, 2022 22:05
Copy link
Contributor

@jkl73 jkl73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add a mutex to the Key struct (can be done later)?

@alexmwu
Copy link
Contributor Author

alexmwu commented Jun 1, 2022

Maybe we should add a mutex to the Key struct (can be done later)?

@josephlr can comment more but I believe the current mutex is a global is so we can concurrently sign even with different keys. If we wanted to extend synchronization across the whole library, we would do it for all TPM commands, not just per key.

@alexmwu alexmwu merged commit ca15a1c into master Jun 1, 2022
@alexmwu alexmwu deleted the alexmwu-patch-1 branch June 1, 2022 23:36
@JoshuaKrstic JoshuaKrstic mentioned this pull request Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants