Changeset 53011 in vbox
- Timestamp:
- Oct 9, 2014 2:12:54 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyImage-win.cpp
r53005 r53011 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 #endif 1950 1946 1951 /* 1947 1952 * Open the root store and look for the certificates we wish to use. … … 1965 1970 RTErrInfoInitStatic(&StaticErrInfo), 1966 1971 &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 #endif 1967 1982 RTCRX509CERTIFICATE MyCert; 1968 1983 int rc = RTCrX509Certificate_DecodeAsn1(&PrimaryCursor.Cursor, 0, &MyCert, "Cert"); … … 1988 2003 else if (rc != VERR_ASN1_INVALID_UTC_TIME_ENCODING) 1989 2004 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 #endif 1990 2009 } 1991 2010 } … … 1993 2012 g_fHaveOtherRoots = true; 1994 2013 } 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 #endif 1995 2018 SUP_DPRINTF(("supR3HardenedWinRetrieveTrustedRootCAs: cAdded=%u\n", cAdded)); 1996 2019 }
Note:
See TracChangeset
for help on using the changeset viewer.