git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: "Tom G. Christensen" <tgc@jupiterrise.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 5/7] Add support for gnupg < 1.4
Date: Thu, 13 Apr 2017 17:17:59 +0200	[thread overview]
Message-ID: <CACBZZX56Fx+niwwsiJeMwvaZkuR3h4zxytu+xx_sanobMPGobg@mail.gmail.com> (raw)
In-Reply-To: <CACBZZX6bYLRSUAy2GUYhBVet3tjzrBQ40L49KxetAvBdgx_x+w@mail.gmail.com>

On Wed, Apr 5, 2017 at 3:45 PM, Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> On Wed, Apr 5, 2017 at 3:04 PM, Tom G. Christensen <tgc@jupiterrise.com> wrote:
>> This adds an OLD_GNUPG define to the Makefile which when activated will
>> ensure git does not use the --keyid-format argument when calling the
>> 'gpg' program.
>> This is consistent with how 'gpg' was used in git < 2.10.0 and slightly
>> decreases security.
>
> This changes the code Linus Torvalds added in b624a3e67f to mitigate
> the evil32 project generating keys which looked the same for 32 bit
> signatures.
>
> I think this change makes sense, but the Makefile should have a
> slightly scarier warning, something like:
>
> "Define OLD_GNUPG if you need support for gnupg <1.4. Note that this
> will cause git to only show the first 32 bits of PGP keys instead of
> 64, and there's a wide variety of brute-forced 32 bit keys in the wild
> thanks to the evil32 project (https://evil32.com). Enabling this will
> make GPG work old versions, but you might be fooled into accepting

grammar fix: "work on older versions"....

> malicious keys as a result".
>
>> Signed-off-by: Tom G. Christensen <tgc@jupiterrise.com>
>> ---
>>  Makefile        | 6 ++++++
>>  gpg-interface.c | 2 ++
>>  2 files changed, 8 insertions(+)
>>
>> diff --git a/Makefile b/Makefile
>> index ca9f16d19..f8f585d21 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -386,6 +386,8 @@ all::
>>  #
>>  # to say "export LESS=FRX (and LV=-c) if the environment variable
>>  # LESS (and LV) is not set, respectively".
>> +#
>> +# Define OLD_GNUPG if you need support for gnupg < 1.4.
>>
>>  GIT-VERSION-FILE: FORCE
>>         @$(SHELL_PATH) ./GIT-VERSION-GEN
>> @@ -1529,6 +1531,10 @@ ifndef PAGER_ENV
>>  PAGER_ENV = LESS=FRX LV=-c
>>  endif
>>
>> +ifdef OLD_GNUPG
>> +       BASIC_CFLAGS += -DOLD_GNUPG
>> +endif
>> +
>>  QUIET_SUBDIR0  = +$(MAKE) -C # space to separate -C and subdir
>>  QUIET_SUBDIR1  =
>>
>> diff --git a/gpg-interface.c b/gpg-interface.c
>> index e44cc27da..57f1ea792 100644
>> --- a/gpg-interface.c
>> +++ b/gpg-interface.c
>> @@ -224,7 +224,9 @@ int verify_signed_buffer(const char *payload, size_t payload_size,
>>         argv_array_pushl(&gpg.args,
>>                          gpg_program,
>>                          "--status-fd=1",
>> +#ifndef OLD_GNUPG
>>                          "--keyid-format=long",
>> +#endif
>>                          "--verify", temp.filename.buf, "-",
>>                          NULL);
>>
>> --
>> 2.12.2
>>

  parent reply	other threads:[~2017-04-13 15:18 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-04  2:54 [RFC] dropping support for ancient versions of curl Jeff King
2017-04-04  3:08 ` Jeff King
2017-04-04  5:44   ` Jessie Hernandez
2017-04-04  8:17 ` Ævar Arnfjörð Bjarmason
2017-04-04  8:33   ` Jeff King
2017-04-04 10:44     ` Ævar Arnfjörð Bjarmason
2017-04-04 11:54       ` Johannes Schindelin
2017-04-04 14:06         ` Ævar Arnfjörð Bjarmason
2017-04-04 16:53           ` Brandon Williams
2017-04-04 22:46             ` Johannes Schindelin
2017-04-04 23:03               ` Brandon Williams
2017-04-04 23:03               ` Stefan Beller
2017-04-05  8:49                 ` Johannes Schindelin
2017-04-05  9:29                   ` Jeff King
2017-04-04 20:16           ` Jeff King
2017-04-04 13:32 ` Frank Gevaerts
2017-04-05  9:33 ` Tom G. Christensen
2017-04-05 10:51   ` Ævar Arnfjörð Bjarmason
2017-04-05 13:04     ` [PATCH 0/7] Patches to support older RHEL releases Tom G. Christensen
2017-04-05 13:04       ` [PATCH 1/7] Make NO_PERL_MAKEMAKER behave more like ExtUtils::MakeMaker Tom G. Christensen
2017-04-05 13:04       ` [PATCH 2/7] Install man pages when NO_PERL_MAKEMAKER is used Tom G. Christensen
2017-04-05 13:04       ` [PATCH 3/7] Allow svnrdump_sim.py to be used with Python 2.2 Tom G. Christensen
2017-04-05 13:40         ` Ævar Arnfjörð Bjarmason
2017-04-05 14:36           ` Tom G. Christensen
2017-04-05 13:04       ` [PATCH 4/7] Handle missing HTTP_CONNECTCODE in curl < 7.10.7 Tom G. Christensen
2017-04-05 13:50         ` Ævar Arnfjörð Bjarmason
2017-04-05 15:58           ` Franke, Knut
2017-04-05 13:04       ` [PATCH 5/7] Add support for gnupg < 1.4 Tom G. Christensen
2017-04-05 13:45         ` Ævar Arnfjörð Bjarmason
2017-04-13  6:31           ` Junio C Hamano
2017-04-13 15:17           ` Ævar Arnfjörð Bjarmason [this message]
2017-04-05 13:04       ` [PATCH 6/7] Handle missing CURLINFO_SSL_DATA_{IN,OUT} Tom G. Christensen
2017-04-05 13:52         ` Ævar Arnfjörð Bjarmason
2017-04-05 13:04       ` [PATCH 7/7] Do not use curl_easy_strerror with curl < 7.12.0 Tom G. Christensen
2017-04-05 13:53         ` Ævar Arnfjörð Bjarmason
2017-04-06  9:18         ` Jeff King
2017-04-13  6:28           ` Junio C Hamano
2017-04-13 10:52             ` Jacob Keller
2017-04-05 13:04     ` [RFC] dropping support for ancient versions of curl Tom G. Christensen
2017-04-06  0:53     ` brian m. carlson
2017-04-06  1:16       ` Todd Zullinger
2017-04-06  9:29       ` Jeff King
2017-04-07 11:18         ` Johannes Schindelin
2017-04-10 18:22           ` Jeff King
2017-04-06  9:21   ` Jeff King
2017-04-06 16:43     ` Tom G. Christensen
2017-04-07  4:54       ` Jeff King
2017-04-14 11:12         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACBZZX56Fx+niwwsiJeMwvaZkuR3h4zxytu+xx_sanobMPGobg@mail.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tgc@jupiterrise.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).