[lxc-devel] [PATCH] lxc-alpine: fix verification of apk.static binary

Stéphane Graber stgraber at ubuntu.com
Tue Aug 4 12:25:04 UTC 2015


On Mon, Aug 03, 2015 at 01:40:25PM +0200, Natanael Copa wrote:
> We need specify which hashing algorithm was used to create the signature
> we check.
> 
> Fixes #609
> 
> Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

> ---
> This should also go to the stable-1.0 and stable-1.1 branches.
> 
>  templates/lxc-alpine.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/templates/lxc-alpine.in b/templates/lxc-alpine.in
> index 963c42a..6dcc51b 100644
> --- a/templates/lxc-alpine.in
> +++ b/templates/lxc-alpine.in
> @@ -83,7 +83,7 @@ get_static_apk () {
>  
>      # verify the static apk binary signature
>      APK=$rootfs/sbin/apk.static
> -    openssl dgst -verify $rootfs/etc/apk/keys/$keyname \
> +    openssl dgst -sha1 -verify $rootfs/etc/apk/keys/$keyname \
>          -signature "$APK.SIGN.RSA.$keyname" "$APK" || return 1
>  
>      if [ "$auto_repo_dir" ]; then
> -- 
> 2.5.0
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20150804/4a20f231/attachment.sig>


More information about the lxc-devel mailing list