mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-04-17 21:58:27 +00:00
Increase buffer size for non-pico.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
fcc82458ba
commit
69015b84d9
2 changed files with 5 additions and 1 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit 6b483029a50087384b27c5c691864a3675c92ae3
|
||||
Subproject commit 1be3691a954134b81df8bd3719076e02998ddc8b
|
||||
|
|
@ -522,7 +522,11 @@ uint32_t decrement_key_counter(file_t *fkey) {
|
|||
int store_keys(void *key_ctx, int type, uint8_t key_id) {
|
||||
int r = 0;
|
||||
uint16_t key_size = 0;
|
||||
#ifdef ENABLE_EMULATION
|
||||
uint8_t kdata[8192 / 8]; // worst case
|
||||
#else
|
||||
uint8_t kdata[4096 / 8]; // worst case
|
||||
#endif
|
||||
if (type & PICO_KEYS_KEY_RSA) {
|
||||
mbedtls_rsa_context *rsa = (mbedtls_rsa_context *) key_ctx;
|
||||
key_size = (uint16_t)mbedtls_mpi_size(&rsa->P) + (uint16_t)mbedtls_mpi_size(&rsa->Q);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue