-
Notifications
You must be signed in to change notification settings - Fork 73
Code size reduction options #447
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
base: master
Are you sure you want to change the base?
Conversation
…PM2 commands. Combined some duplicate code.
embhorn
left a comment
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.
Just a few minor questions...
| } | ||
|
|
||
| #ifndef WOLFTPM_NO_PCR_POLICY | ||
| if (endorseKey) { |
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.
if endorseKey is set, should this be an error?
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.
With ./configure --enable-devtpm --enable-debug --disable-pcr-policy
./examples/keygen/keygen -eh
TPM2.0 Key generation example
Key Blob: keyblob.bin
Algorithm: RSA
Template: AIK
SRK: RSA
Use Parameter Encryption: NULL
TPM2: Caps 0x00000000, Did 0x0000, Vid 0x0000, Rid 0x 0
TPM2_CreatePrimary: 0x80000000 (314 bytes)
RSA AIK template
Creating new RSA key...
TPM2_Create key failed 303: TPM_RC_AUTH_UNAVAILABLE: The authValue or authPolicy is not available for selected entity
wolfTPM2_CreateKey failed
Failure 0x12f: TPM_RC_AUTH_UNAVAILABLE: The authValue or authPolicy is not available for selected entity
TPM2_FlushContext: Closed handle 0x80000000
| list(APPEND WOLFTPM_DEFINITIONS | ||
| "-DWOLFTPM_NO_ATTESTATION") | ||
| endif() | ||
|
|
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.
Does it make sense to add conditions to the examples build section, as is done with the include.am instructions?
Add Command Group Options for Code Size Reduction
Adds compile-time options to exclude groups of TPM2 commands, reducing code size for bare-metal and safety-critical applications.
New Build Options
WOLFTPM_NO_NV--disable-nvWOLFTPM_NO_PCR_POLICY--disable-pcr-policyWOLFTPM_NO_ATTESTATION--disable-attestationAll options default to enabled for backward compatibility.