<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/gpg-interface.c, branch v2.23.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.23.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.23.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-07-16T19:15:12Z</updated>
<entry>
<title>gpg-interface: do not scan past the end of buffer</title>
<updated>2019-07-16T19:15:12Z</updated>
<author>
<name>Steven Roberts</name>
<email>fenderq@gmail.com</email>
</author>
<published>2019-07-16T18:47:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=64c45dc72ef039215f23d1b8f077dd6f9f254d38'/>
<id>urn:sha1:64c45dc72ef039215f23d1b8f077dd6f9f254d38</id>
<content type='text'>
If the GPG output ends with trailing blank lines, after skipping
them over inside the loop to find the terminating NUL at the end,
the loop ends up looking for the next line, starting past the end.

Signed-off-by: Steven Roberts &lt;sroberts@fenderq.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mg/gpg-fingerprint'</title>
<updated>2018-11-02T15:53:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-02T15:53:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=11cc180fa5c4428faa64acf3507fa96d9636ad34'/>
<id>urn:sha1:11cc180fa5c4428faa64acf3507fa96d9636ad34</id>
<content type='text'>
New "--pretty=format:" placeholders %GF and %GP that show the GPG
key fingerprints have been invented.

* mg/gpg-fingerprint:
  gpg-interface.c: obtain primary key fingerprint as well
  gpg-interface.c: support getting key fingerprint via %GF format
  gpg-interface.c: use flags to determine key/signer info presence
</content>
</entry>
<entry>
<title>Merge branch 'mg/gpg-parse-tighten'</title>
<updated>2018-11-02T15:53:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-02T15:53:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=02561896de9d4cd2354e825bf7e6304a3c19d1c3'/>
<id>urn:sha1:02561896de9d4cd2354e825bf7e6304a3c19d1c3</id>
<content type='text'>
Detect and reject a signature block that has more than one GPG
signature.

* mg/gpg-parse-tighten:
  gpg-interface.c: detect and reject multiple signatures on commits
</content>
</entry>
<entry>
<title>gpg-interface.c: obtain primary key fingerprint as well</title>
<updated>2018-10-22T23:00:43Z</updated>
<author>
<name>Michał Górny</name>
<email>mgorny@gentoo.org</email>
</author>
<published>2018-10-22T16:38:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4de9394dcb769394f490a0285015a1d26beb54d1'/>
<id>urn:sha1:4de9394dcb769394f490a0285015a1d26beb54d1</id>
<content type='text'>
Obtain the primary key fingerprint off VALIDSIG status message,
and expose it via %GP format.

Signed-off-by: Michał Górny &lt;mgorny@gentoo.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gpg-interface.c: support getting key fingerprint via %GF format</title>
<updated>2018-10-22T23:00:09Z</updated>
<author>
<name>Michał Górny</name>
<email>mgorny@gentoo.org</email>
</author>
<published>2018-10-22T16:38:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3daaaabe7ed22c17bff04d19c711be427bd2e225'/>
<id>urn:sha1:3daaaabe7ed22c17bff04d19c711be427bd2e225</id>
<content type='text'>
Support processing VALIDSIG status that provides additional information
for valid signatures.  Use this information to propagate signing key
fingerprint and expose it via %GF pretty format.  This format can be
used to build safer key verification systems that verify the key via
complete fingerprint rather than short/long identifier provided by %GK.

Signed-off-by: Michał Górny &lt;mgorny@gentoo.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gpg-interface.c: use flags to determine key/signer info presence</title>
<updated>2018-10-22T22:58:54Z</updated>
<author>
<name>Michał Górny</name>
<email>mgorny@gentoo.org</email>
</author>
<published>2018-10-22T16:38:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0b11a84e1ba26fa3c9995f19e224848d8afc9bcf'/>
<id>urn:sha1:0b11a84e1ba26fa3c9995f19e224848d8afc9bcf</id>
<content type='text'>
Replace the logic used to determine whether key and signer information
is present to use explicit flags in sigcheck_gpg_status[] array.  This
is more future-proof, since it makes it possible to add additional
statuses without having to explicitly update the conditions.

