42f8d5f0c9
Merge pull request #8261 from Mbed-TLS/fix-cmake-header-include
...
Add CMake include path for generated header
2023-09-28 15:16:15 +00:00
f07ce3b8ff
Don't extend support for deprecated functions
...
Restore guards from the previous release, instead of the new, more
permissive guards.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-09-28 08:51:51 +02:00
0fc86b2ddf
Merge pull request #8075 from valeriosetti/issue8016
...
driver-only ECC: curve acceleration macros
2023-09-27 14:39:02 +00:00
b7b4f23c38
Add CMake include path for generated header
...
Now that we are generating psa_crypto_driver_wrappers.h, we need to pass
build/library as an include directory.
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2023-09-27 14:05:32 +01:00
e9dc63e069
No need to include the 3rd party entry point head file
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:20 +00:00
b909aeafa3
Remove useless spaces in Makefile
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:20 +00:00
0e5b53c7e4
Move the dependency adjacent to the generated file
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:20 +00:00
1b61d6e13f
Change include guards of psa_crypto_driver_wrappers_no_static.h
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:20 +00:00
845693c513
Change comments to psa_crypto_driver_wrappers.h
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:20 +00:00
fe9666b8c0
Change the extension type of the file psa_crypto_driver_wrapper
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:20 +00:00
54a4fdfe91
Automaticly generate psa_crypto_driver_wrappers_no_static.c
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:20 +00:00
97d1ccb781
Dont't generate object file for file only include static functions
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:20 +00:00
42266dd670
Revert the Makefile to remove the dependency of generate_files
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:20 +00:00
9345b2e98f
Move functions out of the static file
...
Move get_key_buf_size/get_builtin_key out of
the psa wrapper auto generated file
Slot_management.c include the head file instead of the source file
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:20 +00:00
cad99fa998
Change code style
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:20 +00:00
e9c39c42fd
Enable build of non-static psa wrapper functions
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:20 +00:00
e518eeada9
Move function psa_driver_wrapper_export_public_key out of auto-generated
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:20 +00:00
5db65c72ec
Remove static inline functions declare and make it only in c file
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:06 +00:00
077ffc0991
Ensure build of P256 pass
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:06 +00:00
b862031afa
Remove useless declaration
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:06 +00:00
7046468a02
Define the psa wrapper functions as static inline
...
This is a commit from Thomas Daubney.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com >
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-09-26 09:09:06 +00:00
c437faeaa1
psa_crypto: fix guards in mbedtls_ecc_group_to_psa()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-09-25 17:39:41 +02:00
db6b4db7a0
Renaming all MBEDTLS_HAVE for curves to MBEDTLS_ECP_HAVE
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-09-25 17:39:41 +02:00
cf29c5d9d5
ssl: don't require MBEDTLS_ECP_DP with TLS1.3
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-09-25 17:39:41 +02:00
6d809cc969
lib/test: use new internal helpers in library's code and tests
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-09-25 17:39:41 +02:00
f250ada3ab
tls/oid: add PSA_WANT_ECC_xxx guards together with existing MBEDTLS_ECP_DP_xxx
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-09-25 17:39:40 +02:00
21087754a5
x509_crt: Removed unused intsafe.h
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com >
2023-09-25 15:17:38 +01:00
a9bb34cd73
x509_crt: Removed length_as_int intermediate variable
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com >
2023-09-25 14:42:41 +01:00
59108d3f4d
x509_crt: Adjusted the len of lpMultiByteStr arg in WideCharToMultiByte
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com >
2023-09-25 14:12:23 +01:00
08a67ccefd
x509_crt: Set WideCharToMultiByte to use -1 for length.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com >
WideCharToMultiByte
2023-09-25 14:12:23 +01:00
40995e1390
x509_crt: Removed checks for windows versions < WINXP
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com >
2023-09-25 14:12:22 +01:00
fac45fbafe
entropy_poll: Removed checks for windows versions < WINXP
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com >
2023-09-25 14:12:22 +01:00
e8a5d1afbd
entropy_poll: Updated documentation for entropy_poll loop.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com >
2023-09-25 14:12:22 +01:00
2c6e561ff8
entropy_poll.c: Added looping logic to mbedtls_platform_entropy_poll()
.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com >
2023-09-25 14:12:22 +01:00
4952f705ee
Removed unsupported Visual Studio related code in entropy_poll.c and x509_crt.c.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com >
2023-09-25 14:12:22 +01:00
12b493f4dc
entropy_poll/x509_crt: Added MBEDTLS_POP_TARGET_PRAGMA define guards.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com >
2023-09-25 14:12:21 +01:00
24a1c16fac
library Makefile: Moved -lbcrypt to LOCAL_LDFLAGS
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com >
2023-09-25 14:12:21 +01:00
a277b210ff
Code style fixes
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com >
2023-09-25 14:12:21 +01:00
de573f56e5
Fix coding style of length_as_int var in x509_crt.c
...
Variable had the very Windows name of lengthAsInt, which is fine for C# but
doesn't match the Mbed TLS coding standards.
Signed-off-by: Simon Butcher <simon.butcher@arm.com >
2023-09-25 14:12:21 +01:00
35e5dad865
Add clarifying comment on use of MultiByteToWideChar() and CP_ACP
...
Signed-off-by: Simon Butcher <simon.butcher@arm.com >
2023-09-25 14:12:21 +01:00
def90f4966
Fix formatting and detail of comments in PR #730
...
Signed-off-by: Simon Butcher <simon.butcher@arm.com >
2023-09-25 14:12:20 +01:00
e068aa7ad5
Fix the build for mingw and CMake + VStudio
...
Changes to the build to add the new Win32 Crypto API's inadvertently broke
the build for mingw and Visual Studio builds when generated by CMake.
Signed-off-by: Simon Butcher <simon.butcher@arm.com >
2023-09-25 14:12:20 +01:00
0ec1e68548
Replace Windows APIs that are banned in Windows Store apps
...
CryptGenRandom and lstrlenW are not permitted in Windows Store apps,
meaning apps that use mbedTLS can't ship in the Windows Store.
Instead, use BCryptGenRandom and wcslen, respectively, which are
permitted.
Also make sure conversions between size_t, ULONG, and int are
always done safely; on a 64-bit platform, these types are different
sizes.
Also suppress macro redefinition warning for intsafe.h:
Visual Studio 2010 and earlier generates C4005 when including both
<intsafe.h> and <stdint.h> because a number of <TYPE>_MAX constants
are redefined. This is fixed in later versions of Visual Studio.
The constants are guaranteed to be the same between both files,
however, so we can safely suppress the warning when including
intsafe.h.
Signed-off-by: Kevin Kane <kkane@microsoft.com >
2023-09-25 14:12:20 +01:00
5a3add2c67
Merge pull request #8234 from kouzhudong/development
...
Fix MSVC error C4703 about possibly uninitialized variable in pkwrite.c
2023-09-25 10:51:46 +01:00
6809f231a6
Merge pull request #8210 from yanrayw/aes_128bit_improvement
...
AES 128bit only: add guards in cipher_wrap.c
2023-09-22 18:15:03 +00:00
4f53520f54
Merge pull request #8241 from daverodgman/cast_warning
...
fix cast warning
2023-09-22 14:23:05 +00:00
38c3228f3e
fix cast warning
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-09-22 10:51:37 +01:00
41434d043c
Merge pull request #8237 from tom-cosgrove-arm/mbedtls_pk_write_key_der-unused-len-and-unreachable-ret
...
Remove unused variable and unreachable return from mbedtls_pk_write_key_der()
2023-09-22 08:45:48 +00:00
aaebc9be51
Merge pull request #8235 from daverodgman/misc-size
2023-09-21 18:42:37 +01:00
8d276fbc23
Remove unused variable and unreachable return from mbedtls_pk_write_key_der()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2023-09-21 17:19:36 +01:00