]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-alpine: fix verification of apk.static binary
authorNatanael Copa <ncopa@alpinelinux.org>
Mon, 3 Aug 2015 11:40:25 +0000 (13:40 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 13 Aug 2015 20:01:52 +0000 (16:01 -0400)
We need specify which hashing algorithm was used to create the signature
we check.

Fixes #609

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
templates/lxc-alpine.in

index 963c42a995c9323eddf81f6bbdc2655bb5ab18b1..6dcc51b2a9c64ffb93cb5e30b4203f406d5416b9 100644 (file)
@@ -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