summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-10-22 16:38:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-22 23:00:09 (GMT)
commit3daaaabe7ed22c17bff04d19c711be427bd2e225 (patch)
treea731b31651b54e0f23b079e10e8aeaf9b094aaf2 /t
parent0b11a84e1ba26fa3c9995f19e224848d8afc9bcf (diff)
downloadgit-3daaaabe7ed22c17bff04d19c711be427bd2e225.zip
git-3daaaabe7ed22c17bff04d19c711be427bd2e225.tar.gz
git-3daaaabe7ed22c17bff04d19c711be427bd2e225.tar.bz2
gpg-interface.c: support getting key fingerprint via %GF format
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 <mgorny@gentoo.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t7510-signed-commit.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
index 180f0be..19ccae2 100755
--- a/t/t7510-signed-commit.sh
+++ b/t/t7510-signed-commit.sh
@@ -175,8 +175,9 @@ test_expect_success GPG 'show good signature with custom format' '
G
13B6F51ECDDE430D
C O Mitter <committer@example.com>
+ 73D758744BE721698EC54E8713B6F51ECDDE430D
EOF
- git log -1 --format="%G?%n%GK%n%GS" sixth-signed >actual &&
+ git log -1 --format="%G?%n%GK%n%GS%n%GF" sixth-signed >actual &&
test_cmp expect actual
'
@@ -185,8 +186,9 @@ test_expect_success GPG 'show bad signature with custom format' '
B
13B6F51ECDDE430D
C O Mitter <committer@example.com>
+
EOF
- git log -1 --format="%G?%n%GK%n%GS" $(cat forged1.commit) >actual &&
+ git log -1 --format="%G?%n%GK%n%GS%n%GF" $(cat forged1.commit) >actual &&
test_cmp expect actual
'
@@ -195,8 +197,9 @@ test_expect_success GPG 'show untrusted signature with custom format' '
U
61092E85B7227189
Eris Discordia <discord@example.net>
+ D4BE22311AD3131E5EDA29A461092E85B7227189
EOF
- git log -1 --format="%G?%n%GK%n%GS" eighth-signed-alt >actual &&
+ git log -1 --format="%G?%n%GK%n%GS%n%GF" eighth-signed-alt >actual &&
test_cmp expect actual
'
@@ -205,8 +208,9 @@ test_expect_success GPG 'show unknown signature with custom format' '
E
61092E85B7227189
+
EOF
- GNUPGHOME="$GNUPGHOME_NOT_USED" git log -1 --format="%G?%n%GK%n%GS" eighth-signed-alt >actual &&
+ GNUPGHOME="$GNUPGHOME_NOT_USED" git log -1 --format="%G?%n%GK%n%GS%n%GF" eighth-signed-alt >actual &&
test_cmp expect actual
'
@@ -215,8 +219,9 @@ test_expect_success GPG 'show lack of signature with custom format' '
N
+
EOF
- git log -1 --format="%G?%n%GK%n%GS" seventh-unsigned >actual &&
+ git log -1 --format="%G?%n%GK%n%GS%n%GF" seventh-unsigned >actual &&
test_cmp expect actual
'
@@ -255,8 +260,9 @@ test_expect_success GPG 'show double signature with custom format' '
E
+
EOF
- git log -1 --format="%G?%n%GK%n%GS" $(cat double-commit.commit) >actual &&
+ git log -1 --format="%G?%n%GK%n%GS%n%GF" $(cat double-commit.commit) >actual &&
test_cmp expect actual
'