diff --git a/examples/client/client.c b/examples/client/client.c index b47b3ecd7..c7b1b952f 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -2950,7 +2950,9 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args) #endif /* HAVE_RPK */ break; case 268: +#ifndef NO_CERTS fileFormat = WOLFSSL_FILETYPE_ASN1; +#endif break; case 269: #if defined(WOLFSSL_SYS_CRYPTO_POLICY) diff --git a/src/tls13.c b/src/tls13.c index 5297c9693..59bc3e52c 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -10558,6 +10558,7 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input, case TLS_ASYNC_DO: { sig = input + args->idx; + (void)sig; #ifdef WOLFSSL_DUAL_ALG_CERTS if (ssl->sigSpec != NULL && *ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_BOTH) { diff --git a/tests/api.c b/tests/api.c index f0090c183..025df48b6 100644 --- a/tests/api.c +++ b/tests/api.c @@ -20118,7 +20118,7 @@ static int test_wolfSSL_PKCS7_certs(void) while (EXPECT_SUCCESS() && (sk_X509_INFO_num(info_sk) > 0)) { X509_INFO* info = NULL; ExpectNotNull(info = sk_X509_INFO_shift(info_sk)); - if (info != NULL) { + if (EXPECT_SUCCESS() && info != NULL) { ExpectIntGT(sk_X509_push(sk, info->x509), 0); info->x509 = NULL; } diff --git a/wolfcrypt/src/random.c b/wolfcrypt/src/random.c index c73a02731..187f2c98e 100644 --- a/wolfcrypt/src/random.c +++ b/wolfcrypt/src/random.c @@ -4207,8 +4207,9 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz) #ifdef FORCE_FAILURE_GETRANDOM /* don't fallback to /dev/urandom */ return ret; - #else - /* reset error and fallback to using /dev/urandom */ + #elif !defined(NO_FILESYSTEM) + /* reset error and fallback to using /dev/urandom if filesystem + * support is compiled in */ ret = 0; #endif } diff --git a/wolfcrypt/src/sp_int.c b/wolfcrypt/src/sp_int.c index 50f71f6c1..0890ffb84 100644 --- a/wolfcrypt/src/sp_int.c +++ b/wolfcrypt/src/sp_int.c @@ -8561,10 +8561,11 @@ int sp_rshb(const sp_int* a, int n, sp_int* r) } else { /* Move the bits down starting at least significant digit. */ - for (j = 0; i < a->used - 1; i++, j++) - r->dp[j] = (a->dp[i] >> n) | (a->dp[i+1] << (SP_WORD_SIZE - n)); + for (j = 0; j < (sp_size_t)(a->used - 1 - i); j++) + r->dp[j] = (a->dp[j+i] >> n) | + (a->dp[j+i+1] << (SP_WORD_SIZE - n)); /* Most significant digit has no higher digit to pull from. */ - r->dp[j] = a->dp[i] >> n; + r->dp[j] = a->dp[j+i] >> n; /* Set the count of used digits. */ r->used = (sp_size_t)(j + (r->dp[j] > 0)); }