Valerio Setti
d6b473adcd
config_psa: add internal helper to signal that some curve is builtin
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-09-25 17:39:40 +02:00
Valerio Setti
87076abbfb
config_psa: ensure PSA_WANT_ECC is enabled for each MBEDTLS_ECP_DP
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-09-25 17:39:40 +02:00
Valerio Setti
8ec212098e
check_config: fix comment
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-09-25 17:39:40 +02:00
Valerio Setti
8600de818c
check_config: perform checks only when config_psa.h is evaluated
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-09-25 17:39:40 +02:00
Valerio Setti
3b69e3ed12
check_config: skip check on SECP224K1 because the PSA is never enabled
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-09-25 17:39:40 +02:00
Valerio Setti
a7a18313a6
check_config: verify that each ECP_DP has the corresponding PSA_WANT_ECC
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-09-25 17:39:40 +02:00
Gilles Peskine
ffe590d197
Merge pull request #1058 from waleed-elmelegy-arm/check-set_padding-is-called
...
Check set_padding has been called in mbedtls_cipher_finish
2023-09-25 17:12:36 +02:00
Minos Galanakis
21087754a5
x509_crt: Removed unused intsafe.h
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-09-25 15:17:38 +01:00
Gilles Peskine
ca1e605b9c
Merge remote-tracking branch 'upstream-public/development' into development-restricted-merge-20230925
...
Conflicts:
* `include/mbedtls/build_info.h`: a new fragment to auto-enable
`MBEDTLS_CIPHER_PADDING_PKCS7` was added in
c9f4040f7f
in `development-restricted`.
In `development`, this section of the file has moved to
`include/mbedtls/config_adjust_legacy_crypto.h`.
* `library/bignum.c`: function name change in `development-restricted` vs
comment change in development. The comment change in `development` is not
really relevant, so just take the line from `development-restricted`.
2023-09-25 16:16:26 +02:00
Minos Galanakis
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
Minos Galanakis
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
Minos Galanakis
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
Minos Galanakis
b17410d975
vs2013 templates: Set bcrypt to be the sole dependency.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-09-25 14:12:22 +01:00
Minos Galanakis
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
Minos Galanakis
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
Minos Galanakis
c91d847e0d
ChangeLog: Adjusted the updated_windows_apis log
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-09-25 14:12:22 +01:00
Minos Galanakis
a8b02ef79b
pkey-random: Removed setting mbedtls_target in libs
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-09-25 14:12:22 +01:00
Minos Galanakis
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
Minos Galanakis
7f8e8c5ae2
program-random: Updated Cmake libs variable
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-09-25 14:12:22 +01:00
Minos Galanakis
ce33e7b22d
pkey Cmakelists: Updated the set libs to be consistent with others.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-09-25 14:12:22 +01:00
Minos Galanakis
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
Minos Galanakis
7afebccf69
ChangeLog.d: Added mininum required Windows version.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-09-25 14:12:22 +01:00
Minos Galanakis
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
Minos Galanakis
e960365957
ChangeLog.d: Reworded updated_windows_apis.txt.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-09-25 14:12:22 +01:00
Minos Galanakis
8792717309
Changelog: Removed entry from root file
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-09-25 14:12:21 +01:00
Minos Galanakis
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
Minos Galanakis
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
Minos Galanakis
e13775dedb
fuzzer Makefile: Added -lbcrypt linkage
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-09-25 14:12:21 +01:00
Minos Galanakis
a277b210ff
Code style fixes
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-09-25 14:12:21 +01:00
Minos Galanakis
b8d6b82df4
programs: Cleaned up bcrypt linking refererences.
...
bcrypt is added to the cmake `libs` dependency at library\CMakeLists.txt
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-09-25 14:12:21 +01:00
Simon Butcher
769ee65f99
Fix Visual Studio Release|x64 builds
...
The shipped Visual Studio project files were misconfigured for build
combinations of 64 bit Release builds.
Signed-off-by: Simon Butcher <simon.butcher@arm.com>
2023-09-25 14:12:21 +01:00
Simon Butcher
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
Simon Butcher
949aa8fa3a
Remove redundant Visual Studio 6 data files
...
Visual Studio 6 is no longer supported by the library.
Signed-off-by: Simon Butcher <simon.butcher@arm.com>
2023-09-25 14:12:21 +01:00
Simon Butcher
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
Simon Butcher
bcb6cfb13d
Fix the tests build with mingw for the new Win32 APIs
...
Add missing library dependency of bcrypt to the tests Makefile
Signed-off-by: Simon Butcher <simon.butcher@arm.com>
2023-09-25 14:12:20 +01:00
Simon Butcher
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
Simon Butcher
1c0c5d2a62
Fix for building programs with mingw
...
mingw build files were missing the dependency on the bcrypt library
Signed-off-by: Simon Butcher <simon.butcher@arm.com>
2023-09-25 14:12:20 +01:00
Simon Butcher
33425de128
Correct check for WIN32 in cmake files for programs
...
Condition was checking for Visual Studio, not use of WIN32
Signed-off-by: Simon Butcher <simon.butcher@arm.com>
2023-09-25 14:12:20 +01:00
Simon Butcher
34b8d83a22
Update ChangeLog for PR #730 for Win32 API fixes
...
Signed-off-by: Simon Butcher <simon.butcher@arm.com>
2023-09-25 14:12:20 +01:00
Simon Butcher
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
Kevin Kane
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
Dave Rodgman
76059e5ef8
Merge pull request #1078 from daverodgman/padding-ct-changelog
...
Padding ct changelog
2023-09-25 14:02:42 +01:00
Gilles Peskine
87fe99627f
Merge pull request #8249 from bensze01/fixed-typing-package-versions
...
Set explicit version for the typing packages (fix CI failure)
2023-09-25 14:35:01 +02:00
Dave Rodgman
68dca1ed6f
Merge pull request #8247 from mpg/sha3-fixup
...
Fix SHA-3 dependencies in test_suite_md
2023-09-25 12:02:21 +01:00
Dave Rodgman
025bed9eb7
Merge pull request #1076 from daverodgman/more-ct
...
Use CT module more consistently
2023-09-25 11:50:10 +01:00
Dave Rodgman
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
Bence Szépkúti
d06e70c6b8
Set explicit version for the typing packages
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2023-09-25 10:25:18 +02:00
Manuel Pégourié-Gonnard
4fe1e8762d
Fix SHA-3 dependencies in test_suite_md
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-25 10:05:23 +02:00
Dave Rodgman
f6f76c5a25
Merge pull request #8240 from mpg/doc-driver-only-hashes
...
Document driver only hashes (overdue)
2023-09-24 13:41:45 +01:00
Manuel Pégourié-Gonnard
030f11b0b1
Type fixes and wording improvements
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-24 09:48:47 +02:00