mirror of
https://github.com/moparisthebest/pacman
synced 2025-03-01 01:41:52 -05:00
Make key_in_keychain available in library
In preparation for checking key presence and downloading needed keys before conflict checking. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
c0835ff08e
commit
45b6d36cf7
@ -185,7 +185,7 @@ error:
|
|||||||
* @param fpr the fingerprint key ID to look up
|
* @param fpr the fingerprint key ID to look up
|
||||||
* @return 1 if key is known, 0 if key is unknown, -1 on error
|
* @return 1 if key is known, 0 if key is unknown, -1 on error
|
||||||
*/
|
*/
|
||||||
static int key_in_keychain(alpm_handle_t *handle, const char *fpr)
|
int _alpm_key_in_keychain(alpm_handle_t *handle, const char *fpr)
|
||||||
{
|
{
|
||||||
gpgme_error_t err;
|
gpgme_error_t err;
|
||||||
gpgme_ctx_t ctx;
|
gpgme_ctx_t ctx;
|
||||||
@ -633,10 +633,11 @@ error:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#else /* HAVE_LIBGPGME */
|
#else /* HAVE_LIBGPGME */
|
||||||
static int key_in_keychain(alpm_handle_t UNUSED *handle, const char UNUSED *fpr)
|
int _alpm_key_in_keychain(alpm_handle_t UNUSED *handle, const char UNUSED *fpr)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _alpm_gpgme_checksig(alpm_handle_t UNUSED *handle, const char UNUSED *path,
|
int _alpm_gpgme_checksig(alpm_handle_t UNUSED *handle, const char UNUSED *path,
|
||||||
const char UNUSED *base64_sig, alpm_siglist_t UNUSED *siglist)
|
const char UNUSED *base64_sig, alpm_siglist_t UNUSED *siglist)
|
||||||
{
|
{
|
||||||
@ -812,7 +813,7 @@ int _alpm_process_siglist(alpm_handle_t *handle, const char *identifier,
|
|||||||
case ALPM_SIGSTATUS_KEY_UNKNOWN:
|
case ALPM_SIGSTATUS_KEY_UNKNOWN:
|
||||||
/* ensure this key is still actually unknown; we may have imported it
|
/* ensure this key is still actually unknown; we may have imported it
|
||||||
* on an earlier call to this function. */
|
* on an earlier call to this function. */
|
||||||
if(key_in_keychain(handle, result->key.fingerprint) == 1) {
|
if(_alpm_key_in_keychain(handle, result->key.fingerprint) == 1) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
_alpm_log(handle, ALPM_LOG_ERROR,
|
_alpm_log(handle, ALPM_LOG_ERROR,
|
||||||
|
@ -31,6 +31,8 @@ int _alpm_check_pgp_helper(alpm_handle_t *handle, const char *path,
|
|||||||
int _alpm_process_siglist(alpm_handle_t *handle, const char *identifier,
|
int _alpm_process_siglist(alpm_handle_t *handle, const char *identifier,
|
||||||
alpm_siglist_t *siglist, int optional, int marginal, int unknown);
|
alpm_siglist_t *siglist, int optional, int marginal, int unknown);
|
||||||
|
|
||||||
|
int _alpm_key_in_keychain(alpm_handle_t *handle, const char *fpr);
|
||||||
|
|
||||||
#endif /* _ALPM_SIGNING_H */
|
#endif /* _ALPM_SIGNING_H */
|
||||||
|
|
||||||
/* vim: set ts=2 sw=2 noet: */
|
/* vim: set ts=2 sw=2 noet: */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user