Changeset 51862 in vbox for trunk/include
- Timestamp:
- Jul 3, 2014 11:51:54 PM (11 years ago)
- Location:
- trunk/include/iprt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/crypto/spc.h
r51770 r51862 42 42 43 43 /** 44 * PE Image page hash table, version 2. 45 */ 46 typedef union RTCRSPCPEIMAGEPAGEHASHESV2 44 * PE Image page hash table, generic union. 45 * 46 * @remarks This table isn't used by ldrPE.cpp, it walks the table in a generic 47 * fashion using the hash size. So, we can ditch it if we feel like it. 48 */ 49 typedef union RTCRSPCPEIMAGEPAGEHASHES 47 50 { 48 51 /** MD5 page hashes. */ … … 81 84 uint8_t abHash[RTSHA512_HASH_SIZE]; 82 85 } aSha512[1]; 83 } RTCRSPCPEIMAGEPAGEHASHES V2;84 /** Pointer to a version 2 PE image hash table. */85 typedef RTCRSPCPEIMAGEPAGEHASHES V2 *PRTCRSPCPEIMAGEPAGEHASHESV2;86 /** Pointer to a const version 2 PE image hash table. */87 typedef RTCRSPCPEIMAGEPAGEHASHES V2 const *PCRTCRSPCPEIMAGEPAGEHASHESV2;88 89 90 /** 91 * Serialization wrapper for raw RTCRSPCPEIMAGEPAGEHASHES V2data.92 */ 93 typedef struct RTCRSPCSERIALIZEDPAGEHASHES V286 } RTCRSPCPEIMAGEPAGEHASHES; 87 /** Pointer to a PE image page hash table union. */ 88 typedef RTCRSPCPEIMAGEPAGEHASHES *PRTCRSPCPEIMAGEPAGEHASHES; 89 /** Pointer to a const PE image page hash table union. */ 90 typedef RTCRSPCPEIMAGEPAGEHASHES const *PCRTCRSPCPEIMAGEPAGEHASHES; 91 92 93 /** 94 * Serialization wrapper for raw RTCRSPCPEIMAGEPAGEHASHES data. 95 */ 96 typedef struct RTCRSPCSERIALIZEDPAGEHASHES 94 97 { 95 98 /** The page hashes are within a set. Dunno if there could be multiple … … 100 103 101 104 /** Pointer to the hash data within that string. 102 * The hash algorithm is the same as for the full image hash and givenin103 * RTCR PKCS7SIGNEDDATA::SignerInfos.paSignerInfos[0].DigestAlgorithm as well as104 * in RTCRSPCINDIRECTDATACONTENT::DigestInfo.DigestAlgorithm. */105 PCRTCRSPCPEIMAGEPAGEHASHES V2pData;105 * The hash algorithm is given by the object attribute type in 106 * RTCRSPCSERIALIZEDOBJECTATTRIBUTE. It is generally the same as for the 107 * whole image hash. */ 108 PCRTCRSPCPEIMAGEPAGEHASHES pData; 106 109 /** Field the user can use to store the number of pages in pData. */ 107 110 uint32_t cPages; 108 } RTCRSPCSERIALIZEDPAGEHASHES V2;109 /** Pointer to a serialized object attribute. */110 typedef RTCRSPCSERIALIZEDPAGEHASHES V2 *PRTCRSPCSERIALIZEDPAGEHASHESV2;111 /** Pointer to a const serialized object attribute. */112 typedef RTCRSPCSERIALIZEDPAGEHASHES V2 const *PCRTCRSPCSERIALIZEDPAGEHASHESV2;113 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRSPCSERIALIZEDPAGEHASHES V2, RTDECL, RTCrSpcSerializedPageHashesV2, SetCore.Asn1Core);114 115 RTDECL(int) RTCrSpcSerializedPageHashes V2_UpdateDerivedData(PRTCRSPCSERIALIZEDPAGEHASHESV2pThis);111 } RTCRSPCSERIALIZEDPAGEHASHES; 112 /** Pointer to a serialized wrapper for page hashes. */ 113 typedef RTCRSPCSERIALIZEDPAGEHASHES *PRTCRSPCSERIALIZEDPAGEHASHES; 114 /** Pointer to a const serialized wrapper for page hashes. */ 115 typedef RTCRSPCSERIALIZEDPAGEHASHES const *PCRTCRSPCSERIALIZEDPAGEHASHES; 116 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRSPCSERIALIZEDPAGEHASHES, RTDECL, RTCrSpcSerializedPageHashes, SetCore.Asn1Core); 117 118 RTDECL(int) RTCrSpcSerializedPageHashes_UpdateDerivedData(PRTCRSPCSERIALIZEDPAGEHASHES pThis); 116 119 117 120 … … 127 130 /** Unknown object. */ 128 131 RTCRSPCSERIALIZEDOBJECTATTRIBUTETYPE_UNKNOWN, 129 /** Page hashes v2 (pPageHashesV2). */ 132 /** SHA-1 page hashes (pPageHashes). */ 133 RTCRSPCSERIALIZEDOBJECTATTRIBUTETYPE_PAGE_HASHES_V1, 134 /** SHA-256 page hashes (pPageHashes). */ 130 135 RTCRSPCSERIALIZEDOBJECTATTRIBUTETYPE_PAGE_HASHES_V2, 131 136 /** End of valid values. */ … … 153 158 /** The unknown value (RTCRSPCSERIALIZEDOBJECTATTRIBUTETYPE_UNKNOWN). */ 154 159 PRTASN1CORE pCore; 155 /** Page hashes v2 (RTCRSPCSERIALIZEDOBJECTATTRIBUTETYPE_PAGE_HASHES_V2). */ 156 PRTCRSPCSERIALIZEDPAGEHASHESV2 pPageHashesV2; 160 /** Page hashes (RTCRSPCSERIALIZEDOBJECTATTRIBUTETYPE_PAGE_HASHES_V1 or 161 * RTCRSPCSERIALIZEDOBJECTATTRIBUTETYPE_PAGE_HASHES_V2). */ 162 PRTCRSPCSERIALIZEDPAGEHASHES pPageHashes; 157 163 } u; 158 164 } RTCRSPCSERIALIZEDOBJECTATTRIBUTE; … … 468 474 469 475 /** 470 * Gets the PE image hash v2 SPC serialized object attribute if present. 471 * 472 * @returns Pointer to the attribute with Type RTCRSPC_PE_IMAGE_HASHES_V2_OID if 473 * found, NULL if not found. 474 * @param pIndData The Authenticode SpcIndirectDataContent. 475 */ 476 RTDECL(PCRTCRSPCSERIALIZEDOBJECTATTRIBUTE) RTCrSpcIndirectDataContent_GetPeImageHashesV2(PCRTCRSPCINDIRECTDATACONTENT pIndData); 476 * Gets the first SPC serialized object attribute in a SPC PE image. 477 * 478 * @returns Pointer to the attribute with the given type, NULL if not found. 479 * @param pThis The Authenticode SpcIndirectDataContent. 480 */ 481 RTDECL(PCRTCRSPCSERIALIZEDOBJECTATTRIBUTE) 482 RTCrSpcIndirectDataContent_GetPeImageObjAttrib(PCRTCRSPCINDIRECTDATACONTENT pThis, 483 RTCRSPCSERIALIZEDOBJECTATTRIBUTETYPE enmType); 477 484 478 485 /** @} */ -
trunk/include/iprt/err.h
r51800 r51862 2359 2359 /** Internal SPC error: Bad object moniker data pointer. */ 2360 2360 #define VERR_CR_SPC_MONIKER_BAD_DATA (-23412) 2361 /** Multiple v2 PE image page hash tables. */ 2362 #define VERR_CR_SPC_PEIMAGE_MULTIPLE_V2_HASH_TABS (-23413) 2363 /** Version 1 PE image page hash tables has not been implemented/tested. */ 2364 #define VERR_CR_SPC_PEIMAGE_V1_HASH_TABS_NOT_IMPL (-23414) 2361 /** Multiple PE image page hash tables. */ 2362 #define VERR_CR_SPC_PEIMAGE_MULTIPLE_HASH_TABS (-23413) 2365 2363 /** Unknown SPC PE image attribute. */ 2366 #define VERR_CR_SPC_PEIMAGE_UNKNOWN_ATTRIBUTE (-2341 5)2364 #define VERR_CR_SPC_PEIMAGE_UNKNOWN_ATTRIBUTE (-23414) 2367 2365 /** URL not expected in SPC PE image data. */ 2368 #define VERR_CR_SPC_PEIMAGE_URL_UNEXPECTED (-2341 6)2366 #define VERR_CR_SPC_PEIMAGE_URL_UNEXPECTED (-23415) 2369 2367 /** PE image data without any valid content was not expected. */ 2370 #define VERR_CR_SPC_PEIMAGE_NO_CONTENT (-2341 7)2368 #define VERR_CR_SPC_PEIMAGE_NO_CONTENT (-23416) 2371 2369 /** @} */ 2372 2370 -
trunk/include/iprt/mangling.h
r51856 r51862 2447 2447 # define RTCrSpcIndirectDataContent_Delete RT_MANGLER(RTCrSpcIndirectDataContent_Delete) 2448 2448 # define RTCrSpcIndirectDataContent_Enum RT_MANGLER(RTCrSpcIndirectDataContent_Enum) 2449 # define RTCrSpcIndirectDataContent_GetPeImage HashesV2 RT_MANGLER(RTCrSpcIndirectDataContent_GetPeImageHashesV2)2449 # define RTCrSpcIndirectDataContent_GetPeImageObjAttrib RT_MANGLER(RTCrSpcIndirectDataContent_GetPeImageObjAttrib) 2450 2450 # define RTCrSpcLink_Compare RT_MANGLER(RTCrSpcLink_Compare) 2451 2451 # define RTCrSpcLink_Delete RT_MANGLER(RTCrSpcLink_Delete) … … 2463 2463 # define RTCrSpcSerializedObject_Delete RT_MANGLER(RTCrSpcSerializedObject_Delete) 2464 2464 # define RTCrSpcSerializedObject_Enum RT_MANGLER(RTCrSpcSerializedObject_Enum) 2465 # define RTCrSpcSerializedPageHashes V2_Compare RT_MANGLER(RTCrSpcSerializedPageHashesV2_Compare)2466 # define RTCrSpcSerializedPageHashes V2_Delete RT_MANGLER(RTCrSpcSerializedPageHashesV2_Delete)2467 # define RTCrSpcSerializedPageHashes V2_Enum RT_MANGLER(RTCrSpcSerializedPageHashesV2_Enum)2468 # define RTCrSpcSerializedPageHashes V2_UpdateDerivedData RT_MANGLER(RTCrSpcSerializedPageHashesV2_UpdateDerivedData)2465 # define RTCrSpcSerializedPageHashes_Compare RT_MANGLER(RTCrSpcSerializedPageHashes_Compare) 2466 # define RTCrSpcSerializedPageHashes_Delete RT_MANGLER(RTCrSpcSerializedPageHashes_Delete) 2467 # define RTCrSpcSerializedPageHashes_Enum RT_MANGLER(RTCrSpcSerializedPageHashes_Enum) 2468 # define RTCrSpcSerializedPageHashes_UpdateDerivedData RT_MANGLER(RTCrSpcSerializedPageHashes_UpdateDerivedData) 2469 2469 # define RTCrSpcString_Compare RT_MANGLER(RTCrSpcString_Compare) 2470 2470 # define RTCrSpcString_Delete RT_MANGLER(RTCrSpcString_Delete)
Note:
See TracChangeset
for help on using the changeset viewer.