Index: /trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp	(revision 57665)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp	(revision 57666)
@@ -83,9 +83,7 @@
     void run();
 
-    /** Info about wanted certificate. */
+    /** Additinoal download nfo about wanted certificate. */
     typedef struct CERTINFO
     {
-        /** Set if mandatory. */
-        bool        fMandatory;
         /** Filename in the zip file we download (PEM). */
         const char *pszZipFile;
@@ -100,5 +98,5 @@
     static int applyRawHeaders(RTHTTP hHttp, const QList<QByteArray> &headers, const QNetworkRequest &request);
     static unsigned countCertsFound(bool const *pafFoundCerts);
-    static bool areAllCertsFound(bool const *pafFoundCerts, bool fOnlyMandatory);
+    static bool areAllCertsFound(bool const *pafFoundCerts);
     static void refreshCertificates(RTHTTP hHttp, RTCRSTORE hOldStore, bool *pafFoundCerts, const char *pszCaCertFile);
     static void downloadMissingCertificates(RTCRSTORE hNewStore, bool *pafNewFoundCerts, RTHTTP hHttp,
@@ -125,5 +123,4 @@
 /*static*/ const UINetworkReplyPrivateThread::CERTINFO UINetworkReplyPrivateThread::s_CertInfoPcaCls3Gen5 =
 {
-    /*.fMandatory     =*/   true,
     /*.pszZipFile     =*/
     "VeriSign Root Certificates/Generation 5 (G5) PCA/VeriSign Class 3 Public Primary Certification Authority - G5.pem",
@@ -293,5 +290,5 @@
          * Final verdict.
          */
-        if (areAllCertsFound(afCertsFound, true /*fOnlyMandatory*/))
+        if (areAllCertsFound(afCertsFound))
             rc = VINF_SUCCESS;
         else
@@ -429,22 +426,11 @@
  * @param   pafFoundCerts       Array parallel to s_aCerts with the status of
  *                              each wanted certificate.
- * @param   fOnlyMandatory      Only require mandatory certificates to be
- *                              present.  If false, all certificates must be
- *                              found before we return true.
  */
 /*static*/ bool
-UINetworkReplyPrivateThread::areAllCertsFound(bool const *pafFoundCerts, bool fOnlyMandatory)
-{
-    if (fOnlyMandatory)
-    {
-        for (uint32_t i = 0; i < RT_ELEMENTS(s_aCerts); i++)
-            if (   !pafFoundCerts[i]
-                && ((const CERTINFO *)s_aCerts[i].pvUser)->fMandatory)
-                return false;
-    }
-    else
-        for (uint32_t i = 0; i < RT_ELEMENTS(s_aCerts); i++)
-            if (!pafFoundCerts[i])
-                return false;
+UINetworkReplyPrivateThread::areAllCertsFound(bool const *pafFoundCerts)
+{
+    for (uint32_t i = 0; i < RT_ELEMENTS(s_aCerts); i++)
+        if (!pafFoundCerts[i])
+            return false;
     return true;
 }
@@ -481,5 +467,5 @@
             rc = RTCrStoreCertCheckWanted(hNewStore, s_aCerts, RT_ELEMENTS(s_aCerts), afNewFoundCerts);
             AssertLogRelRC(rc);
-            Assert(rc != VINF_SUCCESS || areAllCertsFound(afNewFoundCerts, false /*fOnlyMandatory*/));
+            Assert(rc != VINF_SUCCESS || areAllCertsFound(afNewFoundCerts));
             if (rc != VINF_SUCCESS)
             {
@@ -488,5 +474,5 @@
                                                      hOldStore, s_aCerts, RT_ELEMENTS(s_aCerts), afNewFoundCerts);
                 AssertLogRelRC(rc);
-                Assert(rc != VINF_SUCCESS || areAllCertsFound(afNewFoundCerts, false /*fOnlyMandatory*/));
+                Assert(rc != VINF_SUCCESS || areAllCertsFound(afNewFoundCerts));
             }
 
@@ -504,5 +490,5 @@
                 if (RTErrInfoIsSet(&StaticErrInfo.Core))
                     LogRel(("refreshCertificates/#2: %s\n", StaticErrInfo.Core.pszMsg));
-                Assert(rc != VINF_SUCCESS || areAllCertsFound(afNewFoundCerts, false /*fOnlyMandatory*/));
+                Assert(rc != VINF_SUCCESS || areAllCertsFound(afNewFoundCerts));
             }
 
@@ -517,8 +503,6 @@
              * replace the CA certs file.
              */
-            if (   areAllCertsFound(afNewFoundCerts, false /*fOnlyMandatory*/)
-                || (   countCertsFound(afNewFoundCerts) >= countCertsFound(pafOldFoundCerts)
-                    &&    areAllCertsFound(afNewFoundCerts, true /*fOnlyMandatory*/)
-                       >= areAllCertsFound(pafOldFoundCerts, true /*fOnlyMandatory*/) ) )
+            if (   areAllCertsFound(afNewFoundCerts)
+                || countCertsFound(afNewFoundCerts) >= countCertsFound(pafOldFoundCerts) )
             {
                 rc = RTCrStoreCertExportAsPem(hNewStore, 0 /*fFlags*/, pszCaCertFile);
@@ -583,5 +567,5 @@
                                  */
                                 pafNewFoundCerts[i] = true;
-                                if (areAllCertsFound(pafNewFoundCerts, false /*fOnlyMandator*/) == VINF_SUCCESS)
+                                if (areAllCertsFound(pafNewFoundCerts))
                                 {
                                     RTHttpFreeResponse(pvRootsZip);
