TRodziewicz
1fbdb25d60
error.c re-generated
...
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-04-21 12:24:59 +02:00
TRodziewicz
33946bbf16
Two platform error codes moved to error.h to fix _without_platform test
...
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-04-21 12:06:23 +02:00
TRodziewicz
2333e6302d
Revert 2 files conflicting after previous push in the Github.
...
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-04-16 14:32:22 +02:00
TRodziewicz
29fd277f36
New line added at the end of the Changelog file.
...
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-04-13 18:13:02 +02:00
TRodziewicz
53423c097e
Changelog added
...
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-04-13 16:27:43 +02:00
TRodziewicz
e148b6884c
error.c re-generated.
...
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-04-13 15:00:30 +02:00
TRodziewicz
b579ccd529
The still used deprecated error codes replaced with _PLATFORM_ ones
...
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-04-13 14:29:29 +02:00
TRodziewicz
bca65e4ffd
Merge branch 'remove_depr_error_codes' of https://github.com/TRodziewicz/mbedtls into remove_depr_error_codes
...
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-04-12 23:44:36 +02:00
TRodziewicz
d11ddc54b6
Correction in the TODO issue number
...
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-04-12 23:41:46 +02:00
Tomasz Rodziewicz
c258a0fa65
Update md.h
2021-04-12 23:39:44 +02:00
TRodziewicz
dd82502b56
Remove deprecated error codes. Some still remain - question asked in issue comment
...
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-04-12 23:28:23 +02:00
Dave Rodgman
e483a77c85
Merge pull request #816 from ARMmbed/development
...
Merge recent commits from development into 2.26.0-rc
2021-03-12 16:55:26 +00:00
Ronald Cron
6a69ac4453
Merge pull request #4220 from bensze01/psa_aead_update_output_size
...
Fix revert of PSA_AEAD_UPDATE_OUTPUT_SIZE
2021-03-12 09:17:38 +01:00
Bence Szépkúti
437035bfe3
Fix revert of PSA_AEAD_UPDATE_OUTPUT_SIZE
...
Both the original change, and its incomplete revert were introduced in
#3386 .
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2021-03-11 17:58:26 +01:00
Ronald Cron
fc86f3f147
Merge pull request #3386 from gabor-mezei-arm/3268_update_macros_for_ouput_buffer_size
...
Add new support macros for output buffer sizes since PSA API 1.0 beta 3
2021-03-11 13:30:42 +01:00
Ronald Cron
5d5fa8b788
Merge pull request #3579 from paul-elliott-arm/fix_printf
...
Fixes for invalid printf format specifiers
2021-03-11 13:06:58 +01:00
gabor-mezei-arm
5699101ac9
Update PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE
...
Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
2021-03-11 11:55:03 +01:00
Paul Elliott
b744990717
Fix missed size_t printf
...
Code was missed due to rework moving duplicated code into a function
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 18:17:12 +00:00
Paul Elliott
9907e2c334
Improve wording of ChangeLog entry
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:14:10 +00:00
Paul Elliott
aa5e132df7
Improve include guards for format attribute
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
Paul Elliott
61d2209e42
Fix missed invalid specifier in PSA Crypto build
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
Paul Elliott
48438c758a
Fix incorrect long long specifier for win64
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
Paul Elliott
d48d5c6615
Fix size_t and longlong specifiers for MinGW
...
MinGW and older windows compilers cannot cope with %zu or %lld (there is
a workaround for MinGW, but it involves linking more code, there is no
workaround for Windows compilers prior to 2013). Attempt to work around
this by defining printf specifiers for size_t per platform for the
compilers that cannot use the C99 specifiers.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
Paul Elliott
3949065aef
Fix incorrect case in changelog entry
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
Paul Elliott
abb3af7826
Invert gate on printf attribute
...
Inverted the logic without thinking.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
Paul Elliott
3891caf1ce
Misc review requested fixes
...
Style fixes and cast certain defines to size_t
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
Paul Elliott
21c62a2aed
Raise level of -Wformat-truncation to 2
...
This was not possible earlier due to warnings, however now this seems to
be ok.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
Paul Elliott
3a5a107fa7
Correct fix for potential truncation
...
This was a false positive caused by the compiler seeing the %08lx
specifiers and judging the output on that, rather than the numbers being
fed in. Given these are going to be maximum 32 bit numbers, then better
to use %08x, which keeps -Wformat-truncation=2 happy as well.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
Paul Elliott
f8d733e49a
Correct include guard for function __attribute
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
Paul Elliott
9e3256aead
Adding printf format warning flags to makefiles
...
Add printf format warning flags that are supported by GCC 3.0 or later
to the makefiles
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
Paul Elliott
6f21e11265
Add Changelog entry
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
Paul Elliott
9f35211774
Fixes for invalid printf format specifiers
...
Fixes for printf format specifiers, where they have been flagged as
invalid sizes by coverity, and new build flags to enable catching these
errors when building using CMake. Note that this patch uses %zu, which
requires C99 or later.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
Paul Elliott
dd9e8f6dd0
Fix potential buffer overflow in printf
...
Printf could potentially produce 2 64 bit numbers here when there is
only space for one, thus causing a buffer overflow. This was caught by
the new warning flags.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
Paul Elliott
4e589701d8
Declare mbedtls_debug_print_msg as printf-like
...
We were not getting any warnings on printf format errors, as we do not
explicitly use printf anywhere in the code. Thankfully there is a way
to mark a function as having printf behaviour so that its inputs can be
checked in the same way as printf would be.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
Paul Elliott
ea32d55623
Add printf warning flags to CMake Build
...
Add extra printf warning flags into the cmake build, only adding those
that are supported by each version of the compiler
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-10 17:00:32 +00:00
gabor-mezei-arm
9c3b5077e6
Update PSA_CIPHER_ENCRYPT_OUTPUT_SIZE
...
Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
2021-03-10 15:57:44 +01:00
Manuel Pégourié-Gonnard
17605f072b
Merge pull request #4151 from ronald-cron-arm/psa-sign_verify-hash
...
PSA sign and verify hash rework
2021-03-10 10:08:50 +01:00
Dave Rodgman
1c4e78421e
Merge pull request #815 from ARMmbed/mbedtls-2.26.0-rc0-pr
...
Mbedtls 2.26.0 rc0 pr
2021-03-09 18:03:32 +00:00
paul-elliott-arm
0135516d55
Merge pull request #4203 from paul-elliott-arm/memsan_fix_build
...
Fix memsan build with Clang 11
2021-03-09 16:31:31 +00:00
Dave Rodgman
bfe754947c
Bump version to 2.26.0
...
Executed ./scripts/bump_version.sh --version 2.26.0
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-03-09 16:09:18 +00:00
Dave Rodgman
74755e484c
Update Changelog for 2.26.0
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-03-08 18:35:44 +00:00
Dave Rodgman
b4fe1053e4
Add missing changelog entry
...
Add missing changelog entry for 3698: Mark basic constraints critical
as appropriate.
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-03-08 18:34:24 +00:00
Dave Rodgman
2d83ac100d
Add a missing changelog entry
...
Add a missing changelog entry for #3996 : Allow loading external wrapped
keys.
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-03-08 18:34:16 +00:00
Dave Rodgman
5cce6a24d0
Merge branch 'development-restricted' into mbedtls-2.26.0-rc
2021-03-08 17:01:24 +00:00
Gilles Peskine
e252868be4
Merge pull request #4067 from stevew817/feature/allow_multilength_aead
...
Add support for key policies (MAC & AEAD)
2021-03-08 15:04:17 +01:00
Steven Cooreman
1fb691aea9
Remove superfluous check
...
mac size is previously checked to not be less than 4, so it can't be zero
anymore at this point.
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-08 14:00:34 +01:00
Steven Cooreman
cd64093222
Language & code readability updates
...
No functional/behavioral changes in this commit
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-08 14:00:29 +01:00
gabor-mezei-arm
286a36e17d
Fix size macros
...
Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
2021-03-05 15:59:57 +01:00
Paul Elliott
fb91a48616
Fix memsan build with clang 11
...
Memsan build was reporting a false positive use of uninitialised memory
in x509_crt.c on a struct filled by an _stat function call. According to
the man pages, the element reported has to be filled in by the call, so
to be safe, and keep memsan happy, zero the struct first.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-05 14:24:03 +00:00
Janos Follath
477a463684
Merge pull request #4168 from stevew817/fix/unreferenced_function_in_ecp_c
...
Remove unreferenced static functions when ECP_NO_FALLBACK is used
2021-03-05 08:51:13 +00:00