DH SP math: return key size error with DH Agree

SP math requires SP to support DH operations.
When SP doesn't support bit size, WC_KEY_SIZE_E must be returned.
This commit is contained in:
Sean Parkinson
2021-02-15 09:04:43 +10:00
parent 505514415d
commit 4b1c89ab38

View File

@@ -1998,6 +1998,8 @@ static int wc_DhAgree_Sync(DhKey* key, byte* agree, word32* agreeSz,
mp_clear(z);
mp_clear(y);
mp_forcezero(x);
#else
ret = WC_KEY_SIZE_E;
#endif
#ifdef WOLFSSL_SMALL_STACK