mirror of
https://github.com/polhenarejos/pico-hsm
synced 2026-06-10 11:59:06 +02:00
Increase buffers for emulation.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -630,7 +630,11 @@ int load_private_key_rsa(mbedtls_rsa_context *ctx, file_t *fkey) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint16_t key_size = file_get_size(fkey);
|
uint16_t key_size = file_get_size(fkey);
|
||||||
|
#ifdef ENABLE_EMULATION
|
||||||
|
uint8_t kdata[8192 / 8];
|
||||||
|
#else
|
||||||
uint8_t kdata[4096 / 8];
|
uint8_t kdata[4096 / 8];
|
||||||
|
#endif
|
||||||
memcpy(kdata, file_get_data(fkey), key_size);
|
memcpy(kdata, file_get_data(fkey), key_size);
|
||||||
if (mkek_decrypt(kdata, key_size) != 0) {
|
if (mkek_decrypt(kdata, key_size) != 0) {
|
||||||
return PICOKEY_EXEC_ERROR;
|
return PICOKEY_EXEC_ERROR;
|
||||||
|
|||||||
Reference in New Issue
Block a user