platform/x86: think-lmi: Certificate authentication support
authorMark Pearson <markpearson@lenovo.com>
Thu, 17 Mar 2022 21:40:08 +0000 (17:40 -0400)
committerHans de Goede <hdegoede@redhat.com>
Fri, 18 Mar 2022 11:22:40 +0000 (12:22 +0100)
commitb49f72e7f96d4ed147447428f2ae5b4cea598ca7
treeb1fc43518a5362185279cd0167acf20b5d022598
parent06384573a3e8335ac6797577e545c33dbf91b490
platform/x86: think-lmi: Certificate authentication support

Implementation of certificate authentication feature for Lenovo
platforms. This allows for signed updates of BIOS settings.

Functionality supported:
 - Cert support available check. At initialisation check if BIOS
   supports certification authentication and if a certificate is
   installed. Enable the sysfs nodes appropriately
 - certificate and signature authentication attributes to enable
   a user to install, update and delete a certificate using signed
   signatures
 - certificate_thumbprint to confirm installed certificate details
 - support to go from certificate to password based authentication
 - signature and save_signature attributes needed for setting BIOS
   attributes using certificate authentication.

Tested on X1 Carbon G10 and X1 Yoga G7. This feature is not
generally available yet but will be released later this year.

Note, I also cleaned up the formating of the GUIDs when I was adding
the new defines. Hope that's OK to combine in this commit.

Signed-off-by: Mark Pearson <markpearson@lenovo.com>
Link: https://lore.kernel.org/r/20220317214008.3459-2-markpearson@lenovo.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/think-lmi.c
drivers/platform/x86/think-lmi.h