Increase buffers for emulation.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2026-02-25 23:25:22 +01:00
parent 98123046e5
commit 5d827234a9
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -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;