git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/5] t/t7004-tag: test handling of rfc1991 signatures

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Nov 9, 2010, 17:23 UTC
Message-ID
<4CD9839B.6060406@drmicha.warpmail.net>
In-Reply-To
<7vwrommn6j.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 09.11.2010 18:17:
Show 52 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>> Currently, git expects "-----BEGIN PGP SIGNATURE-----" at the beginning of a
>> signature. But gpg uses "MESSAGE" instead of "SIGNATURE" when used with
>> the "rfc1991" option. This leads to git's failing to verify it's own
>> signed tags, among other problems.
>>
>> Add tests for all code paths (tag -v, tag -l -n largenumber, tag -f
>> without -m) where signature detection matters.
>>
>> Reported-by: Stephan Hugel <urschrei@gmail.com>
>> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
>> ---
>>  t/t7004-tag.sh |   43 +++++++++++++++++++++++++++++++++++++++++++
>>  1 files changed, 43 insertions(+), 0 deletions(-)
>>
>> diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
>> index ac943f5..22dcc45 100755
>> --- a/t/t7004-tag.sh
>> +++ b/t/t7004-tag.sh
>> @@ -1030,6 +1030,49 @@ test_expect_success GPG \
>>  	test_cmp expect actual
>>  '
>>  
>> +# usage with rfc1991 signatures
>> +echo "rfc1991" > gpghome/gpg.conf
>> +get_tag_header rfc1991-signed-tag $commit commit $time >expect
>> +echo "RFC1991 signed tag" >>expect
>> +echo '-----BEGIN PGP MESSAGE-----' >>expect
>> +test_expect_success GPG \
>> +	'creating a signed tag with rfc1991' '
>> +	git tag -s -m "RFC1991 signed tag" rfc1991-signed-tag $commit &&
>> +	get_tag_msg rfc1991-signed-tag >actual &&
>> +	test_cmp expect actual
>> +'
>> +
>> +cat >fakeeditor <<'EOF'
>> +#!/bin/sh
>> +cp "$1" actual
>> +EOF
>> +chmod +x fakeeditor
>> +
>> +test_expect_failure GPG \
>> +...
>> +'
>> +
>> +rm -f gpghome/gpg.conf
> 
> Shouldn't this line be placed much earlier in the sequence, to make sure
> that people without --rfc1991 can grok new style signatures?  Better yet,
> shouldn't the script test rfc1991-signed tags both with and without the
> rfc1991 configuration?

The --rfc1991 option matters for the creation of signatures only, not for the verification (and neither for display/listing with git, of course).

Michael
Previous: Junio C HamanoNext: Junio C Hamano
Message 26 of 39 in “Error when verifying tags signed using 1.7.3.1”
  1. Stephan HugelOct 4, 2010
  2. Daniel JohnsonOct 4, 2010
  3. Stephan HugelOct 4, 2010
  4. Daniel JohnsonOct 4, 2010
  5. Stephan HugelOct 5, 2010
  6. Michael J GruberOct 5, 2010
  7. Stephan HugelOct 5, 2010
  8. Michael J GruberOct 5, 2010
  9. Stephan HugelOct 5, 2010
  10. Michael J GruberOct 5, 2010
  11. tag,verify-tag: do not trip over rfc1991 signaturesMichael J Gruber, Oct 5, 2010
  12. Junio C HamanoOct 5, 2010
  13. Michael J GruberOct 5, 2010
  14. Stephan HugelOct 5, 2010
  15. Michael J GruberOct 5, 2010
  16. 0/5 Handling of rfc1991 signaturesMichael J Gruber, Nov 6, 2010
  17. 0/5 Handling of rfc1991 signaturesMichael J Gruber, Nov 10, 2010
  18. Junio C HamanoNov 10, 2010
  19. 1/5 t/t7004-tag: test handling of rfc1991 signaturesMichael J Gruber, Nov 10, 2010
  20. 2/5 verify-tag: factor out signature detectionMichael J Gruber, Nov 10, 2010
  21. 3/5 tag: factor out sig detection for body editsMichael J Gruber, Nov 10, 2010
  22. 4/5 tag: factor out sig detection for tag displayMichael J Gruber, Nov 10, 2010
  23. 5/5 tag: recognize rfc1991 signaturesMichael J Gruber, Nov 10, 2010
  24. 1/5 t/t7004-tag: test handling of rfc1991 signaturesMichael J Gruber, Nov 6, 2010
  25. Junio C HamanoNov 9, 2010
  26. Michael J GruberNov 9, 2010
  27. Junio C HamanoNov 10, 2010
  28. Michael J GruberNov 10, 2010
  29. 2/5 verify-tag: factor out signature detectionMichael J Gruber, Nov 6, 2010
  30. Thiago FarinaNov 6, 2010
  31. 3/5 tag: factor out sig detection for body editsMichael J Gruber, Nov 6, 2010
  32. 4/5 tag: factor out sig detection for tag displayMichael J Gruber, Nov 6, 2010
  33. 5/5 tag: recognize rfc1991 signaturesMichael J Gruber, Nov 6, 2010
  34. Thiago FarinaNov 6, 2010
  35. Junio C HamanoNov 8, 2010
  36. Todd ZullingerOct 5, 2010
  37. Michael J GruberOct 5, 2010
  38. Stephan HugelOct 5, 2010
  39. Pat ThoytsOct 5, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.