bac6d9a703
Add key management utilities to p256-m
...
Those will be needed in order for the driver to implement all the PSA
key management entry points (currently only implements key generation).
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-09-12 09:50:14 +02:00
9b9ac4c6ef
Merge pull request #8175 from ronald-cron-arm/fix-query-config-generation-with-cmake
...
Fix query_config.c generation with CMake build system
2023-09-12 06:03:01 +00:00
ad2f351c6b
Merge pull request #8171 from ronald-cron-arm/misc-minor-fixes
...
One minor fix
2023-09-12 06:00:48 +00:00
4f26770291
Ensure mbedtls_ct_memcpy behaves correctly with 16-bit int
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-11 19:10:09 +01:00
140d5c77d0
Add single-bit difference tests
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-11 19:10:05 +01:00
dc669a1944
Fix type error
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-11 18:39:57 +01:00
5265c318a0
Fix type-conversion error
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-11 18:04:13 +01:00
49352832c9
Eliminate duplicate of mbedtls_asn1_find_named_data
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-11 17:10:43 +01:00
33287ae134
Tidy up mbedtls_asn1_write_len
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-11 17:10:43 +01:00
cf5f746a8c
Refactor out some common code
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-11 16:27:34 +01:00
7fda906a68
Merge pull request #8161 from gilles-peskine-arm/config-boolean-options-wrong-section-202309
...
Fix module configuration options in mbedtls_config.h
2023-09-11 15:08:56 +00:00
3bbedf6ba0
code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-11 16:06:28 +01:00
9f366b07ea
Reduce code size in mbedtls_asn1_write_len
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-11 16:00:03 +01:00
82fe0828b2
Merge pull request #8180 from daverodgman/sha2-zeroize
...
Ensure all md_<hash>_finish functions perform zeroization
2023-09-11 15:13:27 +01:00
aafd1e0924
Ensure all md_<hash>_finish functions perform zeroization
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-11 12:59:36 +01:00
ce1bb3d1da
Merge pull request #8178 from tom-cosgrove-arm/remove-tautological-null-pointer-check-sha3_c
...
Remove always-false null pointer check in sha3.c that Coverity complains about
2023-09-11 10:54:36 +00:00
876346e451
Remove always-false null pointer check in sha3.c that Coverity complains about
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2023-09-11 09:03:01 +01:00
bc7716cddc
all.sh: run make clean before make lib in armc6_build_test
...
We should run make clean before we build libraries in armc6_build_test.
On the one hand, this makes sure we do have a clean build directory
initially. On the other hand, we can do extra actions after building
the library with armc6_build_test.
Signed-off-by: Yanray Wang <yanray.wang@arm.com >
2023-09-11 10:11:09 +08:00
ef1b04db94
all.sh: make sure CIPHER_ENCRYPT_ONLY is enabled in tests
...
grep corresponding mbedtls_xxx_setkey_dec and mbedtls_xxx_decrypt
symbols in cipher_only tests to make sure CIPHER_ENCRYPT_ONLY is
enabled as expected.
Signed-off-by: Yanray Wang <yanray.wang@arm.com >
2023-09-11 10:11:09 +08:00
3caaf0c61e
Enable CIPHER_ENCRYPT_ONLY when DES is disabled
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com >
2023-09-11 10:10:44 +08:00
ecc99611e4
Reinforce warning about a significant comment
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-09-09 22:54:26 +02:00
1bfc09bca7
Move comment to its intended location
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-09-09 21:26:05 +02:00
eeed74e697
Fix prepare_release.sh -u
with CMakeLists.txt
...
We want to keep GEN_FILES defaulting off on Windows.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-09-09 21:00:30 +02:00
3f8e483eed
Mark y as modified in x86 asm for mbedtls_ct_uint_lt
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-08 17:57:40 +01:00
4a97e73661
Eliminate a redundant not from x86 asm
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-08 17:26:18 +01:00
b6b8f6c68d
Make variable name consistent in x86_64 asm
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-08 17:19:32 +01:00
5f249852a5
Better register allocation for x86_64 asm
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-08 17:18:29 +01:00
99f0cdc0e0
Remove not-needed mov in x86_64 asm
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-08 17:18:04 +01:00
e1cb35b719
Add new mbedtls_pkcs12_pbe_ext function to replace old function
...
Add new mbedtls_pkcs12_pbe_ext function to replace
old mbedtls_pkcs12_pbe function that have security
issues.
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2023-09-08 16:51:26 +01:00
473f6363f1
In releases, turn off GEN_FILES in Makefile and CMakeLists.txt
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-09-08 16:56:58 +02:00
dea4c7e09f
Prepare to generalize the script to do more than .gitignore
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-09-08 16:34:01 +02:00
0b62b7a21f
Allow turning off re-generation of files with make
...
In make builds, when GEN_FILES is false (empty), don't try to re-generate
configuration-independent source files, regardless of whether they seem
out of date. This is useful, for example, if you have a source tree where
`make generated_files` has already run and file timestamps reflect the
time the files were copied or extracted, and you are now in an environment
that lacks some of the necessary tools to re-generate the files.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-09-08 16:19:13 +02:00
31d49cd57f
Merge pull request #1053 from waleed-elmelegy-arm/Improve-and-test-mbedtls_pkcs12_pbe
...
Improve & test legacy mbedtls_pkcs12_pbe
2023-09-08 13:08:05 +02:00
706a1c3c3f
Fix code style
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-09-08 12:04:41 +01:00
c34804dea2
Fix bug with checking max dn length with hexpairs
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-09-08 11:32:19 +01:00
d34c4262da
Move conditionals to keep doxygen with function
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-09-08 11:09:50 +01:00
26923c7e49
Add missing hyphen
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-08 10:45:34 +01:00
241a80b717
Improve changelog
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-08 10:21:18 +01:00
3fc3ae708e
wip
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-08 10:21:18 +01:00
d441a14f38
Add reference to x86 asm
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-08 10:21:18 +01:00
cd1de6350e
Changelog
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-08 10:21:18 +01:00
d7a983a0d8
Fix generate_query_config.pl usage
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-09-08 10:53:35 +02:00
eab2055bde
Fix query_config.c generation with CMake build system
...
In case of an out-of-tree build with the CMake build
system the path to crypto_config.h has to be defined
as the path to mbedtls_config.h. Add this possibility
tp generate_query_config.pl.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-09-08 10:23:25 +02:00
33fbd373be
Merge pull request #8174 from Mbed-TLS/fix-pkwrite-test-dependencies
...
Fix incorrect dependencies in pkwrite tests
2023-09-08 08:16:52 +02:00
1f59ee078f
Add correct dependencies to pkcs12 tests
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2023-09-07 17:59:35 +01:00
096017023d
Fix identation error in pkcs12 tests
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2023-09-07 17:48:40 +01:00
8ece2e9712
Fix incorrect test dependencies in pkwrite tests
...
These should rely in MBEDTLS_PEM_{PARSE,WRITE}_C where applicable, not
MBEDTLS_BASE64_C.
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2023-09-07 17:43:12 +01:00
75b9eb36b4
Change pkcs12 test comparison macro to the new macro
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2023-09-07 17:02:37 +01:00
86733834bc
Modernize documentation of MBEDTLS_PLATFORM_ZEROIZE_ALT
...
The documentation was not updated when we started detecting memset_s() and
such.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-09-07 17:29:15 +02:00
8317e91b1e
Change pkcs12 test allocation macros to the new macros
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2023-09-07 15:46:58 +01:00