Changeset 52537 in vbox for trunk/src/VBox/HostDrivers
- Timestamp:
- Aug 31, 2014 7:28:17 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyImage-win.cpp
r52529 r52537 874 874 */ 875 875 static DECLCALLBACK(int) supHardNtViCertVerifyCallback(PCRTCRX509CERTIFICATE pCert, RTCRX509CERTPATHS hCertPaths, 876 void *pvUser, PRTERRINFO pErrInfo)876 uint32_t fFlags, void *pvUser, PRTERRINFO pErrInfo) 877 877 { 878 878 PSUPHNTVIRDR pNtViRdr = (PSUPHNTVIRDR)pvUser; … … 894 894 * Standard code signing capabilites required. 895 895 */ 896 int rc = RTCrPkcs7VerifyCertCallbackCodeSigning(pCert, hCertPaths, NULL, pErrInfo); 897 if (RT_SUCCESS(rc)) 896 int rc = RTCrPkcs7VerifyCertCallbackCodeSigning(pCert, hCertPaths, fFlags, NULL, pErrInfo); 897 if ( RT_SUCCESS(rc) 898 && (fFlags & RTCRPKCS7VCC_F_SIGNED_DATA)) 898 899 { 899 900 /* … … 992 993 993 994 /* 994 * Verify the signature. 995 * Verify the signature. We instruct the verifier to use the signing time 996 * counter signature present when present, falling back on the timestamp 997 * planted by the linker when absent. In ring-0 we don't have all the 998 * necessary timestamp server root certificate info, so we have to allow 999 * using counter signatures unverified there. 995 1000 */ 996 1001 RTTIMESPEC ValidationTime; 997 1002 RTTimeSpecSetSeconds(&ValidationTime, pNtViRdr->uTimestamp); 998 1003 999 return RTCrPkcs7VerifySignedData(pContentInfo, 0, g_hSpcAndNtKernelSuppStore, g_hSpcAndNtKernelRootStore, &ValidationTime, 1000 supHardNtViCertVerifyCallback, pNtViRdr, pErrInfo); 1004 uint32_t fFlags = RTCRPKCS7VERIFY_SD_F_ALWAYS_USE_SIGNING_TIME_IF_PRESENT 1005 | RTCRPKCS7VERIFY_SD_F_COUNTER_SIGNATURE_SIGNING_TIME_ONLY; 1006 #ifdef IN_RING0 1007 fFlags |= RTCRPKCS7VERIFY_SD_F_USE_SIGNING_TIME_UNVERIFIED; 1008 #endif 1009 return RTCrPkcs7VerifySignedData(pContentInfo, fFlags, g_hSpcAndNtKernelSuppStore, g_hSpcAndNtKernelRootStore, 1010 &ValidationTime, supHardNtViCertVerifyCallback, pNtViRdr, pErrInfo); 1001 1011 } 1002 1012
Note:
See TracChangeset
for help on using the changeset viewer.