mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
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>
This commit is contained in:
parent
c5c1a1349a
commit
b952a3b08c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user