Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/signing.c
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-11-03 01:16:32 +1000
committerAllan McRae <allan@archlinux.org>2013-02-09 12:43:37 +1000
commit5f5469c7746ee1699433060030bbd2e6ee43ced7 (patch)
tree7fa20de201d4480883a2e7984a0ce21d1567e9cf /lib/libalpm/signing.c
parent0d89c10f4b12cb574223a23776c26144c6bceccd (diff)
Import key if needed when installing package from file
When installing a package with "pacman -U" that has a detached signature, check if the needed key is in the keyring and download if necessary. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/signing.c')
-rw-r--r--lib/libalpm/signing.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
index aa7e134a..a57c9463 100644
--- a/lib/libalpm/signing.c
+++ b/lib/libalpm/signing.c
@@ -192,6 +192,11 @@ int _alpm_key_in_keychain(alpm_handle_t *handle, const char *fpr)
gpgme_key_t key;
int ret = -1;
+ if(init_gpgme(handle)) {
+ /* pm_errno was set in gpgme_init() */
+ goto error;
+ }
+
memset(&ctx, 0, sizeof(ctx));
err = gpgme_new(&ctx);
CHECK_ERR();