Skip to content

signature: support PCR policy authorization - #187

Open
ahendre2010 wants to merge 1 commit into
tpm2-software:masterfrom
ahendre2010:feature/issue-154-policy-pcr-signing
Open

ahendre2010 wants to merge 1 commit into
tpm2-software:masterfrom
ahendre2010:feature/issue-154-policy-pcr-signing

Conversation

@ahendre2010

@ahendre2010 ahendre2010 commented Sep 18, 2026 •

Copy link
Copy Markdown

Fixes issue #154.

Proposed interface:
-sigopt policy-pcr:sha256:(pcr)[,(pcr),...]

Internally tpm2-openssl provider can create TPM2_SE_POLICY session, set PCR policy before Esys sign the digest.
If maintainer agrees with approach, I can replicate this for other algorithms.

Signed-off-by: Akshay Hendre <ahendre2010@gmail.com>
@moritzbuhl

Copy link
Copy Markdown
Member

ecdsa_policy_pcr_x509_csr.sh is hanging for OpenSSL 3.5 and OpenSSL 3.0.

@ahendre2010

Copy link
Copy Markdown
Author

Can you please help me understand why these test might be failing?
I tried replicating asan checks on my side and it worked without any error. Is there any way to re-run these test?

sctx->pkey->data.pub.publicArea.nameAlg, &session);
if (r)
goto out;
r = Esys_TRSess_SetAttributes(sctx->esys_ctx, session,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this causes a deadlock with older OpenSSL versions, probably the way it does signature calls differs?

The hang is the first CSR call:

 openssl req -provider tpm2 -provider default \ 
     -propquery '?provider=tpm2' \
     -new -subj '/CN=policy-test' \
     -key "handle:${KEY_HANDLE}" \
     -sigopt 'policy-pcr:sha256:0,1,7' \
     -out policy-test.csr 

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