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

Key generation example for Keyed Hash #245

Merged
merged 2 commits into from
Oct 4, 2022

Conversation

dgarske
Copy link
Contributor

@dgarske dgarske commented Sep 28, 2022

ZD 14876

@@ -178,6 +179,10 @@ int TPM2_Keygen_Example(void* userCtx, int argc, char *argv[])
alg = TPM_ALG_SYMCIPHER;
bAIK = 0;
}
if (XSTRNCMP(argv[argc-1], "-keyedhash", 10) == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

XSTRNCMP unnecessary. argv guaranteed to be null-terminated strings. Use XSTRCMP.

@@ -300,6 +306,11 @@ int TPM2_Keygen_Example(void* userCtx, int argc, char *argv[])
rc = wolfTPM2_GetKeyTemplate_Symmetric(&publicTemplate, keyBits,
algSym, YES, YES);
}
else if (alg == TPM_ALG_KEYEDHASH) {
printf("Keyed Hash template\n");
rc = wolfTPM2_GetKeyTemplate_KeyedHash(&publicTemplate,
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this is indented one level too far.

@haydenroche5 haydenroche5 assigned dgarske and unassigned haydenroche5 Sep 29, 2022
@dgarske dgarske assigned haydenroche5 and unassigned dgarske Oct 4, 2022
@haydenroche5 haydenroche5 merged commit 11416ff into wolfSSL:master Oct 4, 2022
@dgarske dgarske deleted the keyedhash branch October 4, 2022 20:29
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