Skip to content
Browse files

MOK doesn't include the signature owner

  • Loading branch information...
1 parent 5abe73a commit 0c6a8a7501f2eb4e751c33090c6763044d131b96 @lcp lcp committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 MokManager.c
View
4 MokManager.c
@@ -124,7 +124,7 @@ static MokListNode *build_mok_list(UINT32 num, void *Data, UINTN DataSize) {
Cert = (EFI_SIGNATURE_DATA *) (((UINT8 *) CertList) +
sizeof (EFI_SIGNATURE_LIST) + CertList->SignatureHeaderSize);
- list[count].MokSize = CertList->SignatureSize;
+ list[count].MokSize = CertList->SignatureSize - sizeof(EFI_GUID);
list[count].Mok = (void *)Cert->SignatureData;
count++;
@@ -317,7 +317,7 @@ static void show_mok_info (void *Mok, UINTN MokSize)
if (!Mok || MokSize == 0)
return;
- if (MokSize != 48) {
+ if (MokSize != SHA256_DIGEST_SIZE) {
if (X509ConstructCertificate(Mok, MokSize,
(UINT8 **) &X509Cert) && X509Cert != NULL) {
show_x509_info(X509Cert);

0 comments on commit 0c6a8a7

Please sign in to comment.
Something went wrong with that request. Please try again.