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

Cleanup Template and Keys code #25

Merged
merged 1 commit into from
Jul 23, 2019
Merged

Cleanup Template and Keys code #25

merged 1 commit into from
Jul 23, 2019

Conversation

josephlr
Copy link
Member

@josephlr josephlr commented Jul 22, 2019

This change makes it more clear why we set our flags the way we do.
It also makes it easier to later add in ECC-based keys.

This also fixes keys.go to:

  • avoid a potential nullptr dereference
  • use the Key() and Name() methods from go-tpm
  • stop decoding the creationData/tickets, as we don't care about them

@twitchy-jsonp we set the noDA flag for our SRK (to not conflict with what Microsoft does), and we don't set this flag for our AIK. go-attestation seems to do the opposite. I feel like whatever we do here should be the same for both.

Tests pass, and manual runs of gotpm pubkey confirm the generated public keys are still the same.

Note: depends on google/go-tpm#116

This change makes it more clear _why_ we set our flags the way we do.
It also makes it easier to later add in ECC-based keys.

This also fixes keys.go to:
  - avoid a potential nullptr dereference
  - use the Key() and Name() methods from go-tpm
  - stop decoding the creationData/tickets, as we don't care about them
@josephlr josephlr changed the title Cleanup Template code Cleanup Template and Keys code Jul 23, 2019
Copy link

@twitchy-jsonp twitchy-jsonp left a comment

Choose a reason for hiding this comment

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

Yeah, I should switch go-attestation to use the same templates.

@josephlr josephlr merged commit 09873bb into master Jul 23, 2019
@josephlr josephlr deleted the cleanup branch July 23, 2019 19:25
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