xcp-ng / uefistored

Variables store for UEFI guests. Note: in XCP-ng 8.3+, we switched to varstored in order to share a common implementation with XenServer.
GNU General Public License v2.0
7 stars 3 forks source link

refactor(auth): eliminate OVMF-style CamelCase from FilterSignatureList #21

Closed beshleman closed 2 years ago

beshleman commented 3 years ago

uefistored uses snake_case, not CamelCase.

Signed-off-by: Bobby Eshleman bobby.eshleman@gmail.com

stormi commented 3 years ago

So, I know it's a simple change, but sometimes bugs hide in that so:

beshleman commented 3 years ago

So, I know it's a simple change, but sometimes bugs hide in that so:

* was that code tested manually?

* is that code tested in the unit tests of the project?

* can you give testing instructions for me or someone else to test the modified codepaths?

It is tested by the test_db_append test and by installing/reinstalling the Windows KB4535680 update.

More surgical testing of this requires appending the db or dbx variables. An example might be:

  1. Given a db containing certificates A, B, and C:
    1. Appending an auth file containing certificates D should result in db=A, B, C, D.
    2. Appending an auth file containing certificate A should result the db unchanged (A, B, and C)
    3. Appending with an empty auth file should result in the db unchanged (A, B, C).

An example of making the auth files using efitools, see: https://github.com/xcp-ng/uefistored/blob/windows-kb4535680/scripts/certs/create-certs.sh

Then they may be installed from inside the guest using efi-updatevar.

The /opt/xensource/libexec/create-auth tool may be used to build the auth files too.

stormi commented 2 years ago

Note: it's too late for 8.2.1 but we can do it for future releases

benjamreis commented 2 years ago

Not a problem, it's a coding style PR so not urgent at all. I'm just trying to not let it rot.

benjamreis commented 2 years ago

Unit tests locally succesfull in the docker. (Again the GH action failed on a mitrror thing...)

benjamreis commented 2 years ago

XCP-ng tests successful on Alpine, Debian 10 & Windows 10 (with efitools)