Merge remote-tracking branch 'origin/pr/2400' into mbedtls-2.7

* origin/pr/2400:
  Add ChangeLog entry
  Fix private DER output shifted by one byte.
diff --git a/ChangeLog b/ChangeLog
index 8678461..bae12c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,9 @@
      due to an unacceptable hash signature. The certificate has been
      updated to one that is SHA-256 signed. Fix contributed by
      Illya Gerasymchuk.
+   * Fix private key DER output in the key_app_writer example. File contents
+     were shifted by one byte, creating an invalid ASN.1 tag. Fixed by
+     Christian Walther in #2239.
 
 Changes
    * Include configuration file in all header files that use configuration,
diff --git a/programs/pkey/key_app_writer.c b/programs/pkey/key_app_writer.c
index cd0c230..0450a17 100644
--- a/programs/pkey/key_app_writer.c
+++ b/programs/pkey/key_app_writer.c
@@ -175,7 +175,7 @@
             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 )