Changeset 74707 in vbox for trunk/src/VBox/Runtime/common/ldr
- Timestamp:
- Oct 9, 2018 8:36:39 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 125628
- Location:
- trunk/src/VBox/Runtime/common/ldr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/ldr/ldrMachO.cpp
r74676 r74707 3966 3966 3967 3967 /** 3968 * @interface_method_impl{RTLDROPS,pfnVerifySignature} 3969 */ 3970 static DECLCALLBACK(int) 3971 rtldrMachO_VerifySignature(PRTLDRMODINTERNAL pMod, PFNRTLDRVALIDATESIGNEDDATA pfnCallback, void *pvUser, PRTERRINFO pErrInfo) 3972 { 3973 #ifndef IPRT_WITHOUT_LDR_VERIFY 3974 PRTLDRMODMACHO pThis = RT_FROM_MEMBER(pMod, RTLDRMODMACHO, Core); 3975 3976 int rc = rtldrMachO_LoadSignatureBlob(pThis); 3977 if (RT_SUCCESS(rc)) 3978 { 3979 RT_NOREF(pfnCallback, pvUser, pErrInfo); 3980 #if 0 3981 int rc = rtldrPE_VerifySignatureImagePrecoditions(pModPe, pErrInfo); 3982 if (RT_SUCCESS(rc)) 3983 { 3984 PRTLDRPESIGNATURE pSignature = NULL; 3985 rc = rtldrPE_VerifySignatureRead(pModPe, &pSignature, pErrInfo); 3986 if (RT_SUCCESS(rc)) 3987 { 3988 rc = rtldrPE_VerifySignatureDecode(pModPe, pSignature, pErrInfo); 3989 if (RT_SUCCESS(rc)) 3990 rc = rtldrPE_VerifySignatureValidateHash(pModPe, pSignature, pErrInfo); 3991 if (RT_SUCCESS(rc)) 3992 { 3993 rc = pfnCallback(&pModPe->Core, RTLDRSIGNATURETYPE_PKCS7_SIGNED_DATA, 3994 &pSignature->ContentInfo, sizeof(pSignature->ContentInfo), 3995 pErrInfo, pvUser); 3996 } 3997 rtldrPE_VerifySignatureDestroy(pModPe, pSignature); 3998 } 3999 } 4000 #endif 4001 } 4002 return rc; 4003 #else 4004 RT_NOREF_PV(pMod); RT_NOREF_PV(pfnCallback); RT_NOREF_PV(pvUser); RT_NOREF_PV(pErrInfo); 4005 return VERR_NOT_SUPPORTED; 4006 #endif 4007 } 4008 4009 4010 /** 3968 4011 * Operations for a Mach-O module interpreter. 3969 4012 */ … … 3989 4032 rtldrMachO_ReadDbgInfo, 3990 4033 rtldrMachO_QueryProp, 3991 NULL /*pfnVerifySignature*/,4034 rtldrMachO_VerifySignature, 3992 4035 NULL /*pfnHashImage*/, 3993 4036 NULL /*pfnUnwindFrame*/, -
trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp
r74638 r74707 2840 2840 * 2841 2841 * Seems the difference between V1 and V2 page hash attributes is 2842 * that v1 uses SHA-1 while v2 uses SHA-256. The data structures to2843 * be identical otherwise. Initially we assumed the digest2842 * that v1 uses SHA-1 while v2 uses SHA-256. The data structures 2843 * seems to be identical otherwise. Initially we assumed the digest 2844 2844 * algorithm was supposed to be RTCRSPCINDIRECTDATACONTENT::DigestInfo, 2845 2845 * i.e. the same as for the whole image hash. The initial approach
Note:
See TracChangeset
for help on using the changeset viewer.