gpg-interface/gpgsm: fix for v2.3
commita075e79d2c036e8e41900cfcb2177d75b92758c8
authorFabian Stelzer <fs@gigacodes.de>
Fri, 4 Mar 2022 10:25:17 +0000 (4 11:25 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 4 Mar 2022 19:36:40 +0000 (4 11:36 -0800)
tree3acec668585f175d18a5dacf092e26c49ea3bbfb
parent4c53a8c20f8984adb226293a3ffd7b88c3f4ac1a
gpg-interface/gpgsm: fix for v2.3

Checking if signing was successful will now accept '[GNUPG]:
SIG_CREATED' on the beginning of the first or any subsequent line. Not
just explictly the second one anymore.

Gpgsm v2.3 changed its output when listing keys from `fingerprint` to
`sha1/2 fpr`. This leads to the gpgsm tests silently not being executed
because of a failed prerequisite.
Switch to gpg's `--with-colons` output format when evaluating test
prerequisites to make parsing more robust. This also allows us to
combine the existing grep/cut/tr/echo pipe for writing the trustlist.txt
into a single awk expression.

Adjust error message checking in test for v2.3 specific output changes.

Helped-By: Junio C Hamano <gitster@pobox.com>
Helped-By: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gpg-interface.c
t/lib-gpg.sh
t/t4202-log.sh