mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-04-17 13:48:27 +00:00
Increase buffers for emulation.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
98123046e5
commit
5d827234a9
1 changed files with 4 additions and 0 deletions
|
|
@ -630,7 +630,11 @@ int load_private_key_rsa(mbedtls_rsa_context *ctx, file_t *fkey) {
|
|||
}
|
||||
|
||||
uint16_t key_size = file_get_size(fkey);
|
||||
#ifdef ENABLE_EMULATION
|
||||
uint8_t kdata[8192 / 8];
|
||||
#else
|
||||
uint8_t kdata[4096 / 8];
|
||||
#endif
|
||||
memcpy(kdata, file_get_data(fkey), key_size);
|
||||
if (mkek_decrypt(kdata, key_size) != 0) {
|
||||
return PICOKEY_EXEC_ERROR;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue