Skip to content

engineering: Implement is_secure_boot_enabled()#88

Merged
ndubchak merged 1 commit into
mainfrom
ndubchak/add-secure-boot-check
Aug 6, 2025
Merged

engineering: Implement is_secure_boot_enabled()#88
ndubchak merged 1 commit into
mainfrom
ndubchak/add-secure-boot-check

Conversation

@ndubchak
Copy link
Copy Markdown
Contributor

@ndubchak ndubchak commented Aug 5, 2025

🔍 Description

This PR adds a method is_secure_boot_enabled() that is needed to use the EFI var-s, to check if the system has SecureBoot enabled. This is needed because the firmware and SHIM make different measurements into PCRs 4 and 7 (at least), depending on the state of SecureBoot.

@ndubchak ndubchak requested a review from a team as a code owner August 5, 2025 14:38
Comment thread osutils/src/efivar.rs
use crate::dependencies::{Dependency, DependencyResultExt};

const BOOTLOADER_INTERFACE_GUID: &str = "4a67b082-0a4c-41cf-b6c7-440b29bb8c4f";
const EFI_GLOBAL_VARIABLE_GUID: &str = "8be4df61-93ca-11d2-aa0d-00e098032b8c";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

curious: are these GUIDs universal for all devices and architectures?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, this GUID comes directly from the UEFI spec

@ndubchak ndubchak force-pushed the ndubchak/add-secure-boot-check branch from c9c4474 to 694963c Compare August 6, 2025 17:20
@ndubchak ndubchak merged commit b0ab0ee into main Aug 6, 2025
1 check passed
@ndubchak ndubchak deleted the ndubchak/add-secure-boot-check branch August 6, 2025 17:21
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.

4 participants