VirtualBox

Ignore:
Timestamp:
Jul 3, 2014 11:51:54 PM (10 years ago)
Author:
vboxsync
Message:

page hash updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/crypto/spc-core.cpp

    r51770 r51862  
    3939
    4040
    41 RTDECL(int) RTCrSpcSerializedPageHashesV2_UpdateDerivedData(PRTCRSPCSERIALIZEDPAGEHASHESV2 pThis)
     41RTDECL(int) RTCrSpcSerializedPageHashes_UpdateDerivedData(PRTCRSPCSERIALIZEDPAGEHASHES pThis)
    4242{
    43     pThis->pData = (PCRTCRSPCPEIMAGEPAGEHASHESV2)pThis->RawData.Asn1Core.uData.pv;
     43    pThis->pData = (PCRTCRSPCPEIMAGEPAGEHASHES)pThis->RawData.Asn1Core.uData.pv;
    4444    return VINF_SUCCESS;
    4545}
     
    5050 */
    5151
    52 RTDECL(PCRTCRSPCSERIALIZEDOBJECTATTRIBUTE) RTCrSpcIndirectDataContent_GetPeImageHashesV2(PCRTCRSPCINDIRECTDATACONTENT pIndData)
     52RTDECL(PCRTCRSPCSERIALIZEDOBJECTATTRIBUTE)
     53RTCrSpcIndirectDataContent_GetPeImageObjAttrib(PCRTCRSPCINDIRECTDATACONTENT pThis,
     54                                               RTCRSPCSERIALIZEDOBJECTATTRIBUTETYPE enmType)
    5355{
    54     if (pIndData->Data.enmType == RTCRSPCAAOVTYPE_PE_IMAGE_DATA)
     56    if (pThis->Data.enmType == RTCRSPCAAOVTYPE_PE_IMAGE_DATA)
    5557    {
    56         Assert(RTAsn1ObjId_CompareWithString(&pIndData->Data.Type, RTCRSPCPEIMAGEDATA_OID) == 0);
     58        Assert(RTAsn1ObjId_CompareWithString(&pThis->Data.Type, RTCRSPCPEIMAGEDATA_OID) == 0);
    5759
    58         if (   pIndData->Data.uValue.pPeImage
    59             && pIndData->Data.uValue.pPeImage->T0.File.enmChoice == RTCRSPCLINKCHOICE_MONIKER
    60             && RTCrSpcSerializedObject_IsPresent(pIndData->Data.uValue.pPeImage->T0.File.u.pMoniker) )
     60        if (   pThis->Data.uValue.pPeImage
     61            && pThis->Data.uValue.pPeImage->T0.File.enmChoice == RTCRSPCLINKCHOICE_MONIKER
     62            && RTCrSpcSerializedObject_IsPresent(pThis->Data.uValue.pPeImage->T0.File.u.pMoniker) )
    6163        {
    62             if (pIndData->Data.uValue.pPeImage->T0.File.u.pMoniker->enmType == RTCRSPCSERIALIZEDOBJECTTYPE_ATTRIBUTES)
     64            if (pThis->Data.uValue.pPeImage->T0.File.u.pMoniker->enmType == RTCRSPCSERIALIZEDOBJECTTYPE_ATTRIBUTES)
    6365            {
    64                 Assert(RTUuidCompareStr(pIndData->Data.uValue.pPeImage->T0.File.u.pMoniker->Uuid.Asn1Core.uData.pUuid,
     66                Assert(RTUuidCompareStr(pThis->Data.uValue.pPeImage->T0.File.u.pMoniker->Uuid.Asn1Core.uData.pUuid,
    6567                                        RTCRSPCSERIALIZEDOBJECT_UUID_STR) == 0);
    66                 PCRTCRSPCSERIALIZEDOBJECTATTRIBUTES pData = pIndData->Data.uValue.pPeImage->T0.File.u.pMoniker->u.pData;
     68                PCRTCRSPCSERIALIZEDOBJECTATTRIBUTES pData = pThis->Data.uValue.pPeImage->T0.File.u.pMoniker->u.pData;
    6769                if (pData)
    68                 {
    6970                    for (uint32_t i = 0; i < pData->cItems; i++)
    70                     {
    71                         if (pData->paItems[i].enmType == RTCRSPCSERIALIZEDOBJECTATTRIBUTETYPE_PAGE_HASHES_V2)
    72                         {
    73                             Assert(RTAsn1ObjId_CompareWithString(&pData->paItems[i].Type, RTCRSPC_PE_IMAGE_HASHES_V2_OID) == 0);
     71                        if (pData->paItems[i].enmType == enmType)
    7472                            return &pData->paItems[i];
    75                         }
    76                     }
    77                 }
    7873            }
    7974        }
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