Skip to content

efisecdb: Fix default hash and help output#299

Open
vathpela wants to merge 2 commits into
rhboot:mainfrom
vathpela:fix-default-hash
Open

efisecdb: Fix default hash and help output#299
vathpela wants to merge 2 commits into
rhboot:mainfrom
vathpela:fix-default-hash

Conversation

@vathpela
Copy link
Copy Markdown
Member

This patch series does two things:

  • makes us actually default hash inputs to sha256
  • stops showing sha1 as an option

When we run `efisecdb -t help` it says:

  $ efisecdb -t help
  Supported hashes: sha512 sha384 sha256 sha1
  Default hash is sha256

But in practice we see:
  $ efisecdb -o dbx.bin -a -g {empty} -h e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
  efisecdb: hash type is not set

This changes it so we actually default to sha256.

Signed-off-by: Peter Jones <pjones@redhat.com>
While it's nice to support SHA-1 so we can e.g. build test databases
that look like that one insane vendor's 'db', there's no reason to
advertise this and encourage people to do it.

This patch makes it so "efisecdb -t help" doesn't show that we support
SHA-1.

Signed-off-by: Peter Jones <pjones@redhat.com>
@vathpela vathpela requested a review from josuedhg March 26, 2026 14:44
Copy link
Copy Markdown

@josuedhg josuedhg left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants