Dave Rodgman
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
Dave Rodgman
33287ae134
Tidy up mbedtls_asn1_write_len
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-11 17:10:43 +01:00
Dave Rodgman
cf5f746a8c
Refactor out some common code
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-11 16:27:34 +01:00
Dave Rodgman
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
Dave Rodgman
3bbedf6ba0
code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-11 16:06:28 +01:00
Dave Rodgman
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
Dave Rodgman
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
Dave Rodgman
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
Paul Elliott
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
Tom Cosgrove
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
Gilles Peskine
ecc99611e4
Reinforce warning about a significant comment
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-09 22:54:26 +02:00
Gilles Peskine
1bfc09bca7
Move comment to its intended location
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-09 21:26:05 +02:00
Gilles Peskine
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
Dave Rodgman
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
Dave Rodgman
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
Dave Rodgman
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
Dave Rodgman
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
Dave Rodgman
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
Waleed Elmelegy
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
Gilles Peskine
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
Gilles Peskine
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
Gilles Peskine
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
Gilles Peskine
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
Agathiyan Bragadeesh
706a1c3c3f
Fix code style
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
2023-09-08 12:04:41 +01:00
Agathiyan Bragadeesh
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
Agathiyan Bragadeesh
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
Dave Rodgman
26923c7e49
Add missing hyphen
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-08 10:45:34 +01:00
Dave Rodgman
241a80b717
Improve changelog
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-08 10:21:18 +01:00
Dave Rodgman
3fc3ae708e
wip
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-08 10:21:18 +01:00
Dave Rodgman
d441a14f38
Add reference to x86 asm
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-08 10:21:18 +01:00
Dave Rodgman
cd1de6350e
Changelog
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-08 10:21:18 +01:00
Ronald Cron
d7a983a0d8
Fix generate_query_config.pl usage
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-09-08 10:53:35 +02:00
Ronald Cron
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
Ronald Cron
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
Waleed Elmelegy
1f59ee078f
Add correct dependencies to pkcs12 tests
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2023-09-07 17:59:35 +01:00
Waleed Elmelegy
096017023d
Fix identation error in pkcs12 tests
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2023-09-07 17:48:40 +01:00
David Horstmann
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
Waleed Elmelegy
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
Gilles Peskine
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
Waleed Elmelegy
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
Ronald Cron
d3d566f1d8
PSA config: Add comment about HKDF
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-09-07 15:25:53 +02:00
Ronald Cron
b9c7953442
pkwrite: Fix defined but not used warning
...
Fix defined but not used warning when
MBEDTLS_USE_PSA_CRYPTO, MBEDTLS_PK_HAVE_RFC8410_CURVES
and MBEDTLS_PK_HAVE_ECC_KEYS are defined but not
MBEDTLS_PEM_WRITE_C.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-09-07 14:20:49 +02:00
Gilles Peskine
8cae2c2eb5
Use the zeroize function from Mbed TLS
...
Keep using the upstream name, to minimize the differences with the upstream code.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-06 19:42:35 +02:00
Gilles Peskine
58590983c5
Merge pull request #8160 from daverodgman/warn-unreachable
...
Fix clang warnings about unreachable code
2023-09-06 09:47:03 +00:00
Gilles Peskine
d1ce030de2
Merge pull request #8159 from gilles-peskine-arm/split-config_psa-split
...
Split out configuration adjustments from build_info.h and config_psa.h
2023-09-06 09:04:19 +00:00
Dave Rodgman
85061b97b5
Improve sanity checking of MBEDTLS_HAVE_INTxx
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-06 08:41:05 +01:00
Dave Rodgman
b7b8c09c81
Update bignum_core.c
...
Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-05 20:35:19 +01:00
Gilles Peskine
f9e4caf388
Comment out default definition
...
This is not required (it's ok to define the default in mbedtls_config and
skip the definition in rsa.h), but comment it out for uniformity with all
the other options in this section.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-05 21:11:27 +02:00
Gilles Peskine
ff2558a470
Fix unused variable in some TLS 1.3 builds
...
Fix unused variable when MBEDTLS_SSL_PROTO_TLS1_3 and
MBEDTLS_SSL_SESSION_TICKETS are enabled but not MBEDTLS_DEBUG_C.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-05 21:10:39 +02:00
Gilles Peskine
d65ea42262
Fix some TLS 1.3 settings that were required in mbedtls_config.h
...
Mbed TLS can be configured by writing a configuration file from scratch,
without copying mbedtls_config.h. As a consequence, all the macro
definitions in mbedtls_config.h must be optional. This was not the case for
some MBEDTLS_SSL_TLS1_3_xxx macros with numerical values related to session
tickets. Fix that.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-05 21:10:35 +02:00