SecurityPkg: SecureBootConfigDxe: Support AUTH_2 enrollment to DBX
[mirror_edk2.git] / SecurityPkg / VariableAuthenticated / SecureBootConfigDxe / SecureBootConfig.vfr
index 6f46d910333c9185f8dc380a736db516b5a7abb6..bbecff2b085dfa83a867283fc34b286ddb9dd9eb 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   VFR file used by the SecureBoot configuration component.\r
 \r
-Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -446,24 +446,42 @@ formset
     label LABEL_END;\r
     subtitle text = STRING_TOKEN(STR_NULL);\r
 \r
-    string  varid   = SECUREBOOT_CONFIGURATION.SignatureGuid,\r
-            prompt  = STRING_TOKEN(STR_SECURE_BOOT_SIGNATURE_GUID),\r
-            help    = STRING_TOKEN(STR_SECURE_BOOT_SIGNATURE_GUID_HELP),\r
-            flags   = INTERACTIVE,\r
-            key     = KEY_SECURE_BOOT_SIGNATURE_GUID_DBX,\r
-            minsize = SECURE_BOOT_GUID_SIZE,\r
-            maxsize = SECURE_BOOT_GUID_SIZE,\r
-    endstring;\r
+    grayoutif ideqval SECUREBOOT_CONFIGURATION.FileEnrollType == 3;\r
+      string  varid   = SECUREBOOT_CONFIGURATION.SignatureGuid,\r
+              prompt  = STRING_TOKEN(STR_SECURE_BOOT_SIGNATURE_GUID),\r
+              help    = STRING_TOKEN(STR_SECURE_BOOT_SIGNATURE_GUID_HELP),\r
+              flags   = INTERACTIVE,\r
+              key     = KEY_SECURE_BOOT_SIGNATURE_GUID_DBX,\r
+              minsize = SECURE_BOOT_GUID_SIZE,\r
+              maxsize = SECURE_BOOT_GUID_SIZE,\r
+      endstring;\r
+    endif;\r
 \r
-    oneof name = SignatureFormatInDbx,\r
-          varid       = SECUREBOOT_CONFIGURATION.CertificateFormat,\r
-          prompt      = STRING_TOKEN(STR_DBX_CERTIFICATE_FORMAT_PROMPT),\r
-          help        = STRING_TOKEN(STR_DBX_CERTIFICATE_FORMAT_HELP),\r
-          option text = STRING_TOKEN(STR_DBX_CERTIFICATE_FORMAT_SHA256), value = 0x1, flags = DEFAULT;\r
-          option text = STRING_TOKEN(STR_DBX_CERTIFICATE_FORMAT_SHA384), value = 0x2, flags = 0;\r
-          option text = STRING_TOKEN(STR_DBX_CERTIFICATE_FORMAT_SHA512), value = 0x3, flags = 0;\r
-          option text = STRING_TOKEN(STR_DBX_CERTIFICATE_FORMAT_RAW), value = 0x4, flags = 0;\r
-    endoneof;\r
+    disableif NOT ideqval SECUREBOOT_CONFIGURATION.FileEnrollType == 1;\r
+      oneof name = X509SignatureFormatInDbx,\r
+            varid       = SECUREBOOT_CONFIGURATION.CertificateFormat,\r
+            prompt      = STRING_TOKEN(STR_DBX_CERTIFICATE_FORMAT_PROMPT),\r
+            help        = STRING_TOKEN(STR_DBX_CERTIFICATE_FORMAT_HELP),\r
+            option text = STRING_TOKEN(STR_DBX_CERTIFICATE_FORMAT_SHA256), value = 0x1, flags = DEFAULT;\r
+            option text = STRING_TOKEN(STR_DBX_CERTIFICATE_FORMAT_SHA384), value = 0x2, flags = 0;\r
+            option text = STRING_TOKEN(STR_DBX_CERTIFICATE_FORMAT_SHA512), value = 0x3, flags = 0;\r
+            option text = STRING_TOKEN(STR_DBX_CERTIFICATE_FORMAT_RAW), value = 0x4, flags = 0;\r
+      endoneof;\r
+    endif;\r
+\r
+    disableif NOT ideqval SECUREBOOT_CONFIGURATION.FileEnrollType == 2;\r
+      text\r
+        help   = STRING_TOKEN(STR_DBX_PE_IMAGE_FORMAT_HELP),          // Help string\r
+        text   = STRING_TOKEN(STR_DBX_CERTIFICATE_FORMAT_PROMPT),     // Prompt string\r
+        text   = STRING_TOKEN(STR_DBX_PE_FORMAT_SHA256);              // PE image type\r
+    endif;\r
+\r
+    disableif NOT ideqval SECUREBOOT_CONFIGURATION.FileEnrollType == 3;\r
+      text\r
+        help   = STRING_TOKEN(STR_DBX_AUTH_2_FORMAT_HELP),            // Help string\r
+        text   = STRING_TOKEN(STR_DBX_CERTIFICATE_FORMAT_PROMPT),     // Prompt string\r
+        text   = STRING_TOKEN(STR_DBX_AUTH_2_FORMAT);                 // AUTH_2 image type\r
+    endif;\r
 \r
     suppressif ideqval SECUREBOOT_CONFIGURATION.CertificateFormat == 4;\r
         checkbox varid  = SECUREBOOT_CONFIGURATION.AlwaysRevocation,\r