]> the.earth.li Git - onak.git/commitdiff
Add blank line before armoured PGP data
authorJonathan McDowell <noodles@earth.li>
Wed, 21 Aug 2019 17:55:32 +0000 (18:55 +0100)
committerJonathan McDowell <noodles@earth.li>
Wed, 21 Aug 2019 17:55:32 +0000 (18:55 +0100)
When removing the Version: header it's still necessary to have a blank
line before the actual armoured data.

armor.c

diff --git a/armor.c b/armor.c
index ab10f41dbc1e0cd6a49edca3c7ca0ab6a141a06c..1341950c77af48152e1f7c8189c0c66d03217e1f 100644 (file)
--- a/armor.c
+++ b/armor.c
@@ -330,8 +330,8 @@ int armor_openpgp_stream(int (*putchar_func)(void *ctx, size_t count,
        /*
         * Print armor header
         */
-       putchar_func(ctx, sizeof("-----BEGIN PGP PUBLIC KEY BLOCK-----\n") - 1,
-               (unsigned char *) "-----BEGIN PGP PUBLIC KEY BLOCK-----\n");
+       putchar_func(ctx, sizeof("-----BEGIN PGP PUBLIC KEY BLOCK-----\n\n") - 1,
+               (unsigned char *) "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\n");
 
        armor_init(&armor_ctx);
        armor_ctx.putchar_func = putchar_func;