[pacman-dev] [PATCH 1/1] libalpm: add default switch case to handle unknown pubkey algorithm

Allan McRae allan at archlinux.org
Thu Jun 12 02:24:11 EDT 2014


On 11/06/14 23:37, Christian Hesse wrote:
> ---
>  lib/libalpm/signing.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
> index 8fb909d..a7a70f6 100644
> --- a/lib/libalpm/signing.c
> +++ b/lib/libalpm/signing.c
> @@ -348,6 +348,11 @@ static int key_search(alpm_handle_t *handle, const char *fpr,
>  #endif
>  			pgpkey->pubkey_algo = 'E';
>  			break;
> +
> +		default:
> +			_alpm_log(handle, ALPM_LOG_DEBUG, "unknown public key algorithm\n");
> +			ret = 0;
> +			goto gpg_error;
>  	}
>  
>  	ret = 1;
> 

I like how we got a compile failure on the last gpgme update to flag we
needed to deal with the new enum value.  So I am not sure about adding
the default here.


More information about the pacman-dev mailing list