From: Jonathan McDowell Date: Mon, 8 Jul 2019 11:06:31 +0000 (+0100) Subject: Remove Version: header from armored output X-Git-Tag: onak-0.6.0~52 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=4b6032dbfb20e041043cfa0b6b84145f49a98a11;p=onak.git Remove Version: header from armored output 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. --- diff --git a/armor.c b/armor.c index 44be939..ab10f41 100644 --- 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;