mirror of https://github.com/wolfSSL/wolfTPM.git
fix unseal: Unload handles on exit
parent
a37d2387e0
commit
b4ddd7e736
|
@ -14,6 +14,7 @@ examples_seal_seal_LDADD = src/libwolftpm.la $(LIB_STATIC_ADD)
|
|||
examples_seal_seal_DEPENDENCIES = src/libwolftpm.la
|
||||
|
||||
examples_seal_unseal_SOURCES = examples/seal/unseal.c \
|
||||
examples/tpm_test_keys.c \
|
||||
examples/tpm_io.c
|
||||
examples_seal_unseal_LDADD = src/libwolftpm.la $(LIB_STATIC_ADD)
|
||||
examples_seal_unseal_DEPENDENCIES = src/libwolftpm.la
|
||||
|
|
|
@ -151,6 +151,8 @@ int TPM2_Unseal_Example(void* userCtx, int argc, char *argv[])
|
|||
wolfTPM2_SetAuthPassword(&dev, 0, NULL);
|
||||
|
||||
exit:
|
||||
wolfTPM2_UnloadHandle(&dev, &storage.handle);
|
||||
wolfTPM2_UnloadHandle(&dev, &newKey.handle);
|
||||
|
||||
wolfTPM2_Cleanup(&dev);
|
||||
return rc;
|
||||
|
|
Loading…
Reference in New Issue