summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-17 02:51:21 +0200
committerDan McGee <dan@archlinux.org>2011-08-17 02:51:21 +0200
commitb952a3b08c778e1505032b55476e8956c38aead8 (patch)
treefe50d0e0ec86fc4d116f31f3cee23c397555a0cb /lib
parentc5c1a1349af5fc98766771cc1d9e61df50b8a44d (diff)
downloadpacman-b952a3b08c778e1505032b55476e8956c38aead8.tar.gz
pacman-b952a3b08c778e1505032b55476e8956c38aead8.tar.xz
Fix compilation using --without-gpgme
This function is used regardless of whether gpgme support is enabled, so make sure it is always accessible. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/signing.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
index cdbdc31a..28ce6209 100644
--- a/lib/libalpm/signing.c
+++ b/lib/libalpm/signing.c
@@ -186,28 +186,6 @@ error:
return 1;
}
-
-/**
- * Form a signature path given a file path.
- * Caller must free the result.
- * @param handle the context handle
- * @param path the full path to a file
- * @return the path with '.sig' appended, NULL on errors
- */
-char *_alpm_sigpath(alpm_handle_t *handle, const char *path)
-{
- char *sigpath;
- size_t len;
-
- if(!path) {
- return NULL;
- }
- len = strlen(path) + 5;
- CALLOC(sigpath, len, sizeof(char), RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
- sprintf(sigpath, "%s.sig", path);
- return sigpath;
-}
-
/**
* Check the PGP signature for the given file path.
* If base64_sig is provided, it will be used as the signature data after
@@ -437,6 +415,27 @@ int _alpm_gpgme_checksig(alpm_handle_t UNUSED *handle, const char UNUSED *path,
}
#endif
+/**
+ * Form a signature path given a file path.
+ * Caller must free the result.
+ * @param handle the context handle
+ * @param path the full path to a file
+ * @return the path with '.sig' appended, NULL on errors
+ */
+char *_alpm_sigpath(alpm_handle_t *handle, const char *path)
+{
+ char *sigpath;
+ size_t len;
+
+ if(!path) {
+ return NULL;
+ }
+ len = strlen(path) + 5;
+ CALLOC(sigpath, len, sizeof(char), RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
+ sprintf(sigpath, "%s.sig", path);
+ return sigpath;
+}
+
int _alpm_check_pgp_helper(alpm_handle_t *handle, const char *path,
const char *base64_sig, int optional, int marginal, int unknown,
enum _alpm_errno_t invalid_err)