fix pointer type clash in wolfSSL_BN_mod_word(); restore accidentally removed WOLFSSL_KEY_GEN gate in dsa_test().

This commit is contained in:
Daniel Pouzzner
2020-11-26 01:20:29 -06:00
parent cbc190f13c
commit e6b587772f
2 changed files with 5 additions and 1 deletions

View File

@ -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;

View File

@ -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);