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

Unable to build the test framework when no SHA2 hash module is enabled #4930

Closed
gilles-peskine-arm opened this issue Sep 9, 2021 · 1 comment
Assignees
Labels
bug component-crypto Crypto primitives and low-level interfaces

Comments

@gilles-peskine-arm
Copy link
Contributor

With Mbed TLS 2.27 or 3.0:

echo '#define MBEDTLS_AES_C' >include/mbedtls/mbedtls_config.h # config.h on 2.2x
make

Expected outcome: the build succeeds.

Actual outcome:

…
In file included from src/random.c:38:
../include/mbedtls/entropy.h:129:5: error: unknown type name ‘mbedtls_sha256_context’
  129 |     mbedtls_sha256_context  accumulator;
      |     ^~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:97: src/random.o] Error 1
make: *** [Makefile:23: mbedtls_test] Error 2

This is admittedly an exotic configuration (there are few useful library configurations that don't include SHA-256 or SHA-512, even in builds without the entropy module, which are themselves somewhat unusual). But it does make sense if you only want symmetric cryptography with pre-generated keys. And it will become less exotic once SHA-3 is added.

@tom-cosgrove-arm
Copy link
Contributor

Closing this as fixed by #5269 for development and #5167 for 2.x.

I've confirmed that both branches build with no errors given the one-line config in the description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component-crypto Crypto primitives and low-level interfaces
Projects
None yet
Development

No branches or pull requests

4 participants