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

Config check fail despite prerequisites being fulfilled #1412

Closed
Taiki-San opened this issue Feb 27, 2018 · 1 comment · Fixed by #2019
Closed

Config check fail despite prerequisites being fulfilled #1412

Taiki-San opened this issue Feb 27, 2018 · 1 comment · Fixed by #2019

Comments

@Taiki-San
Copy link

Description

  • Type: Bug
  • Priority: Minor

Disabling all elliptic curves besides MBEDTLS_ECP_DP_CURVE25519_ENABLED doesn't fulfill the requirements of MBEDTLS_ECP_C, despite the description mentioning only MBEDTLS_BIGNUM_C (enabled) and at least one MBEDTLS_ECP_DP_XXX_ENABLED.


Bug

mbed TLS build:
Version: 1bf6123

Expected behavior
mbedTLS compiles with all but one curve being enabled, as shown below.

// #define MBEDTLS_ECP_DP_SECP224R1_ENABLED
// #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
// #define MBEDTLS_ECP_DP_SECP384R1_ENABLED
// #define MBEDTLS_ECP_DP_SECP521R1_ENABLED
// #define MBEDTLS_ECP_DP_SECP192K1_ENABLED
// #define MBEDTLS_ECP_DP_SECP224K1_ENABLED
// #define MBEDTLS_ECP_DP_SECP256K1_ENABLED
// #define MBEDTLS_ECP_DP_BP256R1_ENABLED
// #define MBEDTLS_ECP_DP_BP384R1_ENABLED
// #define MBEDTLS_ECP_DP_BP512R1_ENABLED
#define MBEDTLS_ECP_DP_CURVE25519_ENABLED

Actual behavior

Compilation fail with error message
../include/mbedtls/check_config.h:122:2: error: #error "MBEDTLS_ECP_C defined, but not all prerequisites"

Steps to reproduce

Disable most curves, while letting MBEDTLS_ECP_DP_CURVE25519_ENABLED defined.
check_config.h will then check the requirements of MBEDTLS_ECP_C which are missing this specific curve, despite the documentation implying otherwise


Question

Is this behavior intentional?
I can prepare a PR to add MBEDTLS_ECP_DP_CURVE25519_ENABLED to the check if that's simply an oversight.

@Taiki-San
Copy link
Author

Duplicate of #941

gilles-peskine-arm added a commit to gilles-peskine-arm/mbedtls that referenced this issue Jul 2, 2020
gilles-peskine-arm added a commit to gilles-peskine-arm/mbedtls that referenced this issue Jul 2, 2020
gilles-peskine-arm added a commit to gilles-peskine-arm/mbedtls that referenced this issue Jul 2, 2020
gilles-peskine-arm added a commit to gilles-peskine-arm/mbedtls that referenced this issue Jul 22, 2020
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 a pull request may close this issue.

1 participant