diff --git a/configure.ac b/configure.ac index 659ae81..d4ffa9e 100644 --- a/configure.ac +++ b/configure.ac @@ -241,13 +241,17 @@ then fi # Windows TBS device Support +AC_ARG_ENABLE([wintbs],, + [ ENABLED_WINTBS=$enableval ], + [ ENABLED_WINTBS=no ] + ) AC_ARG_ENABLE([winapi], [AS_HELP_STRING([--enable-winapi],[Enable use of TPM through Windows driver (default: disabled)])], [ ENABLED_WINAPI=$enableval ], [ ENABLED_WINAPI=no ] ) -if test "x$ENABLED_WINAPI" = "xyes" +if test "x$ENABLED_WINAPI" = "xyes" || test "x$ENABLED_WINTBS" = "xyes" then if test "x$ENABLED_DEVTPM" = "xyes" -o "x$ENABLED_SWTPM" = "xyes" then diff --git a/src/tpm2_wrap.c b/src/tpm2_wrap.c index 6efff10..de73f33 100644 --- a/src/tpm2_wrap.c +++ b/src/tpm2_wrap.c @@ -3306,7 +3306,7 @@ int wolfTPM2_NVStoreKey(WOLFTPM2_DEV* dev, TPM_HANDLE primaryHandle, printf("TPM2_EvictControl (storing key to NV) not allowed on " "Windows TBS (err 0x%x)\n", rc); #endif - rc = TPM_RC_NV_UNAVAILABLE; + rc = TPM_RC_COMMAND_CODE; } #endif