mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-07 19:04:22 +00:00
pkwrite: fix internal buffer size in pk_write_ec_pubkey()
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
0f6d565d26
commit
e1d7c9dabd
@ -165,7 +165,7 @@ static int pk_write_ec_pubkey(unsigned char **p, unsigned char *start,
|
|||||||
const mbedtls_pk_context *pk)
|
const mbedtls_pk_context *pk)
|
||||||
{
|
{
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
uint8_t buf[PSA_EXPORT_KEY_PAIR_MAX_SIZE];
|
uint8_t buf[PSA_EXPORT_PUBLIC_KEY_MAX_SIZE];
|
||||||
|
|
||||||
if (mbedtls_pk_get_type(pk) == MBEDTLS_PK_OPAQUE) {
|
if (mbedtls_pk_get_type(pk) == MBEDTLS_PK_OPAQUE) {
|
||||||
if (psa_export_public_key(pk->priv_id, buf, sizeof(buf), &len) != PSA_SUCCESS) {
|
if (psa_export_public_key(pk->priv_id, buf, sizeof(buf), &len) != PSA_SUCCESS) {
|
||||||
|
Loading…
Reference in New Issue
Block a user