mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 09:28:05 +00:00
Fix generating CVC REQ.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
5696c7a5da
commit
2bc40771ca
1 changed files with 1 additions and 1 deletions
|
|
@ -226,7 +226,7 @@ size_t asn1_cvc_aut(void *rsa_ecdsa, uint8_t key_type, uint8_t *buf, size_t buf_
|
|||
mbedtls_ecdsa_free(&ectx);
|
||||
return 0;
|
||||
}
|
||||
int ret = 0, key_size = mbedtls_mpi_size(&ectx.d);
|
||||
int ret = 0, key_size = 2*mbedtls_mpi_size(&ectx.d);
|
||||
size_t outsig_size = asn1_len_tag(0x5f37, key_size), tot_len = asn1_len_tag(0x67, cvcert_size+outcar_size+outsig_size);
|
||||
if (buf_len == 0 || buf == NULL)
|
||||
return tot_len;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue