Skip to content
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

Gate test mp_read_radix on OPENSSL_EXTRA or !NO_DSA or HAVE_ECC #8015

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

gojimmypi
Copy link
Contributor

Description

TFM conditionally defines mp_read_radix:

#if defined(OPENSSL_EXTRA) || !defined(NO_DSA) || defined(HAVE_ECC)
    MP_API int mp_read_radix(mp_int* a, const char* str, int radix);
#endif

In a user_settings.h file, I have NO_DSA defined, no OPENSSL_EXTRA and no HAVE_ECC.

While compiling for the ESP8266, I see this error:

test.c
/mnt/c/workspace/wolfssl-gojimmypi/wolfcrypt/test/test.c: In function 'mp_test_cmp':
/mnt/c/workspace/wolfssl-gojimmypi/wolfcrypt/test/test.c:55029:5: error: implicit declaration of function 'mp_read_radix'; did you mean 'mp_toradix'? [-Werror=implicit-function-declaration]
     mp_read_radix(b, "1234567890123456789", MP_RADIX_HEX);
     ^~~~~~~~~~~~~
     mp_toradix
cc1: some warnings being treated as errors
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

This PR gates the mp_read_radix in the wolfcrypt test on the same criteria as the API in tfm.h.

Fixes zd#

Testing

How did you test?

Tested only in Espressif envrionment.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@gojimmypi gojimmypi changed the title gate test mp_read_radix on OPENSSL_EXTRA || !NO_DSA || HAVE_ECC gate test mp_read_radix on OPENSSL_EXTRA or !NO_DSA or HAVE_ECC Sep 25, 2024
Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Over to @wolfSSL-Bot

Copy link
Contributor

@JacobBarthelmeh JacobBarthelmeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reproduced with ./configure --disable-dsa --disable-ecc --enable-fastmath CPPFLAGS=-DWOLFSSL_PUBLIC_MP && make. When you get a chance could you add that configure to our CI tests to maintain the build?

@JacobBarthelmeh JacobBarthelmeh merged commit 79b5ec8 into wolfSSL:master Sep 25, 2024
138 checks passed
@gojimmypi gojimmypi deleted the pr-mp_read_radix branch October 1, 2024 16:50
@gojimmypi gojimmypi changed the title gate test mp_read_radix on OPENSSL_EXTRA or !NO_DSA or HAVE_ECC Gate test mp_read_radix on OPENSSL_EXTRA or !NO_DSA or HAVE_ECC Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants