Dave Rodgman
c2e225be81
Add armclang build test
...
Signed-off-by: Dave Rodgman <dave.rodgman@gmail.com>
2023-06-05 21:29:35 -04:00
Dave Rodgman
43ea9ab5fa
Add build tests for Thumb and Thumb2 with clang
...
Signed-off-by: Dave Rodgman <dave.rodgman@gmail.com>
2023-06-05 21:26:27 -04:00
Dave Rodgman
763c8b96cc
Fix armclang compile fail
...
Signed-off-by: Dave Rodgman <dave.rodgman@gmail.com>
2023-06-05 21:24:57 -04:00
Gilles Peskine
c2f5b087c8
Merge pull request #7674 from yuhaoth/backport/change-path-of-parse-tests-input-data
...
[Backport 2.28] change path of parse tests input data
2023-06-01 18:28:48 +02:00
Jerry Yu
6df8f0ee8b
change path of mbedtls_x509_crl_parse input data
...
- Move data_files/crl-malformed-trailing-spaces.pem->data_files/parse_input/crl-malformed-trailing-spaces.pem
- Move data_files/crl-idp.pem->data_files/parse_input/crl-idp.pem
- Move data_files/crl-idpnc.pem->data_files/parse_input/crl-idpnc.pem
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-06-01 13:30:08 +08:00
Jerry Yu
3020abb9a9
change path of mbedtls_x509_csr_info input data
...
- Copy data_files/server1.req.md4->data_files/parse_input/server1.req.md4
- Copy data_files/server1.req.md5->data_files/parse_input/server1.req.md5
- Copy data_files/server1.req.sha1->data_files/parse_input/server1.req.sha1
- Copy data_files/server1.req.sha224->data_files/parse_input/server1.req.sha224
- Copy data_files/server1.req.sha256->data_files/parse_input/server1.req.sha256
- Copy data_files/server1.req.sha384->data_files/parse_input/server1.req.sha384
- Copy data_files/server1.req.sha512->data_files/parse_input/server1.req.sha512
- Move data_files/server1.req.commas.sha256->data_files/parse_input/server1.req.commas.sha256
- Move data_files/server5.req.sha1->data_files/parse_input/server5.req.sha1
- Move data_files/server5.req.sha224->data_files/parse_input/server5.req.sha224
- Move data_files/server5.req.sha256->data_files/parse_input/server5.req.sha256
- Move data_files/server5.req.sha384->data_files/parse_input/server5.req.sha384
- Move data_files/server5.req.sha512->data_files/parse_input/server5.req.sha512
- Move data_files/server9.req.sha1->data_files/parse_input/server9.req.sha1
- Move data_files/server9.req.sha224->data_files/parse_input/server9.req.sha224
- Move data_files/server9.req.sha256->data_files/parse_input/server9.req.sha256
- Move data_files/server9.req.sha384->data_files/parse_input/server9.req.sha384
- Move data_files/server9.req.sha512->data_files/parse_input/server9.req.sha512
- Move data_files/server1-ms.req.sha256->data_files/parse_input/server1-ms.req.sha256
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-06-01 13:30:08 +08:00
Jerry Yu
47dd840902
change path of x509_parse_san input data
...
- Move data_files/server5-othername.crt->data_files/parse_input/server5-othername.crt
- Move data_files/server5-nonprintable_othername.crt->data_files/parse_input/server5-nonprintable_othername.crt
- Copy data_files/cert_example_multi.crt->data_files/parse_input/cert_example_multi.crt
- Move data_files/multiple_san.crt->data_files/parse_input/multiple_san.crt
- Copy data_files/server4.crt->data_files/parse_input/server4.crt
- Move data_files/server5-unsupported_othername.crt->data_files/parse_input/server5-unsupported_othername.crt
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-06-01 13:30:07 +08:00
Jerry Yu
19c0478c6e
change path of x509parse_crt_file input data
...
- Move data_files/server1_pathlen_int_max.crt->data_files/parse_input/server1_pathlen_int_max.crt
- Move data_files/server1_pathlen_int_max-1.crt->data_files/parse_input/server1_pathlen_int_max-1.crt
- Copy data_files/server7_int-ca.crt->data_files/parse_input/server7_int-ca.crt
- Move data_files/server7_pem_space.crt->data_files/parse_input/server7_pem_space.crt
- Move data_files/server7_all_space.crt->data_files/parse_input/server7_all_space.crt
- Move data_files/server7_trailing_space.crt->data_files/parse_input/server7_trailing_space.crt
- Move data_files/cli-rsa-sha256-badalg.crt.der->data_files/parse_input/cli-rsa-sha256-badalg.crt.der
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-06-01 13:30:06 +08:00
Jerry Yu
e42257c660
change path of x509_cert_info input data
...
- Copy data_files/server1.crt->data_files/parse_input/server1.crt
- Move data_files/server1.crt.der->data_files/parse_input/server1.crt.der
- Copy data_files/server2.crt->data_files/parse_input/server2.crt
- Move data_files/server2.crt.der->data_files/parse_input/server2.crt.der
- Copy data_files/test-ca.crt->data_files/parse_input/test-ca.crt
- Move data_files/test-ca.crt.der->data_files/parse_input/test-ca.crt.der
- Copy data_files/cert_md2.crt->data_files/parse_input/cert_md2.crt
- Copy data_files/cert_md4.crt->data_files/parse_input/cert_md4.crt
- Copy data_files/cert_md5.crt->data_files/parse_input/cert_md5.crt
- Copy data_files/cert_sha1.crt->data_files/parse_input/cert_sha1.crt
- Copy data_files/cert_sha224.crt->data_files/parse_input/cert_sha224.crt
- Copy data_files/cert_sha256.crt->data_files/parse_input/cert_sha256.crt
- Copy data_files/cert_sha384.crt->data_files/parse_input/cert_sha384.crt
- Copy data_files/cert_sha512.crt->data_files/parse_input/cert_sha512.crt
- Copy data_files/server9.crt->data_files/parse_input/server9.crt
- Copy data_files/server9-sha224.crt->data_files/parse_input/server9-sha224.crt
- Copy data_files/server9-sha256.crt->data_files/parse_input/server9-sha256.crt
- Copy data_files/server9-sha384.crt->data_files/parse_input/server9-sha384.crt
- Copy data_files/server9-sha512.crt->data_files/parse_input/server9-sha512.crt
- Copy data_files/server5-sha1.crt->data_files/parse_input/server5-sha1.crt
- Copy data_files/server5-sha224.crt->data_files/parse_input/server5-sha224.crt
- Copy data_files/server5.crt->data_files/parse_input/server5.crt
- Copy data_files/server5-sha384.crt->data_files/parse_input/server5-sha384.crt
- Copy data_files/server5-sha512.crt->data_files/parse_input/server5-sha512.crt
- Copy data_files/server5-othername.crt->data_files/parse_input/server5-othername.crt
- Copy data_files/server5-nonprintable_othername.crt->data_files/parse_input/server5-nonprintable_othername.crt
- Move data_files/server5-fan.crt->data_files/parse_input/server5-fan.crt
- Copy data_files/server1.cert_type.crt->data_files/parse_input/server1.cert_type.crt
- Copy data_files/server1.key_usage.crt->data_files/parse_input/server1.key_usage.crt
- Copy data_files/keyUsage.decipherOnly.crt->data_files/parse_input/keyUsage.decipherOnly.crt
- Copy data_files/cert_example_multi.crt->data_files/parse_input/cert_example_multi.crt
- Copy data_files/multiple_san.crt->data_files/parse_input/multiple_san.crt
- Copy data_files/cert_example_multi_nocn.crt->data_files/parse_input/cert_example_multi_nocn.crt
- Move data_files/test-ca-any_policy.crt->data_files/parse_input/test-ca-any_policy.crt
- Move data_files/test-ca-any_policy_ec.crt->data_files/parse_input/test-ca-any_policy_ec.crt
- Move data_files/test-ca-any_policy_with_qualifier.crt->data_files/parse_input/test-ca-any_policy_with_qualifier.crt
- Move data_files/test-ca-any_policy_with_qualifier_ec.crt->data_files/parse_input/test-ca-any_policy_with_qualifier_ec.crt
- Move data_files/test-ca-multi_policy.crt->data_files/parse_input/test-ca-multi_policy.crt
- Move data_files/test-ca-multi_policy_ec.crt->data_files/parse_input/test-ca-multi_policy_ec.crt
- Move data_files/test-ca-unsupported_policy.crt->data_files/parse_input/test-ca-unsupported_policy.crt
- Move data_files/test-ca-unsupported_policy_ec.crt->data_files/parse_input/test-ca-unsupported_policy_ec.crt
- Move data_files/server1.ext_ku.crt->data_files/parse_input/server1.ext_ku.crt
- Copy data_files/server4.crt->data_files/parse_input/server4.crt
- Copy data_files/server3.crt->data_files/parse_input/server3.crt
- Move data_files/bitstring-in-dn.pem->data_files/parse_input/bitstring-in-dn.pem
- Move data_files/non-ascii-string-in-issuer.crt->data_files/parse_input/non-ascii-string-in-issuer.crt
- Move data_files/cert_v1_with_ext.crt->data_files/parse_input/cert_v1_with_ext.crt
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-06-01 13:30:06 +08:00
Jerry Yu
5d04321361
change path of mbedtls_x509_crl_info input data
...
- Copy data_files/crl_expired.pem->data_files/parse_input/crl_expired.pem
- Move data_files/crl_md2.pem->data_files/parse_input/crl_md2.pem
- Move data_files/crl_md4.pem->data_files/parse_input/crl_md4.pem
- Move data_files/crl_md5.pem->data_files/parse_input/crl_md5.pem
- Move data_files/crl_sha1.pem->data_files/parse_input/crl_sha1.pem
- Move data_files/crl_sha224.pem->data_files/parse_input/crl_sha224.pem
- Copy data_files/crl_sha256.pem->data_files/parse_input/crl_sha256.pem
- Move data_files/crl_sha384.pem->data_files/parse_input/crl_sha384.pem
- Move data_files/crl_sha512.pem->data_files/parse_input/crl_sha512.pem
- Copy data_files/crl-rsa-pss-sha1.pem->data_files/parse_input/crl-rsa-pss-sha1.pem
- Copy data_files/crl-rsa-pss-sha224.pem->data_files/parse_input/crl-rsa-pss-sha224.pem
- Copy data_files/crl-rsa-pss-sha256.pem->data_files/parse_input/crl-rsa-pss-sha256.pem
- Copy data_files/crl-rsa-pss-sha384.pem->data_files/parse_input/crl-rsa-pss-sha384.pem
- Copy data_files/crl-rsa-pss-sha512.pem->data_files/parse_input/crl-rsa-pss-sha512.pem
- Copy data_files/crl-ec-sha1.pem->data_files/parse_input/crl-ec-sha1.pem
- Move data_files/crl-ec-sha224.pem->data_files/parse_input/crl-ec-sha224.pem
- Copy data_files/crl-ec-sha256.pem->data_files/parse_input/crl-ec-sha256.pem
- Move data_files/crl-ec-sha384.pem->data_files/parse_input/crl-ec-sha384.pem
- Move data_files/crl-ec-sha512.pem->data_files/parse_input/crl-ec-sha512.pem
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-06-01 13:30:03 +08:00
Dave Rodgman
45350b6650
Merge pull request #7636 from ucko/2023b-platform-2.28
2023-05-23 18:37:44 +01:00
Manuel Pégourié-Gonnard
9ee945fd44
Merge pull request #7642 from valeriosetti/backport-fix-test-suite-debug
...
Backport: add missing USE_PSA_INIT/DONE in test_suite_debug
2023-05-23 15:08:52 +02:00
Valerio Setti
c6240f751e
test_suite_debug: add USE_PSA_INIT/DONE guards in tests
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-23 10:47:58 +02:00
Manuel Pégourié-Gonnard
c1f78a2827
Merge pull request #7635 from AndrzejKurek/fix-bad-keyfile-prereqs-2-28
...
[2.28 backport] Fix bad keyfile prereqs
2023-05-23 09:27:32 +02:00
Gilles Peskine
a4a73b8ee3
Merge pull request #7632 from davidhorstmann-arm/2.28-demo-out-of-tree
...
[Backport 2.28] Fix demo scripts for out-of-tree builds
2023-05-22 17:23:51 +02:00
Aaron M. Ucko
82e06cb7bc
mbedtls/platform.h: Avoid potential macro redefinition warnings.
...
Some identifiers (e.g. mbedtls_free) can name either functions or
macros depending on configuration settings. For those that turn out
to name macros, first clear out any existing macro definitions to
accommodate possible unconditional bulk symbol renaming. (There
remains no standard provision for such renaming, but it's nevertheless
straightforward enough to do as desired, particularly with this change
in place.)
Signed-off-by: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
2023-05-22 10:07:17 -04:00
Andrzej Kurek
8985146f03
Fix wrong makefile target
...
Missing tab and a prerequisite that's not a file
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-05-22 09:48:30 -04:00
David Horstmann
39aee1214a
Fix demo scripts for out-of-tree builds
...
Allow demo scripts to be run from the build directory for out-of-tree
builds.
If the executable is not found in the source tree then search in the
current directory in case the script is being run from a build
directory.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-05-22 12:23:59 +01:00
Dave Rodgman
247e6f088d
Merge pull request #7608 from daverodgman/pr6511-2.28
...
Fix: no newline when debug msg over DEBUG_BUF_SIZE - backport 2.28
2023-05-17 17:59:54 +01:00
Gilles Peskine
2710fe2d5e
Merge pull request #7571 from bharsaklemukesh975/update-pkparse-tests-to-use-AES-2.28
...
Backport 2.28: Updating test-ca.key to use AES instead of DES
2023-05-16 19:15:11 +02:00
Gilles Peskine
4aff7dbc89
Merge pull request #7597 from daverodgman/pr4990-2.28
...
Replace references to Mbed Crypto (rebase) - backport 2.28
2023-05-16 19:15:00 +02:00
Dave Rodgman
bd77182063
Make use of MBEDTLS_STATIC_ASSERT
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-16 16:47:09 +01:00
Dave Rodgman
001917898f
Document minimum size for DEBUG_BUF_SIZE
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-16 16:47:09 +01:00
valord577
0d87d90cea
simplify code
...
Signed-off-by: valord577 <valord577@gmail.com>
2023-05-16 16:47:09 +01:00
valord577
de6ea9847d
code style
...
Signed-off-by: valord577 <valord577@gmail.com>
2023-05-16 16:47:09 +01:00
valord577
06b0bb55e3
make code readable and change var name
...
Signed-off-by: valord577 <valord577@gmail.com>
2023-05-16 16:47:09 +01:00
valord577
e3623920cf
send debug msg if contains '\n'
...
Signed-off-by: valord577 <valord577@gmail.com>
2023-05-16 16:47:09 +01:00
Dave Rodgman
40fe1cd364
Update library/debug.c
...
Fix trailing white-space
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-16 16:47:09 +01:00
valord577
afbaac29e8
Fix: no newline when debug msg over DEBUG_BUF_SIZE
...
Signed-off-by: valord577 <valord577@gmail.com>
2023-05-16 16:47:09 +01:00
Fredrik Hesse
6f665a56d0
Minor adjustments after review.
...
Signed-off-by: Fredrik Hesse <fredrik@hesse.se>
2023-05-15 15:28:46 +01:00
Fredrik Hesse
02501f6ba1
Replace references to Mbed Crypto with Mbed TLS through-out documentation and comments.
...
Signed-off-by: Fredrik Hesse <fredrik@hesse.se>
2023-05-15 15:28:39 +01:00
Fredrik Hesse
5b673a828d
Replace references to Mbed Crypto with Mbed TLS through-out documentation and comments.
...
Signed-off-by: Fredrik Hesse <fredrik@hesse.se>
2023-05-15 15:27:54 +01:00
Paul Elliott
9febc989c7
Merge pull request #7587 from gilles-peskine-arm/gitignore-objects-at-root-2.28
...
Backport 2.28: Ignore *.o everywhere
2023-05-15 13:57:12 +01:00
Gilles Peskine
e32e447407
Ignore *.o everywhere
...
We don't commit *.o files anywhere, not even as test data. So ignore them
everywhere.
Also remove a redundant ignore of *.exe in a subdirectory.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-05-12 13:57:39 +02:00
Gilles Peskine
d47c7b104e
Fuzz programs: print an error if loading the reproducer fails
...
The fuzz programs were returning a nonzero status if they failed to load the
reproducer, but that's discreet and not informative. Make them also print an
error message.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-05-12 13:47:33 +02:00
Mukesh Bharsakle
2599a71c74
updating test-ca.key to use AES instead of DES
2023-05-10 12:12:40 +01:00
Gilles Peskine
a8b3d0c7a2
Merge pull request #7553 from davidhorstmann-arm/2.28-remove-doxygen-mainpage-content
...
[Backport 2.28] Remove API docs mainpage content
2023-05-07 20:35:31 +02:00
David Horstmann
73474ed121
Minor cosmetic changes
...
* Change "source code documentation" to "API documentation" for
precision
* Change "mbed TLS" to "Mbed TLS" following established convention
* Use title case in the title
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-05-04 15:36:23 +01:00
David Horstmann
1ef4dc9df9
Update broken link to doxygen homepage
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-05-04 15:35:10 +01:00
David Horstmann
07b1cf91e1
Remove most of the doxygen mainpage
...
Since the API docs are now published as part of the larger
documentation, it makes no sense to give an overview of Mbed TLS in the
mainpage as this is already given elsewhere.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-05-04 15:35:08 +01:00
Dave Rodgman
2e4541f96f
Merge pull request #7545 from tom-cosgrove-arm/use-mbedtls_ct_uint_if-rather-than-mbedtls_ct_cond_select_sign-2.28
...
Backport 2.28: Use mbedtls_ct_uint_if() rather than mbedtls_ct_cond_select_sign()
2023-05-04 12:23:36 +01:00
Gilles Peskine
5ead738269
Merge pull request #7503 from gilles-peskine-arm/test-argument-types-union-2.28
...
Backport 2.28: Support larger integer test arguments
2023-05-04 10:05:25 +02:00
Paul Elliott
d7570a2a3b
Merge pull request #7536 from valeriosetti/issue7480-backport
...
Backport: Fix test gap in PK write: private (opaque) -> public
2023-05-03 17:08:43 +01:00
Gilles Peskine
4ac90508f8
Fix pastapasta
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-05-03 14:53:05 +02:00
Gilles Peskine
25c9f4bb8c
typo
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-05-03 14:53:05 +02:00
Gilles Peskine
a4394d4be1
Document a known issue with testing of mbedtls_x509_crt_parse_path
...
The parse_path tests are known to fail when compiled for a 32-btt architecture
and run via qemu-user on Linux on a 64-bit host. This is due to a known
bug in Qemu: https://gitlab.com/qemu-project/qemu/-/issues/263
Document this, and add test cases to parse the files involved to confirm
that the problem is only with parse_path.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-05-03 14:53:05 +02:00
Gilles Peskine
ad72ea02b3
Improve testing of mbedtls_x509_crt_parse_file
...
Check the number of certificates found, as was done in the test of
mbedtls_x509_crt_parse_path().
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-05-03 14:53:04 +02:00
Tom Cosgrove
735d2c99e7
Backport 2.28: Use mbedtls_ct_uint_if() rather than mbedtls_ct_cond_select_sign()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-05-03 09:50:10 +01:00
Valerio Setti
0eace4128b
pk: fixing backport issues
...
Note: RSA is not supported in mbedtls-2.28 for opaque wrapping
so it was removed from test_suite_pkwrite.data.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-02 16:38:57 +02:00
Valerio Setti
974b816b3e
test: check for exact length of returned pub key
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-02 16:06:40 +02:00