diff options
author | Anatol Pomozov <anatol.pomozov@gmail.com> | 2020-07-31 18:54:42 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2020-08-10 02:02:02 +0200 |
commit | 62246b9355867ab83566998303c921af6b1e38ef (patch) | |
tree | ac5e8db03627cbb186d4873342c6f22070ce3411 | |
parent | 2403fc97325908043917732b32adf87a2eaff603 (diff) | |
download | pacman-62246b9355867ab83566998303c921af6b1e38ef.tar.gz pacman-62246b9355867ab83566998303c921af6b1e38ef.tar.xz |
Fix error during keyring checking
With current master version the 'keyring checking' step produces an error:
debug: returning error 6 from alpm_pkg_get_sig (../lib/libalpm/package.c: 274) : wrong or NULL argument passed
The package signature is still checked later at the integrity verification step though.
This commit fixes keyring checking and now the debug log looks like this:
debug: found cached pkg: /var/cache/pacman/pkg/ruby-2.7.1-2-x86_64.pkg.tar.zst
debug: found detached signature /var/cache/pacman/pkg/ruby-2.7.1-2-x86_64.pkg.tar.zst.sig with size 566
debug: found signature key: 786C63F330D7CB92
debug: looking up key 786C63F330D7CB92 locally
debug: key lookup success, key exists
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r-- | lib/libalpm/package.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 0885b27b..a4356518 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -270,9 +270,7 @@ const char SYMEXPORT *alpm_pkg_get_base64_sig(alpm_pkg_t *pkg) int SYMEXPORT alpm_pkg_get_sig(alpm_pkg_t *pkg, unsigned char **sig, size_t *sig_len) { - if(pkg != NULL) { - RET_ERR(pkg->handle, ALPM_ERR_WRONG_ARGS, -1); - } + ASSERT(pkg != NULL, return -1); if(pkg->base64_sig) { int ret = alpm_decode_signature(pkg->base64_sig, sig, sig_len); |