-
Notifications
You must be signed in to change notification settings - Fork 834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable TFM mp_sqr even when HAVE_ECC disabled #7333
Conversation
Hi @gojimmypi , I suspect we might need additional macro gating in the test cases? To only test mp_sqr() when it is available. Reproduced with |
Reproduced with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Jim.
It was incredibly difficult to find the right combination of options to reproduce. But was able to get it ./configure --disable-ecc --enable-fastmath --enable-keygen --enable-opensslextra CFLAGS="-DWOLFSSL_PUBLIC_MP" && make
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, having the math libraries consistent with provided API when building with WOLFSSL_PUBLIC_MP is likely better than having the test case conditionally test the mp_sqr API. Rerunning this without --enable-fastmath
hits the same test case (no compile errors).
Sorry for the challenge. I was hoping the referenced
Let me know if I can polish this up with any additional tests. |
Description
This may not be essential to release... however during ESP8266 testing, I realized the wolfssl_test expects to see the TFM
mp_sqr()
even whenHAVE_ECC
is not defined.See my user_settings.h used in the Espressif wolfssl_test example.
Here's the error I see otherwise:
In particular line 47147 of test.c when calling
mp_prime_is_prime_ex
. See also test.c line 47416.Fixes zd# n/a
Testing
How did you test?
Not fully tested. Proposed last-minute inclusion in next release.
Checklist