diff --git a/src/hash/clu_hash.c b/src/hash/clu_hash.c index 019436d3..3c288de4 100644 --- a/src/hash/clu_hash.c +++ b/src/hash/clu_hash.c @@ -121,7 +121,7 @@ int wolfCLU_hash(WOLFSSL_BIO* bioIn, WOLFSSL_BIO* bioOut, const char* alg, } #endif #ifndef NO_SHA - if (ret == WOLFCLU_SUCCESS && XSTRNCMP(alg, "sha", 3) == 0) { + if (ret == WOLFCLU_SUCCESS && XSTRCMP(alg, "sha") == 0) { ret = wc_ShaHash(input, inputSz, output); } #endif diff --git a/src/hash/clu_hash_setup.c b/src/hash/clu_hash_setup.c index 86d904ae..e2653cfc 100644 --- a/src/hash/clu_hash_setup.c +++ b/src/hash/clu_hash_setup.c @@ -81,7 +81,7 @@ int wolfCLU_hashSetup(int argc, char** argv) for (i = 0; i < (int)algsSz; ++i) { /* checks for acceptable algorithms */ - if (XSTRNCMP(argv[2], algs[i], XSTRLEN(algs[i])) == 0) { + if (XSTRCMP(argv[2], algs[i]) == 0) { alg = argv[2]; algCheck = 1; } @@ -140,7 +140,7 @@ int wolfCLU_hashSetup(int argc, char** argv) #endif #ifndef NO_SHA - if (XSTRNCMP(alg, "sha", 3) == 0) + if (XSTRCMP(alg, "sha") == 0) size = WC_SHA_DIGEST_SIZE; #endif