From eda800f478a914ecf27442da2e8ef764992ef995 Mon Sep 17 00:00:00 2001 From: Azim Khan Date: Wed, 21 Feb 2018 10:39:44 +0000 Subject: [PATCH] Specify signature buffer length properly --- programs/x509/cert_write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/x509/cert_write.c b/programs/x509/cert_write.c index 0266cdadd..075ceb205 100644 --- a/programs/x509/cert_write.c +++ b/programs/x509/cert_write.c @@ -554,7 +554,7 @@ static int remote_sign_func(void *ctx, mbedtls_md_type_t md_alg, offset += hash_len; if( serial_xfer( remote_ctx->serial_port, func_buffer, offset, sig, - 100/* FIXME */, sig_len ) != 0 ) + MBEDTLS_ECDSA_MAX_SIG_LEN(256), sig_len ) != 0 ) { mbedtls_printf( " failed\n ! Serial error in signing\n\n" ); return( -1 );