+static VOID WarnSecureBootError(CHAR16 *Name, BOOLEAN Verbose) {
+ if (Name == NULL)
+ Name = L"the loader";
+
+ refit_call2_wrapper(ST->ConOut->SetAttribute, ST->ConOut, ATTR_ERROR);
+ Print(L"Secure Boot validation failure loading %s!\n", Name);
+ refit_call2_wrapper(ST->ConOut->SetAttribute, ST->ConOut, ATTR_BASIC);
+ if (Verbose && secure_mode()) {
+ Print(L"\nThis computer is configured with Secure Boot active, but\n%s has failed validation.\n", Name);
+ Print(L"\nYou can:\n * Launch another boot loader\n");
+ Print(L" * Disable Secure Boot in your firmware\n");
+ Print(L" * Sign %s with a machine owner key (MOK)\n", Name);
+ Print(L" * Use a MOK utility (often present on the second row) to add a MOK with which\n");
+ Print(L" %s has already been signed.\n", Name);
+ Print(L" * Use a MOK utility to register %s (\"enroll its hash\") without\n", Name);
+ Print(L" signing it.\n");
+ Print(L"\nSee http://www.rodsbooks.com/refind/secureboot.html for more information\n");
+ PauseForKey();
+ } // if
+} // VOID WarnSecureBootError()
+