ANDROID: dm: android-verity: use default verity public key
authorBadhri Jagan Sridharan <Badhri@google.com>
Fri, 20 May 2016 23:45:45 +0000 (16:45 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Mon, 18 Dec 2017 15:41:22 +0000 (21:11 +0530)
commit19263573b3eceebd930f823ef8dd4c229a47482f
tree27fa89fe6e82a21537d067cb683ae7bc39d2ba86
parent6d3f1f949f9d846b364bc8a6f61d27f355d24300
ANDROID: dm: android-verity: use default verity public key

If the dm-android-verity target does not provide a default
key try using the default public key from the system keyring.
The defualt verity keyid is passed as a kernel command line
argument veritykeyid=.

The order of the dm-android-verity params have been reversed
to facilitate the change.

Old format example:
dm="system none ro,0 1 android-verity Android:#7e4333f9bba00adfe0ede979e28ed1920492b40f /dev/mmcblk0p43"

New formats supported:
dm="system none ro,0 1 android-verity /dev/mmcblk0p43 Android:#7e4333f9bba00adfe0ede979e28ed1920492b40f"

(or)

dm="system none ro,0 1 android-verity /dev/mmcblk0p43"
when veritykeyid= is set in the kernel command line.

BUG: 28384658
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Change-Id: I506c89b053d835ab579e703eef2bc1f8487250de
(cherry picked from commit c5c74d0327729f35b576564976885596c6d0e7fb)
drivers/md/dm-android-verity.c
drivers/md/dm-android-verity.h