mbedtls/programs/x509
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
..
cert_app.c Add guards for mbedtls_psa_crypto_free() 2023-04-24 08:10:01 +02:00
cert_req.c Add a missing guard in cert_req.c 2023-07-10 08:45:30 -04:00
cert_write.c cert_write: Support write any for extended key usage 2023-07-04 17:30:21 +08:00
CMakeLists.txt Replace Windows APIs that are banned in Windows Store apps 2023-09-25 14:12:20 +01:00
crl_app.c Add guards for mbedtls_psa_crypto_free() 2023-04-24 08:10:01 +02:00
load_roots.c Add guards for mbedtls_psa_crypto_free() 2023-04-24 08:10:01 +02:00
req_app.c Add guards for mbedtls_psa_crypto_free() 2023-04-24 08:10:01 +02:00