diff options
author | Neal H. Walfield <neal@pep.foundation> | 2023-04-12 17:56:19 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2023-04-20 14:08:55 +0300 |
commit | 87b9e0c28c3df3937f6676ee1b4164d6154dd9d3 (patch) | |
tree | 44a0d97ec5ee091462b074c11831e042a0b3f2a8 /tests/rpmi.at | |
parent | 293b625f3ad6924754ff98a4d486c6aa6e6cffa8 (diff) | |
download | rpm-87b9e0c28c3df3937f6676ee1b4164d6154dd9d3.tar.gz |
Add pgpVerifySignature2() and pgpPrtParams2()
Add new functions pgpVerifySignature2() and pgpPrtParams2(), which are
like their earlier versions, but optionally return descriptive error
messages (in the case of failure) or lints (in the case of success).
Adjust tests accordingly.
This requires rpm-sequoia 1.4 or later.
See https://github.com/rpm-software-management/rpm-sequoia/issues/39
and
https://github.com/rpm-software-management/rpm/issues/2127#issuecomment-1482646398
Fixes #2483.
Diffstat (limited to 'tests/rpmi.at')
-rw-r--r-- | tests/rpmi.at | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/rpmi.at b/tests/rpmi.at index 9d74cf689..423d97bca 100644 --- a/tests/rpmi.at +++ b/tests/rpmi.at @@ -342,7 +342,7 @@ AT_CLEANUP AT_SETUP([rpm -U <corrupted signed 1>]) AT_KEYWORDS([install]) -AT_CHECK([ +AT_CHECK_UNQUOTED([ RPMDB_INIT pkg="hello-2.0-1.x86_64-signed.rpm" @@ -355,7 +355,13 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \ ], [1], [], -[error: /tmp/hello-2.0-1.x86_64-signed.rpm: Header RSA signature: BAD (package tag 268: invalid OpenPGP signature) +[`if test x$PGP = xinternal; then + echo 'error: /tmp/hello-2.0-1.x86_64-signed.rpm: Header RSA signature: BAD (package tag 268: invalid OpenPGP signature)' +else + echo 'error: /tmp/hello-2.0-1.x86_64-signed.rpm: Header RSA signature: BAD (package tag 268: invalid OpenPGP signature: Parsing an OpenPGP packet:' + echo ' Failed to parse Signature Packet' + echo ' because: Malformed packet: Subpacket extends beyond the end of the subpacket area)' +fi` error: /tmp/hello-2.0-1.x86_64-signed.rpm cannot be installed ]) AT_CLEANUP |