By Spec, GetCompositeHash must return an error for PCRS_STRUCT_INFO. Only PCRS_STRUCT_INFO_SHORT and PCRS_STRUCT_INFO_LONG return their composite hash. However in order to validate a v1.1 Quote, this composite hash is needed. Also nobody knows, why this was disallowed in the first place.
This extra functionality is guarded by the switch configure --enable-strict-spec-compliance as other things are as well. Signed-off by: Andreas Fuchs <[email protected]> --- src/tspi/obj_pcrs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tspi/obj_pcrs.c b/src/tspi/obj_pcrs.c index 4430300..6476e5c 100644 --- a/src/tspi/obj_pcrs.c +++ b/src/tspi/obj_pcrs.c @@ -360,8 +360,13 @@ obj_pcrs_get_digest_at_release(TSS_HPCRS hPcrs, UINT32 *size, BYTE **out) switch(pcrs->type) { case TSS_PCRS_STRUCT_INFO: +#ifdef TSS_SPEC_COMPLIANCE result = TSPERR(TSS_E_INVALID_OBJ_ACCESS); goto done; +#else + digest = (BYTE *)&pcrs->info.info11.digestAtRelease; + break; +#endif case TSS_PCRS_STRUCT_INFO_SHORT: digest = (BYTE *)&pcrs->info.infoshort.digestAtRelease; break; -- 1.7.10.4 ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ TrouSerS-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/trousers-tech
