Skip to content

Commit d936b8f

Browse files
committed
Fix for cast warning. Fix for WOLFTPM_DEBUG to show verbose/io also.
1 parent 545c6b3 commit d936b8f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ endif()
123123
set(WOLFTPM_DEBUG "no" CACHE STRING
124124
"Enables option for debug (default: disabled)")
125125
set_property(CACHE WOLFTPM_DEBUG
126-
PROPERTY STRINGS "yes;no;verbose;io")
127-
if(WOLFTPM_DEBUG)
126+
PROPERTY STRINGS "no;yes;verbose;io")
127+
if(NOT "${WOLFTPM_DEBUG}" STREQUAL "no")
128128
list(APPEND WOLFTPM_DEFINITIONS
129129
"-DDEBUG_WOLFTPM"
130130
"-DDEBUG")
@@ -477,7 +477,7 @@ message("Generating config header...")
477477
set(WOLFTPM_CONFIG_H "yes" CACHE STRING
478478
"Enable generation of config.h and define HAVE_CONFIG_H (default: enabled)")
479479
set_property(CACHE WOLFTPM_DEBUG
480-
PROPERTY STRINGS "yes;no")
480+
PROPERTY STRINGS "yes;no;verbose;io")
481481
if(WOLFTPM_CONFIG_H)
482482
add_definitions("-DHAVE_CONFIG_H")
483483
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.in"

examples/pcr/policy_sign.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static int PolicySign(TPM_ALG_ID alg, const char* keyFile, const char* password,
140140
word32 idx = 0;
141141
#ifdef HAVE_PKCS8
142142
/* skip PKCS8 header */
143-
(void)wc_GetPkcs8TraditionalOffset((byte*)buf, &idx, bufSz);
143+
(void)wc_GetPkcs8TraditionalOffset((byte*)buf, &idx, (word32)bufSz);
144144
#endif
145145
rc = wc_RsaPrivateKeyDecode(buf, &idx, &key.rsa, (word32)bufSz);
146146
if (rc == 0) {

0 commit comments

Comments
 (0)