mbedtls/programs/pkey
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
..
CMakeLists.txt Replace Windows APIs that are banned in Windows Store apps 2023-09-25 14:12:20 +01:00
dh_client.c Change the format of md.h include comments 2023-04-07 03:10:28 -04:00
dh_genprime.c Fix bugs in example programs: change argc == 0 to argc < 2 2023-01-30 16:48:13 +00:00
dh_prime.txt - Changed saved value to RCF 3526 2048 MODP group 2012-10-03 19:50:54 +00:00
dh_server.c Change the format of md.h include comments 2023-04-07 03:10:28 -04:00
ecdh_curve25519.c Fix use of sizeof without brackets 2023-02-02 12:40:50 +00:00
ecdsa.c Fix use of sizeof without brackets 2023-02-02 12:40:50 +00:00
gen_key.c test: disable BIGNUM support on the test ecc_no_bignum component 2023-08-10 06:43:23 +02:00
key_app.c Add guards for mbedtls_psa_crypto_free() 2023-04-24 08:10:01 +02:00
key_app_writer.c test: disable BIGNUM support on the test ecc_no_bignum component 2023-08-10 06:43:23 +02:00
mpi_demo.c Switch to the new code style 2023-01-11 14:50:10 +01:00
pk_decrypt.c Add guards for mbedtls_psa_crypto_free() 2023-04-24 08:10:01 +02:00
pk_encrypt.c Add guards for mbedtls_psa_crypto_free() 2023-04-24 08:10:01 +02:00
pk_sign.c Add guards for mbedtls_psa_crypto_free() 2023-04-24 08:10:01 +02:00
pk_verify.c Add guards for mbedtls_psa_crypto_free() 2023-04-24 08:10:01 +02:00
rsa_decrypt.c Switch to the new code style 2023-01-11 14:50:10 +01:00
rsa_encrypt.c Switch to the new code style 2023-01-11 14:50:10 +01:00
rsa_genkey.c Switch to the new code style 2023-01-11 14:50:10 +01:00
rsa_priv.txt Normalize line endings 2020-05-27 21:55:08 +02:00
rsa_pub.txt Normalize line endings 2020-05-27 21:55:08 +02:00
rsa_sign.c Change the format of md.h include comments 2023-04-07 03:10:28 -04:00
rsa_sign_pss.c Add guards for mbedtls_psa_crypto_free() 2023-04-24 08:10:01 +02:00
rsa_verify.c Change the format of md.h include comments 2023-04-07 03:10:28 -04:00
rsa_verify_pss.c Add guards for mbedtls_psa_crypto_free() 2023-04-24 08:10:01 +02:00