-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
efi: refactoring to prepare for the introduction of efi/preinstall
efi/preinstall will depend on efi so it is necessary to break some cyclic dependencies, which I've done via the efi/internal package. The most problematic dependency is that efi/preinstall needs to use the efi.PCRProfileOption interface which contains an unexported method that takes a pointer to the unexported pcrProfileGenerator type - a type that should remain unexported. This has been solved by adding a simple internal.PCRProfileOptionVisitor interface that is implemented by pcrProfileGenerator and can be consumed in both efi and efi/preinstall packages. This has simplified direct testing of types that implement the efi.PCRProfileOption interface as well. On this note, this did highlight a couple of testing gaps - we had no direct tests for the WithSignatureDBUpdates and WithShimSbatPolicyLatest options. I've added tests for these, which found a bug in the way the branching for the quirk handling worked for WithSignatureDBUpdates. As part of this, I did rename a couple of types to give them names I felt make more sense. Eg, rootVarsCollector is not variableSetCollector, to bring it more in line with the new internal.VariableSet interface. The rootVarReader type is now initialVarReader, but other than that, no other changes to this code has been made - there's just been a lot of moving of types to the new efi/internal package.
- Loading branch information
1 parent
54378e6
commit 9222896
Showing
28 changed files
with
975 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.