tests/gpg: Don't assert subkey expiration when only primary expired
authorDan Nicholson <dbn@endlessos.org>
Fri, 28 May 2021 21:23:54 +0000 (15:23 -0600)
committerDan Nicholson <dbn@endlessos.org>
Fri, 28 May 2021 21:35:58 +0000 (15:35 -0600)
commit9c20d162a410ad445a5a1b73bcdbb01c202f7964
tree9a848de82e38f495497afe461065faf8d8447374
parent5b8ce9e6140a5b47dfaa652111175b4b57ccfa46
tests/gpg: Don't assert subkey expiration when only primary expired

In gnupg 2.3.0[1], if a primary key is expired and a subkey does not
have an expiration or its expiration is older than the primary key, the
subkey's expiration will be reported as the primary's. Previously a
subkey without an expiration would not report one regardless of the
primary key's expiration.

This caused a regression in a test setting an expiration on a primary
key. The test was checking that the subkey was not expired by asserting
that there was no `Key expired` line in the signature verification
output. With gnupg 2.3.0+, it will show as expired, causing the test to
fail.

Remove the assertion since it's not consistent across gnupg versions. In
practice we don't care whether the subkey is considered expired or not
as long as the signature verification fails when the primary key is
expired.

1. https://dev.gnupg.org/T3343

Fixes: #2359
tests/test-gpg-signed-commit.sh