Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fapi: fix usage of policy_nv. #2384

Conversation

JuergenReppSIT
Copy link
Member

Signed-off-by: Juergen Repp juergen_repp@web.de

Currently it was not possible to define a policy nv with a TPM nv index.
The callback to get the public nv data related to the policy was extended
to get public nv data from the TPM in this case.
Addresses tpm2-software#2383.

Signed-off-by: Juergen Repp <juergen_repp@web.de>
A nv policy with the nv index 0x1800000 was added, and the integration
test for policy nv was modified to test also this policy.

Signed-off-by: Juergen Repp <juergen_repp@web.de>
@codecov
Copy link

codecov bot commented Jul 8, 2022

Codecov Report

Merging #2384 (92f1e4a) into master (c12d2bc) will decrease coverage by 0.03%.
The diff coverage is 45.71%.

@@            Coverage Diff             @@
##           master    #2384      +/-   ##
==========================================
- Coverage   83.64%   83.60%   -0.04%     
==========================================
  Files         351      351              
  Lines       37877    37895      +18     
==========================================
+ Hits        31681    31682       +1     
- Misses       6196     6213      +17     
Impacted Files Coverage Δ
src/tss2-fapi/ifapi_policy_callbacks.c 83.42% <44.11%> (-2.62%) ⬇️
src/tss2-fapi/ifapi_policy_instantiate.c 85.29% <100.00%> (-0.09%) ⬇️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

be used to get the public from the keystore if no nv_index is
passed.
* @param[in] nv_index The index of the NV object. The index will be used to
* get the public data if nv_index > 0.
Copy link
Member

Choose a reason for hiding this comment

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

ahh ok if nv_index is 0 look at path..., is the inverse thru if not path look at index?

Copy link
Member Author

Choose a reason for hiding this comment

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

ahh ok if nv_index is 0 look at path..., is the inverse thru if not path look at index?

yes. It's ensured by ifapi_json_TPMS_POLICYNV_deserialize that either nv_index or path is set.

@JuergenReppSIT JuergenReppSIT added this to the Version 3.3 milestone Jul 9, 2022
@JuergenReppSIT JuergenReppSIT merged commit 7ac5d24 into tpm2-software:master Jul 11, 2022
@JuergenReppSIT JuergenReppSIT deleted the fapi-fix-callback-getnvpublic branch November 11, 2023 08:42
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