Added support for building emulation in Windows.

It has not been tested but it should not break any linux build.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2024-01-01 01:55:49 +01:00
parent ab31a6615c
commit d82affa880
31 changed files with 394 additions and 384 deletions

View File

@@ -111,9 +111,9 @@ int cmd_extras() {
memcpy(mse.Qpt, apdu.data, sizeof(mse.Qpt));
uint8_t buf[MBEDTLS_ECP_MAX_BYTES];
size_t olen = 0;
uint16_t olen = 0;
ret = mbedtls_ecdh_calc_secret(&hkey,
&olen,
(size_t *)&olen,
buf,
MBEDTLS_ECP_MAX_BYTES,
random_gen,
@@ -141,7 +141,7 @@ int cmd_extras() {
ret = mbedtls_ecp_point_write_binary(&hkey.ctx.mbed_ecdh.grp,
&hkey.ctx.mbed_ecdh.Q,
MBEDTLS_ECP_PF_UNCOMPRESSED,
&olen,
(size_t *)&olen,
res_APDU,
4096);
mbedtls_ecdh_free(&hkey);