]> the.earth.li Git - onak.git/commitdiff
Remove Version: header from armored output
authorJonathan McDowell <noodles@earth.li>
Mon, 8 Jul 2019 11:06:31 +0000 (12:06 +0100)
committerJonathan McDowell <noodles@earth.li>
Mon, 8 Jul 2019 11:07:41 +0000 (12:07 +0100)
There is no benefit to this header and it leaks information about the
implementation of OpenPGP in use, which may open up other attacks. Drop
it.

armor.c

diff --git a/armor.c b/armor.c
index 44be9394d72ab5201341f8b426933c09880bea66..ab10f41dbc1e0cd6a49edca3c7ca0ab6a141a06c 100644 (file)
--- a/armor.c
+++ b/armor.c
@@ -332,9 +332,7 @@ int armor_openpgp_stream(int (*putchar_func)(void *ctx, size_t count,
         */
        putchar_func(ctx, sizeof("-----BEGIN PGP PUBLIC KEY BLOCK-----\n") - 1,
                (unsigned char *) "-----BEGIN PGP PUBLIC KEY BLOCK-----\n");
-       putchar_func(ctx, sizeof("Version: onak " ONAK_VERSION "\n\n") - 1,
-               (unsigned char *) "Version: onak " ONAK_VERSION "\n\n");
-       
+
        armor_init(&armor_ctx);
        armor_ctx.putchar_func = putchar_func;
        armor_ctx.ctx = ctx;