Use now shared ECP_PRV_DER_MAX_BYTES define in pk_wrap.c

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
Neil Armstrong 2022-03-01 14:00:49 +01:00
parent 15021659d1
commit dab14de96a

View file

@ -861,8 +861,7 @@ static int ecdsa_sign_wrap( void *ctx_arg, mbedtls_md_type_t md_alg,
psa_status_t status;
mbedtls_pk_context key;
size_t key_len;
/* see ECP_PRV_DER_MAX_BYTES in pkwrite.c */
unsigned char buf[29 + 3 * MBEDTLS_ECP_MAX_BYTES];
unsigned char buf[MBEDTLS_PK_ECP_PRV_DER_MAX_BYTES];
unsigned char *p;
mbedtls_pk_info_t pk_info = mbedtls_eckey_info;
psa_algorithm_t psa_sig_md = PSA_ALG_ECDSA( mbedtls_psa_translate_md( md_alg ) );