-
Notifications
You must be signed in to change notification settings - Fork 60
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
Fixes for TPM private key import with custom seed #281
Conversation
…rtPrivateKeyBuffer` for importing private key ECC/RSA in either PEM or DER(ASN.1). ZD16249
src/tpm2_wrap.c
Outdated
#else | ||
(void)dev; | ||
(void)in; | ||
(void)salt; | ||
rc = NOT_COMPILED_IN; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wolfTPM2_EncryptSalt
is always returning NOT_COMPILED_IN
, I think this rc = NOT_COMPILED_IN
is from the old code and you just missed deleting this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually now that I look at it why was that else macro removed? if WOLFTPM2_NO_WOLFCRYPT
is defined rc will be undefined before return, you could probably change it to int rc = NOT_COMPILED_IN;
at the start of the function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check my comment on wolfTPM2_EncryptSalt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compiled and ran
wolfTPM2_ImportPrivateKeyBuffer
for importing private key ECC/RSA in either PEM or DER(ASN.1).ZD 16249