Aditya Deshpande
15b6dd0fb4
Modify comments to make them more inclusive
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2023-01-30 13:46:58 +00:00
Aditya Deshpande
ea637081dd
Allow specific Box Drawing UTF characters that are used in Markdown trees in check_files.py
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2023-01-30 13:19:32 +00:00
Manuel Pégourié-Gonnard
aae61257d1
Merge pull request #6883 from valeriosetti/issue6843
...
Improve X.509 cert writing serial number management
2023-01-30 13:08:57 +01:00
David Horstmann
cf0b881803
Add docstring for new compile function.
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-01-30 09:50:59 +00:00
Dave Rodgman
4610d4b7a6
Inhibit compiler from optimising out const-time asm
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-01-30 09:26:48 +00:00
Manuel Pégourié-Gonnard
e28397a376
Merge pull request #6938 from aditya-deshpande-arm/check-names-exclusions
...
check_names.py: Compare identifiers in excluded files against symbols parsed by nm
2023-01-30 09:21:58 +01:00
David Horstmann
6fcc77cf5e
Add ChangeLog for c_build_helper improvements
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-01-27 19:53:49 +00:00
David Horstmann
ef504d96c1
Make c_build_helper module respect HOSTCC
...
If HOSTCC is set, use that to generate files, otherwise use CC. This
should make cross-compilation with generated files slightly easier.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-01-27 17:02:09 +00:00
David Horstmann
ac49ee5d4c
c_build_helper.py: Move compile to helper
...
Move compilation to a separate helper function in c_build_helper.py to
allow more generic use.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-01-27 17:02:09 +00:00
Przemek Stekiel
3022370896
Add changelog entry for V3 extensions in CSR
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-01-27 16:06:08 +01:00
Gabor Mezei
b57c908855
Shorten the prefix of the test case belongs to the fix quasi-reduction function
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-01-27 14:37:42 +01:00
Gabor Mezei
26439bf692
Revert "Add dependency for generated test cases"
...
The 'MBEDTLS_TEST_HOOKS' belongs to a test function and
not to a test case.
This reverts commit 1e8c210b9d
.
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-01-27 14:33:50 +01:00
Valerio Setti
18b9b035ad
test: add test for a full length serial of 0xFF
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-01-27 11:47:57 +01:00
Valerio Setti
a87f839113
test: improve error handling in x509_set_serial_check()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-01-27 11:29:42 +01:00
Valerio Setti
9b5e1da8f8
fixing a typo in comment
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-01-27 11:29:35 +01:00
Manuel Pégourié-Gonnard
169d9e6eb4
Merge pull request #6802 from gilles-peskine-arm/test_suite_psa_crypto_metadata-20221215
...
Add metadata tests for CCM* and TLS1.2-ECJPAKE-to-PMS
2023-01-27 10:05:00 +01:00
Przemek Stekiel
59f4a18b6f
Fix test dependency SHA1 -> SHA256
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-01-27 07:14:14 +01:00
Przemek Stekiel
36ad5e7ab5
Fix code style
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-01-26 22:30:45 +01:00
Gilles Peskine
b82977a429
Merge pull request #6962 from davidhorstmann-arm/fix-check-python-errors
...
Fix check python errors
2023-01-26 21:54:25 +01:00
Gilles Peskine
81505e4a16
Merge pull request #6917 from yanrayw/6658-not-print-Terminated-ubuntu-22.04
...
Fix the problem of printing "Terminated" in compat.sh under Ubuntu-22.04
2023-01-26 21:53:33 +01:00
Gilles Peskine
b20028b3a3
Avoid using external programs in inner loops
...
Don't use external programs for string manipulation that the shell can do.
This makes the script a little faster (~10% when testing PSK).
For this commit, I only looked at code run in the innermost loop.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-01-26 21:45:45 +01:00
Gilles Peskine
47aab850da
Batch cipher translations to go faster
...
Python has a high startup cost, so go back to invoking it only once per
server start, rather than once per client start. This is a measurable
performance improvement (running time ~*0.5 with PSK, less dramatic with
asymmetric crypto).
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-01-26 21:45:45 +01:00
Gilles Peskine
292cd6f4e5
Don't use the cipher suite in check_openssl_server_bug
...
We can detect PSK based on $TYPE. This allows more flexibility in how cipher
suites are spelled.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-01-26 21:44:26 +01:00
Valerio Setti
af4815c6a4
x509: replace/fix name of new function for setting serial
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-01-26 17:43:09 +01:00
Valerio Setti
fa49a8ecdb
test: fix complementary domain testing for !MBEDTLS_ECP_C
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-01-26 17:16:38 +01:00
Gabor Mezei
1e8c210b9d
Add dependency for generated test cases
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-01-26 12:30:01 +01:00
Janos Follath
803638c023
Merge pull request #6939 from minosgalanakis/bignum/6027_hardcode_montgomery_moduli
...
Bignum: hardcode montgomery moduli
2023-01-25 16:51:11 +00:00
Przemek Stekiel
32e20919ac
Remove redundant check and add comment to inform about processing of empty extensions
...
Netscape Certificate Management System Administrator's Guide: Extension-Specific Policy Modules, Chapter 18: Extension-Specific Policy Modules, Netscape Certificate Type Extension Policy:
> The extension has no default value.
A bitstring with no flags set is still technically valid, as it will mean that the certificate has no designated purpose at the time of creation.
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-01-25 16:20:25 +01:00
Przemek Stekiel
d7992df529
Use input files to parse CSR instead of bytes
...
Additionally fix the generation of test_csr_v3_all_malformed_extension_ns_cert_bitstream_tag.csr.der which was incorectly malformed.
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-01-25 16:19:50 +01:00
Valerio Setti
de7bb5b361
test: add failing check for secp224r1 with compressed format
...
The test is expected to fail, so we verify that this is really
not suppported
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-01-25 14:02:03 +01:00
Gabor Mezei
9a66ab180c
Fix missing declarration
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-01-25 13:23:38 +01:00
David Horstmann
04bdbe3ee0
Remove unnecessary '\' linebreak characters
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-01-25 11:39:04 +00:00
Valerio Setti
9cb0f7a423
test: driver-only: fix disparities in random
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-01-25 11:49:11 +01:00
Valerio Setti
3002c99247
test: extend analyze_outcomes.py in order to skip only some test in a suite
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-01-25 11:49:00 +01:00
Valerio Setti
7e57920511
test: driver-only: fix disparities in psa_crypto_se_driver_hal
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-01-25 11:30:46 +01:00
Valerio Setti
4682948c1e
test: driver-only: fix disparities in ECP
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-01-25 11:30:31 +01:00
Przemek Stekiel
94e21e153f
Skip unsupported extensions
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-01-25 11:08:32 +01:00
Przemek Stekiel
92cce3fe6d
Use extension .csr.der to indicate format
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-01-25 10:33:26 +01:00
Przemek Stekiel
f0e25c72d9
Add missing dependencies for negative tests, remove PEM dependency
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-01-25 09:38:01 +01:00
Gilles Peskine
8296eabed6
Merge pull request #6957 from tom-cosgrove-arm/fix-spelling-of-doxygen-return
...
Fix doxygen return parameter spelling
2023-01-24 21:56:45 +01:00
Gilles Peskine
3b8623fe2c
Merge pull request #6903 from Mihir-Raj-Singh/Bignum_rename_mtoN
...
Rename modulus input argument from m to N
2023-01-24 21:48:54 +01:00
David Horstmann
79f14e3990
Give proper Dict type hints in crypto_knowledge.py
...
This prevents a return type error in a later function that uses the
dictionaries here properly typed.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-01-24 18:59:07 +00:00
David Horstmann
f0c75796be
Fix a missing type hint warning
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-01-24 18:53:15 +00:00
David Horstmann
6b3ce309ad
Don't wrap stdout and stderr in UTF-8 wrapper
...
This is no longer needed as we only print ASCII text directly
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-01-24 18:40:34 +00:00
David Horstmann
ce42cc24d1
Output diff without capturing it
...
Instead of capturing the output of diff and printing it, let diff do its
own outputting and se the return code to decide what to do.
This also means that the conversion of stdout to UTF-8 is not necessary,
as the reason it was needed was for printing diffs of files with UTF-8
characters in them.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-01-24 18:19:42 +00:00
Gabor Mezei
627e5b1f91
Only enable fix_quasi_reduction when testing
...
Avoid compiler error due to the fix_quasi_reduction function
is static and has not been used.
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-01-24 18:13:24 +01:00
Gabor Mezei
246d66bb5f
Use reproductable random numbers
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-01-24 18:02:52 +01:00
David Horstmann
089d0d08a0
Add basic output on success
...
Whilst it is true that "silence is golden", no output at all could be
disconcerting and it makes searching in a CI log more difficult.
Add a simple status message that says "Checked N files, style ok".
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-01-24 16:56:18 +00:00
Gabor Mezei
6f96c89fc3
Fix pylint issues
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-01-24 17:38:26 +01:00
David Horstmann
c9f90aaf5a
Remove overly verbose output on success
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-01-24 16:00:01 +00:00