diff --git a/src/wp_internal.c b/src/wp_internal.c index 45b6f062..b5bfec7c 100644 --- a/src/wp_internal.c +++ b/src/wp_internal.c @@ -510,9 +510,9 @@ int wp_hash_copy(wc_HashAlg* src, wc_HashAlg* dst, enum wc_HashType hashType) WOLFPROV_ENTER(WP_LOG_COMP_PROVIDER, "wp_hash_copy"); #if LIBWOLFSSL_VERSION_HEX >= 0x05007004 - switch (src->type) + switch ((int)src->type) #else - switch (hashType) + switch ((int)hashType) #endif { case WC_HASH_TYPE_MD5: diff --git a/src/wp_rsa_kmgmt.c b/src/wp_rsa_kmgmt.c index 372d99a0..b4de0013 100644 --- a/src/wp_rsa_kmgmt.c +++ b/src/wp_rsa_kmgmt.c @@ -922,7 +922,7 @@ static int wp_digest_to_ossl_digest(enum wc_HashType hashType, { int ok = 1; - switch (hashType) { + switch ((int)hashType) { case WC_HASH_TYPE_MD5: *osslDigest = OSSL_DIGEST_NAME_MD5; break; @@ -969,6 +969,7 @@ static int wp_digest_to_ossl_digest(enum wc_HashType hashType, #ifdef WOLFSSL_SM3 case WC_HASH_TYPE_SM3: #endif + default: ok = 0; }