Signed-off-by: Michał Górny &lt;mgorny@gentoo.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gpg-interface.c: detect and reject multiple signatures on commits</title>
<updated>2018-10-22T03:42:30Z</updated>
<author>
<name>Michał Górny</name>
<email>mgorny@gentoo.org</email>
</author>
<published>2018-10-20T19:30:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=da6cf1b3360eefdce3dbde7632eca57177327f37'/>
<id>urn:sha1:da6cf1b3360eefdce3dbde7632eca57177327f37</id>
<content type='text'>
GnuPG supports creating signatures consisting of multiple signature
packets.  If such a signature is verified, it outputs all the status
messages for each signature separately.  However, git currently does not
account for such scenario and gets terribly confused over getting
multiple *SIG statuses.

For example, if a malicious party alters a signed commit and appends
a new untrusted signature, git is going to ignore the original bad
signature and report untrusted commit instead.  However, %GK and %GS
format strings may still expand to the data corresponding
to the original signature, potentially tricking the scripts into
trusting the malicious commit.

Given that the use of multiple signatures is quite rare, git does not
support creating them without jumping through a few hoops, and finally
supporting them properly would require extensive API improvement, it
seems reasonable to just reject them at the moment.

Signed-off-by: Michał Górny &lt;mgorny@gentoo.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/gpg-status'</title>
<updated>2018-08-20T18:33:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-08-20T18:33:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4d34122eef19c39415d38b4963572770f96a9317'/>
<id>urn:sha1:4d34122eef19c39415d38b4963572770f96a9317</id>
<content type='text'>
"git verify-tag" and "git verify-commit" have been taught to use
the exit status of underlying "gpg --verify" to signal bad or
untrusted signature they found.

* jc/gpg-status:
  gpg-interface: propagate exit status from gpg back to the callers
</content>
</entry>
<entry>
<title>gpg-interface: propagate exit status from gpg back to the callers</title>
<updated>2018-08-09T22:34:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-08-09T18:40:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4e5dc9ca179931b4dc39b32f06facc5a31091403'/>
<id>urn:sha1:4e5dc9ca179931b4dc39b32f06facc5a31091403</id>
<content type='text'>
When gpg-interface API unified support for signature verification
codepaths for signed tags and signed commits in mid 2015 at around
v2.6.0-rc0~114, we accidentally loosened the GPG signature
verification.

Before that change, signed commits were verified by looking for
"G"ood signature from GPG, while ignoring the exit status of "gpg
--verify" process, while signed tags were verified by simply passing
the exit status of "gpg --verify" through.  The unified code we
currently have ignores the exit status of "gpg --verify" and returns
successful verification when the signature matches an unexpired key
regardless of the trust placed on the key (i.e. in addition to "G"ood
ones, we accept "U"ntrusted ones).

Make these commands signal failure with their exit status when
underlying "gpg --verify" (or the custom command specified by
"gpg.program" configuration variable) does so.  This essentially
changes their behaviour in a backward incompatible way to reject
signatures that have been made with untrusted keys even if they
correctly verify, as that is how "gpg --verify" behaves.

Note that the code still overrides a zero exit status obtained from
"gpg" (or gpg.program) if the output does not say the signature is
good or computes correctly but made with untrusted keys, to catch
a poorly written wrapper around "gpg" the user may give us.

We could exclude "U"ntrusted support from this fallback code, but
that would be making two backward incompatible changes in a single
commit, so let's avoid that for now.  A follow-up change could do so
if desired.

Helped-by: Vojtech Myslivec &lt;vojtech.myslivec@nic.cz&gt;
Helped-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gpg-interface: introduce new signature format "x509" using gpgsm</title>
<updated>2018-07-18T17:02:23Z</updated>
<author>
<name>Henning Schild</name>
<email>henning.schild@siemens.com</email>
</author>
<published>2018-07-17T12:50:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1e7adb97566bff7d3431ce64b8d0d854a6863ed5'/>
<id>urn:sha1:1e7adb97566bff7d3431ce64b8d0d854a6863ed5</id>
<content type='text'>
This commit allows git to create and check x509 type signatures using
gpgsm.

Signed-off-by: Henning Schild &lt;henning.schild@siemens.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
