From a92c5455cdcc503fce9d814c98e2de769fcaa017 Mon Sep 17 00:00:00 2001 From: Christian Walther Date: Wed, 28 Nov 2018 13:32:27 +0100 Subject: [PATCH] Fix private DER output shifted by one byte. --- programs/pkey/key_app_writer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/pkey/key_app_writer.c b/programs/pkey/key_app_writer.c index 13602c2e53..ebf6ad134b 100644 --- a/programs/pkey/key_app_writer.c +++ b/programs/pkey/key_app_writer.c @@ -173,7 +173,7 @@ static int write_private_key( mbedtls_pk_context *key, const char *output_file ) return( ret ); len = ret; - c = output_buf + sizeof(output_buf) - len - 1; + c = output_buf + sizeof(output_buf) - len; } if( ( f = fopen( output_file, "w" ) ) == NULL )