-
Notifications
You must be signed in to change notification settings - Fork 17
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
Keydata testsuite minor refactors and improvements and hashAlg #284
Conversation
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 - this looks ok, although it does need a rebase on master now to resolve some merge conflicts.
I notice that xerrors.Errorf
is replaced with fmt.Errorf
in a few places - that's ok, but I think it's probably worth another PR to drop the xerrors dependency entirely given that we depend on go1.18 which has the required functionality in the standard library.
keydata.go
Outdated
@@ -189,24 +189,24 @@ type KeyDataReader interface { | |||
ReadableName() string | |||
} | |||
|
|||
// hashAlg corresponds to a digest algorithm. | |||
type hashAlg crypto.Hash | |||
// HashAlg corresponds to a digest algorithm. |
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 might be worth just adding a note as to why this exists (it's just a crypto.Hash that can be serialed to JSON and DER)
03573fe
to
f9ce5f9
Compare
Rebased on latest master.
I did a cleanup for xerrors in secboot (that I will push in another PR) but it is still added as an indirect dependency. I can do the same for efilib (which also uses go 1.18). go-tpm2 also has it in its go.sum although it's not using it. Any reason why go-tpm2 is still in go 1.9? |
@chrisccoulson I also opened canonical/go-efilib#13 |
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, this looks fine to me.
This addresses:
Also makes hashAlg public as it will be used in a follow-up PR which will slightly rework the mockPlatformKeyDataHandler to use GCM and associated data to check expected values.