ANDROID: dm: android-verity: fix signature verification flag
authorBadhri Jagan Sridharan <Badhri@google.com>
Fri, 20 May 2016 23:44:19 +0000 (16:44 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Mon, 18 Dec 2017 15:41:22 +0000 (21:11 +0530)
The bug was that the signature verification was only
happening when verity was disabled. It should always
happen when verity is enabled.

Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Change-Id: I2d9354e240d36ea06fc68c2d18d8e87b823a4c2f
(cherry picked from commit 5364b5ca0b1a12a58283b51408e43fc36d4e4fe7)

drivers/md/dm-android-verity.c

index 9c26cbb5f1797b8c6a441cb919efbf6d8c8bec48..00275a986d037d68d66f50ab6c41f8de979707c2 100644 (file)
@@ -667,7 +667,7 @@ static int android_verity_ctr(struct dm_target *ti, unsigned argc, char **argv)
                goto free_metadata;
        }
 
-       if (!verity_enabled) {
+       if (verity_enabled) {
                err = verify_verity_signature(key_id, metadata);
 
                if (err) {