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

enroll-keys --export option does not works when SB is in User mode #250

Open
Shished opened this issue Oct 21, 2023 · 4 comments
Open

enroll-keys --export option does not works when SB is in User mode #250

Shished opened this issue Oct 21, 2023 · 4 comments

Comments

@Shished
Copy link

Shished commented Oct 21, 2023

sbctl enroll-keys always checks if Secure Boot is set to setup mode even when it is not needed, like when using a new export option. Other tools can export the values when SB is in user mode.
Error message is the same as when trying to enroll the keys.

$ sbctl enroll-keys --export esl
Your system is not in Setup Mode! Please reboot your machine and reset secure boot keys before attempting to enroll the keys.

Used sbctl version 0.12 on Arch Linux.

@Foxboron
Copy link
Owner

Mm, why do you want to export the esl though? It should be partially identical to what you find in efivarfs and the intent of this is to use through a secondary enrollment thing.

@Shished
Copy link
Author

Shished commented Oct 22, 2023

I used it as an example, it shows same behaviour when enroll-keys --export auth option is used.
Also, if a program provides an option to do something, it should do the thing, shouldn't it?

$ sbctl enroll-keys --export auth
Your system is not in Setup Mode! Please reboot your machine and reset secure boot keys before attempting to enroll the keys.

And it still does nothing.

@schmidicom
Copy link

Mm, why do you want to export the esl though? It should be partially identical to what you find in efivarfs and the intent of this is to use through a secondary enrollment thing.

This could be used for a feature of systemd-boot. This feature could automatically store the keys again after the firmware has been reset (for whatever reason) without having to do it manually with sbctl.
https://www.freedesktop.org/software/systemd/man/latest/loader.conf.html#secure-boot-enroll
But systemd-boot can only do this if the keys were previously exported as "auth" files to the "/loader/keys/" folder.

@Foxboron
Copy link
Owner

This makes sense.

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

No branches or pull requests

3 participants