diff --git a/src/ssl.c b/src/ssl.c index 224c409ec..7c22b4f85 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -47059,10 +47059,12 @@ unsigned long wolfSSL_BN_mod_word(const WOLFSSL_BIGNUM *bn, } if (w <= MP_MASK) { - if (mp_mod_d((mp_int*)bn->internal, (WOLFSSL_BN_ULONG)w, &ret) != MP_OKAY) { + WOLFSSL_BN_ULONG bn_ret; + if (mp_mod_d((mp_int*)bn->internal, (WOLFSSL_BN_ULONG)w, &bn_ret) != MP_OKAY) { WOLFSSL_MSG("mp_add_d error"); return (unsigned long)WOLFSSL_FATAL_ERROR; } + ret = (unsigned long)bn_ret; } else { int mp_ret; mp_int w_mp, r_mp; diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index bf063076f..a3bb97712 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -15635,9 +15635,11 @@ static int dsa_test(void) #else byte tmp[1024]; DsaKey key[1]; +#ifdef WOLFSSL_KEY_GEN DsaKey derIn[1]; DsaKey genKey[1]; #endif +#endif #ifdef USE_CERT_BUFFERS_1024 XMEMCPY(tmp, dsa_key_der_1024, sizeof_dsa_key_der_1024);