Skip to content

Commit

Permalink
Fix for handling unsupported symmetric algorithms on benchmark.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed Jan 2, 2019
1 parent e38413f commit 148b36b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/bench/bench.c
Expand Up @@ -167,7 +167,11 @@ static int bench_sym_aes(WOLFTPM2_DEV* dev, WOLFTPM2_KEY* storageKey,
if (rc != 0) goto exit;
rc = wolfTPM2_CreateAndLoadKey(dev, &aesKey, &storageKey->handle,
&publicTemplate, (byte*)gUsageAuth, sizeof(gUsageAuth)-1);
if (rc != 0) goto exit;
if ((rc & TPM_RC_MODE) == TPM_RC_MODE || (rc & TPM_RC_VALUE) == TPM_RC_VALUE) {
printf("Benchmark symmetric %s not supported!\n", desc);
rc = 0; goto exit;
}
else if (rc != 0) goto exit;

bench_stats_start(&count, &start);
do {
Expand Down

0 comments on commit 148b36b

Please sign in to comment.