Skip to content

Commit

Permalink
Move mok state variable data flag definitions to the header.
Browse files Browse the repository at this point in the history
Previously the mok mirror state flags were only used in the mok
mirroring code.  But there are other consumers of that data, namely our
variable test cases, and it's useful for them to be able to check the
flags.

Signed-off-by: Peter Jones <[email protected]>
  • Loading branch information
vathpela committed Feb 24, 2025
1 parent a5976d4 commit 42cee0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 7 additions & 0 deletions include/mok.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ struct mok_state_variable;
typedef vendor_addend_category_t (vendor_addend_categorizer_t)(struct mok_state_variable *);
typedef UINTN (mok_variable_format_helper_t)(UINT8 *buf, size_t sz, struct mok_state_variable *);

#define MOK_MIRROR_KEYDB 0x01
#define MOK_MIRROR_DELETE_FIRST 0x02
#define MOK_VARIABLE_MEASURE 0x04
#define MOK_VARIABLE_LOG 0x08
#define MOK_VARIABLE_INVERSE 0x10
#define MOK_VARIABLE_CONFIG_ONLY 0x20

/*
* MoK variables that need to have their storage validated.
*
Expand Down
7 changes: 0 additions & 7 deletions mok.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,6 @@ categorize_deauthorized(struct mok_state_variable *v)
return VENDOR_ADDEND_DB;
}

#define MOK_MIRROR_KEYDB 0x01
#define MOK_MIRROR_DELETE_FIRST 0x02
#define MOK_VARIABLE_MEASURE 0x04
#define MOK_VARIABLE_LOG 0x08
#define MOK_VARIABLE_INVERSE 0x10
#define MOK_VARIABLE_CONFIG_ONLY 0x20

struct mok_state_variable mok_state_variable_data[] = {
{.name = L"MokList",
.name8 = "MokList",
Expand Down

0 comments on commit 42cee0a

Please sign in to comment.