Skip to content

Instantly share code, notes, and snippets.

@elboulangero
Created December 13, 2018 19:56
Show Gist options
  • Save elboulangero/d67f8b97f0fd7f3d125131b872e0b136 to your computer and use it in GitHub Desktop.
Save elboulangero/d67f8b97f0fd7f3d125131b872e0b136 to your computer and use it in GitHub Desktop.
ovmf/edk2 patch to make it allow enrolling keys with efitools
--- a/SecurityPkg/Library/AuthVariableLib/AuthService.c
+++ b/SecurityPkg/Library/AuthVariableLib/AuthService.c
@@ -1908,6 +1908,7 @@
// in VARIABLE_AUTHENTICATION_2 descriptor.
// This field has the fixed offset (+13) and be calculated based on two bytes of length encoding.
//
+#if 0
if ((Attributes & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) != 0) {
if (SigDataSize >= (13 + sizeof (mSha256OidValue))) {
if (((*(SigData + 1) & TWO_BYTE_ENCODE) != TWO_BYTE_ENCODE) ||
@@ -1916,6 +1917,7 @@
}
}
}
+#endif
//
// Find out the new data payload which follows Pkcs7 SignedData directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment