summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/signing.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/signing.c')
-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)