@@ -191,7 +191,8 @@ static int bench_sym_aes(WOLFTPM2_DEV* dev, WOLFTPM2_KEY* storageKey,
191191 if (rc != 0 ) goto exit ;
192192 rc = wolfTPM2_CreateAndLoadKey (dev , & aesKey , & storageKey -> handle ,
193193 & publicTemplate , (byte * )gUsageAuth , sizeof (gUsageAuth )- 1 );
194- if ((rc & TPM_RC_MODE ) == TPM_RC_MODE || (rc & TPM_RC_VALUE ) == TPM_RC_VALUE ) {
194+ if ((rc & RC_MAX_FMT1 ) == TPM_RC_MODE ||
195+ (rc & RC_MAX_FMT1 ) == TPM_RC_VALUE ) {
195196 printf ("Benchmark symmetric %s not supported!\n" , desc );
196197 rc = 0 ; goto exit ;
197198 }
@@ -234,6 +235,7 @@ static int bench_pqc_mldsa(WOLFTPM2_DEV* dev, double maxDuration,
234235 XMEMSET (& mldsaKey , 0 , sizeof (mldsaKey ));
235236 XMEMSET (& publicTemplate , 0 , sizeof (publicTemplate ));
236237 XMEMSET (message , 0x11 , sizeof (message ));
238+ XMEMSET (sig , 0 , sizeof (sig ));
237239
238240 rc = wolfTPM2_GetKeyTemplate_MLDSA (& publicTemplate ,
239241 TPMA_OBJECT_sign | TPMA_OBJECT_fixedTPM | TPMA_OBJECT_fixedParent |
@@ -275,6 +277,8 @@ static int bench_pqc_mldsa(WOLFTPM2_DEV* dev, double maxDuration,
275277 } while (bench_stats_check (start , & count , maxDuration ));
276278 rc = bench_asym_done ("ML-DSA" , 65 , "sign" , count , start , rc );
277279 if (rc != 0 ) goto exit ;
280+ if (count == 0 )
281+ goto exit ; /* no signature produced; nothing to verify */
278282
279283 bench_stats_start (& count , & start );
280284 do {
0 commit comments