VirtualBox

Changeset 51819 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Jul 2, 2014 6:20:33 PM (11 years ago)
Author:
vboxsync
Message:

timestamp tweak.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyImage-win.cpp

    r51818 r51819  
    148148 *  SUP_MAKE_NT_VER_SIMPLE. */
    149149uint32_t                    g_uNtVerCombined;
     150#endif
     151
     152#ifdef IN_RING3
     153/** Timestamp hack working around issues with old DLLs that we ship. */
     154static uint64_t             g_uBuildTimestampHack = 0;
    150155#endif
    151156
     
    852857             * certificate validation date.  We must query that first to avoid
    853858             * potential issues re-entering the loader code from the callback.
     859             *
     860             * Update: Save the first timestamp we validate with build cert and
     861             *         use this as a minimum timestamp for further build cert
     862             *         validations.  This works around issues with old DLLs that
     863             *         we sign against with our certificate (crt, sdl, qt).
    854864             */
    855865            rc = RTLdrQueryProp(hLdrMod, RTLDRPROP_TIMESTAMP_SECONDS, &pNtViRdr->uTimestamp, sizeof(pNtViRdr->uTimestamp));
    856866            if (RT_SUCCESS(rc))
    857867            {
     868#ifdef IN_RING3
     869                if ((fFlags & SUPHNTVI_F_REQUIRE_BUILD_CERT) && pNtViRdr->uTimestamp < g_uBuildTimestampHack)
     870                    pNtViRdr->uTimestamp = g_uBuildTimestampHack;
     871#endif
     872
    858873                rc = RTLdrVerifySignature(hLdrMod, supHardNtViCallback, pNtViRdr, pErrInfo);
     874
     875#ifdef IN_RING3
     876                if ((fFlags & SUPHNTVI_F_REQUIRE_BUILD_CERT) && g_uBuildTimestampHack == 0 && RT_SUCCESS(rc))
     877                    g_uBuildTimestampHack = pNtViRdr->uTimestamp;
     878#endif
     879
    859880
    860881                /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette