mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 09:28:05 +00:00
Upgrade to Mbedtls 3.6
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
223fc117dd
commit
c4a08aff0f
2 changed files with 2 additions and 3 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit 218441a45a50993c585ad74b3d0a632d2cf1124e
|
Subproject commit f8480291fe2325b6658ee94320aa028eeec98b23
|
||||||
|
|
@ -513,9 +513,8 @@ int store_keys(void *key_ctx, int type, uint8_t key_id) {
|
||||||
}
|
}
|
||||||
else if (type & PICO_KEYS_KEY_EC) {
|
else if (type & PICO_KEYS_KEY_EC) {
|
||||||
mbedtls_ecdsa_context *ecdsa = (mbedtls_ecdsa_context *) key_ctx;
|
mbedtls_ecdsa_context *ecdsa = (mbedtls_ecdsa_context *) key_ctx;
|
||||||
key_size = (uint16_t)mbedtls_mpi_size(&ecdsa->d);
|
|
||||||
kdata[0] = ecdsa->grp.id & 0xff;
|
kdata[0] = ecdsa->grp.id & 0xff;
|
||||||
mbedtls_ecp_write_key(ecdsa, kdata + 1, key_size);
|
mbedtls_ecp_write_key_ext(ecdsa, (size_t *)&key_size, kdata + 1, sizeof(kdata) - 1);
|
||||||
key_size++;
|
key_size++;
|
||||||
}
|
}
|
||||||
else if (type & PICO_KEYS_KEY_AES) {
|
else if (type & PICO_KEYS_KEY_AES) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue