-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lr_gpg_check_signature: Forward PGP error messages from RPM
When debugging a test failure with RPM using internal OpenPGP+OpenSSL implementation (that's a bug in RPM, not in librepo), I discovered that librepo tests did not print error messages and that lr_gpg_check_signature() did not forwarded an error message from RPM. RPM before rpm-4.19.0-alpha2 did not provided provided any error messages. That has changed with new functions pgpPrtParams2() and pgpVerifySignature2(). This patch enhances librepo code to use the new RPM functions if available and to propagate the RPM error messages via an already existing GError argument. This patch also enhances librepo tests to actually print the unexpected error messages. Both enhancements should help people to debug their failures. Nonetheless, internal OpenPGP implementation in RPM does not set any error messages and that will probably not change because RPM is going to remove that implementation. On the other hand, Sequoia implementation in RPM forwards the messages from Sequoia library. Yet I was unbable to obtain any message. Sequoia promissed to improve their error messaging, especially with a demise of SHA-1. So I believe this librepo enhancement is useful. Implementation details: I wrapped pgpPrtParams2() into a function because it's called at multiple places. Contrary I did not wrap pgpVerifySignature2() because it's called only at one place. #281
- Loading branch information
Showing
3 changed files
with
79 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters