- Timestamp:
- Oct 10, 2014 10:44:30 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyImage-win.cpp
r53022 r53024 1944 1944 #undef RESOLVE_CRYPT32_API 1945 1945 1946 #ifndef IN_SUP_HARDENED_R3 /** @todo don't ship this in the final build! */1947 volatile uint8_t abDebugHint1[4096] = { 0 };1948 volatile uint8_t abDebugHint2[4096] = { 0 };1949 #endif1950 1951 1946 /* 1952 1947 * Open the root store and look for the certificates we wish to use. … … 1970 1965 RTErrInfoInitStatic(&StaticErrInfo), 1971 1966 &g_RTAsn1DefaultAllocator, RTASN1CURSOR_FLAGS_DER, "CurCtx"); 1972 #ifndef IN_SUP_HARDENED_R3 /** @todo don't ship this in the final build! */1973 memcpy((void *)&abDebugHint2[0], (void *)&abDebugHint2[0], sizeof(abDebugHint2));1974 memset((void *)&abDebugHint1[0], 0, sizeof(abDebugHint1));1975 memcpy((void *)&abDebugHint1[0], pCurCtx->pbCertEncoded, RT_MIN(pCurCtx->cbCertEncoded, sizeof(abDebugHint1)));1976 abDebugHint1[8] ^= 0x55; abDebugHint1[8] ^= 0x55; abDebugHint1[1999] ^= 0xcc; abDebugHint1[1999] ^= 0xcc;1977 abDebugHint2[8] ^= 0x55; abDebugHint2[8] ^= 0x55; abDebugHint2[1999] ^= 0xcc; abDebugHint2[1999] ^= 0xcc;1978 RTAsn1CursorInitPrimary(&PrimaryCursor, pCurCtx->pbCertEncoded, pCurCtx->cbCertEncoded,1979 RTErrInfoInitStatic(&StaticErrInfo),1980 &g_RTAsn1EFenceAllocator, RTASN1CURSOR_FLAGS_DER, "CurCtx");1981 #endif1982 1967 RTCRX509CERTIFICATE MyCert; 1983 1968 int rc = RTCrX509Certificate_DecodeAsn1(&PrimaryCursor.Cursor, 0, &MyCert, "Cert"); … … 2003 1988 else if (rc != VERR_ASN1_INVALID_UTC_TIME_ENCODING) 2004 1989 AssertMsgFailed(("RTCrX509Certificate_DecodeAsn1 failed: rc=%#x: %s\n", rc, StaticErrInfo.szMsg)); 2005 #ifndef IN_SUP_HARDENED_R3 /** @todo don't ship this in the final build! */2006 abDebugHint1[999] ^= 0x63; abDebugHint1[999] ^= 0x63;2007 abDebugHint2[999] ^= 0x63; abDebugHint2[999] ^= 0x63;2008 #endif2009 1990 } 2010 1991 } … … 2012 1993 g_fHaveOtherRoots = true; 2013 1994 } 2014 #ifndef IN_SUP_HARDENED_R3 /** @todo don't ship this in the final build! */2015 abDebugHint1[2048] ^= 0x88; abDebugHint1[2048] ^= 0x88;2016 abDebugHint2[2048] ^= 0x88; abDebugHint2[2048] ^= 0x88;2017 #endif2018 1995 SUP_DPRINTF(("supR3HardenedWinRetrieveTrustedRootCAs: cAdded=%u\n", cAdded)); 2019 1996 }
Note:
See TracChangeset
for help on using the changeset viewer.