Skip to content

Remove "hash" when calling clevis-encrypt (BugFix) - #2822

Merged
pieqq merged 1 commit into
mainfrom
fix-clevis-sha384
Sep 4, 2026
Merged

Remove "hash" when calling clevis-encrypt (BugFix)#2822
pieqq merged 1 commit into
mainfrom
fix-clevis-sha384

Conversation

@tomli380576

@tomli380576 tomli380576 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

WARNING: This modifies com.canonical.certification::sru-server

Description

Fixes #2820

Resolved issues

See #2820 for the details

Documentation

Tests

Device with only sha384 PCR banks: https://certification.canonical.com/hardware/202607-39061/submission/509175/

Normal x86 laptop: https://certification.canonical.com/hardware/202601-38351/submission/509176/

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.32%. Comparing base (1acd778) to head (2246b77).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2822   +/-   ##
=======================================
  Coverage   61.32%   61.32%           
=======================================
  Files         499      499           
  Lines       50363    50363           
  Branches     8848     8848           
=======================================
  Hits        30886    30886           
  Misses      18637    18637           
  Partials      840      840           
Flag Coverage Δ
provider-tpm2 52.33% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tomli380576
tomli380576 marked this pull request as ready for review September 3, 2026 17:31
Copilot AI lite review requested due to automatic review settings September 3, 2026 17:31

Copilot AI left a comment

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.

🟢 Approval recommended

The change is minimal, directly matches the linked bug’s root cause, and updates only the clevis invocation parameters without broader behavioral risk.

Pull request overview

This PR fixes TPM2 clevis RSA/ECC PXU job templates so they no longer pass the hash field to clevis-encrypt-tpm2, avoiding failures on devices whose TPM2 PCR banks are not sha256 (e.g., sha384-only).

Changes:

  • Remove "hash": "{pcr_bank}" from the clevis-encrypt-tpm2 JSON config for RSA PCR-bank jobs.
  • Remove "hash": "{pcr_bank}" from the clevis-encrypt-tpm2 JSON config for ECC PCR-bank jobs.
File summaries
File Description
providers/tpm2/units/clevis.pxu Drops the hash field from clevis TPM2 encryption config in RSA/ECC template jobs to prevent sha384 PCR-bank failures.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@pieqq
pieqq merged commit b9338a8 into main Sep 4, 2026
43 of 44 checks passed
@pieqq
pieqq deleted the fix-clevis-sha384 branch September 4, 2026 07:04
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.

clevis-encrypt-tpm2/rsa_sha384 tests should not specify "hash": "sha384" when calling clevis2-encrypt

3 participants