Skip to content

TF-PSA-Crypto version macro #323

@gilles-peskine-arm

Description

@gilles-peskine-arm

TF-PSA-Crypto should define version number macros, similar to what Mbed TLS has as MBEDTLS_VERSION_MAJOR, MBEDTLS_VERSION_MINOR, MBEDTLS_VERSION_PATCH. We should also provide strings similar to MBEDTLS_VERSION_NUMBER, MBEDTLS_VERSION_STRING, MBEDTLS_VERSION_STRING_FULL.

TBD: what header provides these macros? In Mbed TLS, the macros are defined in mbedlts/build_info.h so that they are always available, but the historical interface and the one that's still kind of intended is mbedtls/version.h. I think we should make it official that the TF-PSA-Crypto macros are exposed through #include <tf-psa-crypto/version.h>, regardless of where they are defined (presumably tf-psa-crypto/build_info.h).

(Note that this is different from PSA_CRYPTO_API_VERSION_MAJOR and PSA_CRYPTO_API_VERSION_MINOR, which indicate support for API versions.)

Related, but out of scope here: how projects can know the version of Mbed TLS or TF-PSA-Crypto, if they want crypto and support both Mbed TLS 3.6 and TF-PSA-Crypto 1.x.

Actions here:

  • Define the macros.
  • Document the macros and how to access them.

Follow-ups:

  • Make sure that the release process includes updating the TF-PSA-Crypto version.

Metadata

Metadata

Labels

size-xsEstimated task size: extra small (a few hours at most)

Projects

Status

Done

Status

1.0 pre-release cleanup

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions