Skip to content

Commit

Permalink
Remove MBEDTLS_ECP_HAVE_xxx and MBEDTLS_MD_CAN_xxx
Browse files Browse the repository at this point in the history
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
  • Loading branch information
eleuzi01 committed Sep 9, 2024
1 parent 26e0ebb commit e95d7eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
17 changes: 4 additions & 13 deletions docs/driver-only-builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,8 @@ considerations](#general-considerations) above.

If you want to check at compile-time whether a certain hash algorithm is
available in the present build of Mbed TLS, regardless of whether it's
provided by a driver or built-in, you should use the following macros:

- for code that uses only the PSA Crypto API: `PSA_WANT_ALG_xxx` from
`psa/crypto.h`;
- for code that uses non-PSA crypto APIs: `MBEDTLS_MD_CAN_xxx` from
`mbedtls/config_adjust_legacy_crypto.h`.
provided by a driver or built-in, you should use `PSA_WANT_ALG_xxx` from
`psa/crypto.h`.

### HMAC

Expand Down Expand Up @@ -186,13 +182,8 @@ enabled, with the following exceptions:

If you want to check at compile-time whether a certain curve is available in
the present build of Mbed TLS, regardless of whether ECC is provided by a
driver or built-in, you should use the following macros:

- for code that uses only the PSA Crypto API: `PSA_WANT_ECC_xxx` from
`psa/crypto.h`;
- for code that may also use non-PSA crypto APIs: `MBEDTLS_ECP_HAVE_xxx` from
`mbedtls/build_info.h` where xxx can take the same values as for
`MBEDTLS_ECP_DP_xxx` macros.
driver or built-in, you should use `PSA_WANT_ECC_xxx` from
`psa/crypto.h`.

Note that for externally-provided drivers, the integrator is responsible for
ensuring the appropriate `MBEDTLS_PSA_ACCEL_xxx` macros are defined. However,
Expand Down
1 change: 0 additions & 1 deletion include/mbedtls/config_adjust_legacy_crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@

#if defined(MBEDTLS_MD_LIGHT)
/*
* - MBEDTLS_MD_CAN_xxx is defined if the md module can perform xxx.
* - MBEDTLS_MD_xxx_VIA_PSA is defined if the md module may perform xxx via PSA
* (see below).
* - MBEDTLS_MD_SOME_PSA is defined if at least one algorithm may be performed
Expand Down

0 comments on commit e95d7eb

Please sign in to comment.