-
Couldn't load subscription status.
- Fork 42
Move tests/data_files to data_files in framework
#18
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
Move tests/data_files to data_files in framework
#18
Conversation
Signed-off-by: Daan Timmer <[email protected]>
A large block of code is only reachable if MBEDTLS_PK_USE_PSA_EC_DATA is enabled, i.e. if MBEDTLS_USE_PSA_CRYPTO is enabled with driver-only ECC. Compilers are likely to figure it out, but still, for clarity and robustness, do guard that block of code with the appropriate conditional compilation guard. Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Troy-Butler <[email protected]>
Signed-off-by: Troy-Butler <[email protected]>
Replace relevant Mbed TLS API config options with their PSA API equivalents. Signed-off-by: Thomas Daubney <[email protected]>
Replace relevant Mbed TLS API config options with their PSA API equivalents. Signed-off-by: Thomas Daubney <[email protected]>
…se_psa Replace relevant Mbed TLS API config options with their PSA API equivalents. Signed-off-by: Thomas Daubney <[email protected]>
When trying to decrypt data with an invalid key, we found that `mbedtls` returned `0x6200` (`-25088`), which means "_CIPHER - Input data contains invalid padding and is rejected_" from `mbedtls_cipher_finish`, but it also set the output len as `18446744073709551516`. In case we detect an error with padding, we leave the output len zero'ed and return `MBEDTLS_ERR_CIPHER_INVALID_PADDING`. I believe that the current test cases are sufficient, as they fail if I return the alternative code `MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA`, so they do already expect a padding failure, but now we don't change the output len in the error case. Here's a reference for the way `openssl` checks the padding length: - https://github.com/openssl/openssl/blob/1848c561ec39a9ea91ff1bf740a554be274f98b0/crypto/evp/evp_enc.c#L1023 - openssl/openssl@b554eef Signed-off-by: Andre Goddard Rosa <[email protected]> Signed-off-by: Andre Goddard Rosa <[email protected]>
Signed-off-by: Andre Goddard Rosa <[email protected]> Signed-off-by: Andre Goddard Rosa <[email protected]>
Signed-off-by: Thomas Daubney <[email protected]>
Signed-off-by: Ronald Cron <[email protected]>
Signed-off-by: Ronald Cron <[email protected]>
…cases With the robustness fix: `PASSED (125 suites, 26639 tests run)` Without the robustness fix: `FAILED (125 suites, 26639 tests run)` Signed-off-by: Andre Goddard Rosa <[email protected]> Signed-off-by: Andre Goddard Rosa <[email protected]>
Signed-off-by: Ronald Cron <[email protected]>
On the CI, the git version when running on Ubuntu 16.04 is 2.7 and it does not support the "--recurse-submodules" option of "git ls-files" thus do not use it. Another argument to not use it is that when TF-PSA-Crypto will be a submodule of mbedtls we will not want check_files.py to check the TF-PSA-Crypto files as well. Signed-off-by: Ronald Cron <[email protected]>
Signed-off-by: Thomas Daubney <[email protected]>
0ca171b to
eed2d9a
Compare
Signed-off-by: Thomas Daubney <[email protected]>
Signed-off-by: Thomas Daubney <[email protected]>
Signed-off-by: Thomas Daubney <[email protected]>
Unfortunately this compiler complains about a variable potentially being used un-initialized. Silence the warning by initializing it to a sane default. Signed-off-by: Patrick Wildt <[email protected]>
Signed-off-by: Thomas Daubney <[email protected]>
Signed-off-by: Thomas Daubney <[email protected]>
Signed-off-by: Turiiya <[email protected]>
Alert if all tests are filtered out or skipped: that probably indicates a test script that set up an unintended configuration or an overly strict filter. You can pass `--min 0` to bypass this check. You can pass `--min` with a larger value to require that many test cases to run. Signed-off-by: Gilles Peskine <[email protected]>
psa_crypto_mac.c uses mbedtls_cipher_xxx() functions to perform CMAC operations. Therefore we need to enable CIPHER_C when PSA CMAC is builtin. Signed-off-by: Valerio Setti <[email protected]>
Signed-off-by: Ronald Cron <[email protected]>
…oleans Report configuration settings in the outcome file
…padding-len-on-aes-128-cbc-decryption Add invalid `padding_len` check in `get_pkcs_padding`
Replace MBEDTLS_MD_CAN_SHA224 with PSA_WANT_ALG_SHA_224
Since MD_OR_USE_PSA_INIT() can fail and jump to the "exit" label it should be placed after all initializations has been done. This issue was discovered by Coverity testing. Signed-off-by: Valerio Setti <[email protected]>
Replace MBEDTLS_MD_CAN_RIPEMD160 with PSA_WANT_ALG_RIPEMD160
tests_suite_debug: fix psa initialization
Replace MBEDTLS_MD_CAN_SHA384 with PSA_WANT_ALG_SHA_384
Signed-off-by: Elena Uziunaite <[email protected]>
Signed-off-by: Elena Uziunaite <[email protected]>
Replace MBEDTLS_MD_CAN_SHA3_512 with PSA_WANT_ALG_SHA3_512
…cm_star-iv_length_enforcement psa_cipher_decrypt CCM*: fix rejection of messages shorter than 3 bytes
Silence gcc 12.2.0 warning
Fix NULL argument handling in mbedtls_xxx_free() functions
Signed-off-by: Elena Uziunaite <[email protected]>
Signed-off-by: Elena Uziunaite <[email protected]>
Replace MBEDTLS_MD_CAN_SHA3_256 with PSA_WANT_ALG_SHA3_256
Signed-off-by: David Horstmann <[email protected]>
…mann-arm/add-test-data-files
Tell the test certificate generation script to get the jinja template from, and output the resulting header to, the framework repo. Signed-off-by: David Horstmann <[email protected]>
fd307a9 to
1b173ae
Compare
|
Rebased by doing the following actions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks!
|
Validated by the CI of #9249 (dev) and #9375 (3.6), merging. |
Move
tests/data_filesto the framework with history. Partial fix for #17.