Skip to content

Commit 2279ebf

Browse files
authored
Merge pull request #381 from padelsbach/wp-rsa-remove-ifdefs
2 parents db8342d + a0aca98 commit 2279ebf

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/wp_internal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,9 @@ int wp_hash_copy(wc_HashAlg* src, wc_HashAlg* dst, enum wc_HashType hashType)
510510
WOLFPROV_ENTER(WP_LOG_COMP_PROVIDER, "wp_hash_copy");
511511

512512
#if LIBWOLFSSL_VERSION_HEX >= 0x05007004
513-
switch (src->type)
513+
switch ((int)src->type)
514514
#else
515-
switch (hashType)
515+
switch ((int)hashType)
516516
#endif
517517
{
518518
case WC_HASH_TYPE_MD5:

src/wp_rsa_kmgmt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ static int wp_digest_to_ossl_digest(enum wc_HashType hashType,
922922
{
923923
int ok = 1;
924924

925-
switch (hashType) {
925+
switch ((int)hashType) {
926926
case WC_HASH_TYPE_MD5:
927927
*osslDigest = OSSL_DIGEST_NAME_MD5;
928928
break;
@@ -969,6 +969,7 @@ static int wp_digest_to_ossl_digest(enum wc_HashType hashType,
969969
#ifdef WOLFSSL_SM3
970970
case WC_HASH_TYPE_SM3:
971971
#endif
972+
default:
972973
ok = 0;
973974
}
974975

0 commit comments

Comments
 (0)