Index: /trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyImage-win.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyImage-win.cpp	(revision 55016)
+++ /trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyImage-win.cpp	(revision 55017)
@@ -1909,8 +1909,9 @@
  * Loads a module in the system32 directory.
  *
- * @returns Module handle on success. Won't return on faliure.
+ * @returns Module handle on success. Won't return on failure if fMandatory = true.
  * @param   pszName             The name of the DLL to load.
- */
-DECLHIDDEN(HMODULE) supR3HardenedWinLoadSystem32Dll(const char *pszName)
+ * @param   fMandatory          Whether the library is mandatory.
+ */
+DECLHIDDEN(HMODULE) supR3HardenedWinLoadSystem32Dll(const char *pszName, bool fMandatory)
 {
     WCHAR wszName[200+60];
@@ -1931,5 +1932,6 @@
         hMod = LoadLibraryExW(wszName, NULL, fFlags);
     }
-    if (hMod == NULL)
+    if (   hMod == NULL
+        && fMandatory)
         supR3HardenedFatal("Error loading '%s': %u [%ls]", pszName, RtlGetLastWin32Error(), wszName);
     return hMod;
@@ -1950,5 +1952,5 @@
      * Load crypt32.dll and resolve the APIs we need.
      */
-    HMODULE hCrypt32 = supR3HardenedWinLoadSystem32Dll("crypt32.dll");
+    HMODULE hCrypt32 = supR3HardenedWinLoadSystem32Dll("crypt32.dll", true /*fMandatory*/);
 
 #define RESOLVE_CRYPT32_API(a_Name, a_pfnType) \
@@ -2056,5 +2058,5 @@
      * Resolve the imports we need.
      */
-    HMODULE hWintrust = supR3HardenedWinLoadSystem32Dll("Wintrust.dll");
+    HMODULE hWintrust = supR3HardenedWinLoadSystem32Dll("Wintrust.dll", true /*fMandatory*/);
 #define RESOLVE_CRYPT_API(a_Name, a_pfnType, a_uMinWinVer) \
     do { \
@@ -2083,5 +2085,5 @@
      * make sure the providers are cached for later us.  Avoid recursion issues.
      */
-    HMODULE hBCrypt = supR3HardenedWinLoadSystem32Dll("bcrypt.dll");
+    HMODULE hBCrypt = supR3HardenedWinLoadSystem32Dll("bcrypt.dll", false /*fMandatory*/);
     if (hBCrypt)
     {
