Migration guide: remaining APIs #479
Labels
No labels
api-break
approved
bug
component-docs
component-platform
component-test
dependencies
deprecation
DO-NOT-MERGE
enhancement
good first issue
help wanted
needs-adoption
needs-backports
needs-ci
needs-design-approval
needs-info
needs-preceding-pr
needs-review
needs-reviewer
needs-work
priority-high
priority-low
priority-medium
priority-scheduled
priority-very-high
resolved-after-1.1
single-reviewer
size-l
size-m
size-optimisation
size-s
size-xs
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-Mbed-TLS/TF-PSA-Crypto!479
Loading…
Reference in a new issue
No description provided.
Delete branch "migration-guide-headers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
These are updates to the 1.0 migration guide based on comparing the public header files in Mbed TLS 3.6 (excluding X.509/TLS ones) and in TF-PSA-Crypto 1.0.
See https://github.com/Mbed-TLS/mbedtls/pull/10422#discussion_r2383050384 regarding removed compilation options. I haven't gone looking for compilation options with changed semantics; I don't recall anything except arguably the RNG which already has a well-populated section.
Out of scope:
PR checklist
I'm going to rebase on top of the latest
developmentso that the CI passes.@ -0,0 +1,36 @@## Compile-time configurationprobably "all the configuration" would sound better.
@ -0,0 +8,4 @@* otherwise `<psa/crypto_config.h>`;* additionally `TF_PSA_CRYPTO_USER_CONFIG_FILE`, if set.The macros `MBEDTLS_PSA_CRYPTO_CONFIG_FILE` and `MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE` are no longer recognized. Use `TF_PSA_CRYPTO_CONFIG_FILE` and `TF_PSA_CRYPTO_USER_CONFIG_FILE` insteadProbably more a question than a comment "recognized" is american English, as opposed to recognised (British English). I don't think there is a right or wrong answer which one to use, on previous projects I seem to remember being told we should use British English in Arm. I guess we should at least be consistent across the project if not the company? So do we have precedence or instruction to use American over British English?
@ -1,11 +1,172 @@## Random number generation configurationI would change this to "If you have a fast cryptographic-quality source of random data, enable
MBEDTLS_PSA_CRYPTO_EXTERNAL_RNGand do not enableMBEDTLS_ENTROPY_C." As it probably reads better, though it's very minor.@ -0,0 +8,4 @@* otherwise `<psa/crypto_config.h>`;* additionally `TF_PSA_CRYPTO_USER_CONFIG_FILE`, if set.The macros `MBEDTLS_PSA_CRYPTO_CONFIG_FILE` and `MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE` are no longer recognized. Use `TF_PSA_CRYPTO_CONFIG_FILE` and `TF_PSA_CRYPTO_USER_CONFIG_FILE` insteadIIRC last time I heard about it American English spelling was the rule, with an exception for products whose team was fully British, who were allowed to stick to British English if they wanted to, or something like that.
@ -1,11 +1,172 @@## Random number generation configurationShould probably be non-volatile, or possibly just non volatile.
Just a few minor suggestions and comments.
@ -0,0 +8,4 @@* otherwise `<psa/crypto_config.h>`;* additionally `TF_PSA_CRYPTO_USER_CONFIG_FILE`, if set.The macros `MBEDTLS_PSA_CRYPTO_CONFIG_FILE` and `MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE` are no longer recognized. Use `TF_PSA_CRYPTO_CONFIG_FILE` and `TF_PSA_CRYPTO_USER_CONFIG_FILE` insteadArm's main style guide requires American English. But we're a TrustedFirmware project, not an Arm project, and there isn't any specific style guide that we're mandated to follow. I'm not sure if it's written down anywhere, but our unofficial policy is that all “mainstream” variants of English are welcome, as long as you're consistent within a reasonable fragment of text.
In our current documentation, -ized/-ization endings are much more prevalent than -ised/-isation endings.
LGTM except for two typos and a question.
@ -0,0 +1,36 @@## Compile-time configurationTypo: s/is set/if set/
The last sentence doesn't sound very clear to me. Do you mean if you want say LMS you should
#include "lms.h"and then check fordefined(MBEDTLS_LMS_C)rather than includebuild_info.h? If so, probably just add an example.(Btw, if there are strong reason for users not to include
build_info.hdirectly or this is just a soft advice, like their code is going to be more compact without it?)Typo: properties OF the configuration
Whoops, I was a third reviewer. I'll leave my comments here but go and review one of the other PRs.
@ -1,11 +1,172 @@## Random number generation configurationI've completely reworked this subsection, because
MBEDTLS_ENTROPY_Cis now an internal option. We had forgotten to update the migration guide for that.LGTM, thanks!