File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ int writeKeyBlob(const char* filename,
5151 rc = TPM2_AppendPublic (pubAreaBuffer , (word32 )sizeof (pubAreaBuffer ),
5252 & pubAreaSize , & key -> pub );
5353 if (rc != TPM_RC_SUCCESS ) return rc ;
54- if (pubAreaSize != (key -> pub .size + sizeof (key -> pub .size ))) {
54+ if (pubAreaSize != (key -> pub .size + ( int ) sizeof (key -> pub .size ))) {
5555#ifdef DEBUG_WOLFTPM
5656 printf ("writeKeyBlob: Sanity check for publicArea size failed\n" );
5757#endif
@@ -133,7 +133,7 @@ int readKeyBlob(const char* filename, WOLFTPM2_KEYBLOB* key)
133133 }
134134
135135 /* sanity check the sizes */
136- if (pubAreaSize != (key -> pub .size + sizeof (key -> pub .size )) ||
136+ if (pubAreaSize != (key -> pub .size + ( int ) sizeof (key -> pub .size )) ||
137137 key -> priv .size > sizeof (key -> priv .buffer )) {
138138 printf ("Struct size check failed (pub %d, priv %d)\n" ,
139139 key -> pub .size , key -> priv .size );
You can’t perform that action at this time.
0 commit comments