Hi all,

I have a very practical issue that raises the question of how highly we value 
spec-conformity.

Concretely, I'd like to call GetCompositeHash for a PcrComposite Object that is 
v1.1.
The TSS-spec says (p 306):  "If the PcrComposite object is using the 1.1 
TCPA_PCR_INFO
structure, this function shall return with TSS_E_INVALID_OBJ_ACCESS".

This does not make any sense, or at least I have not found out and nobody could 
tell me, why
this is there. Internally, Trousers already computes this hash just does not 
return it and the patch therefore
looks like this:
diff --git a/src/tspi/obj_pcrs.c b/src/tspi/obj_pcrs.c
index c36b761..c9dd2b5 100644
@@ -360,8 +360,11 @@ obj_pcrs_get_digest_at_release(TSS_HPCRS hPcrs, UINT32 
*size, BYTE **out)
 
        switch(pcrs->type) {
                case TSS_PCRS_STRUCT_INFO:
-                       result = TSPERR(TSS_E_INVALID_OBJ_ACCESS);
-                       goto done;
+            digest = (BYTE *)&pcrs->info.info11.digestAtRelease;
+            break;
                case TSS_PCRS_STRUCT_INFO_SHORT:
                        digest = (BYTE *)&pcrs->info.infoshort.digestAtRelease;
                        break;

That's what I'm currently using, but I'd of course like to merge it upstream. 
Therefore, I was wondering,
how this could be done in a sensible way.

Of course, Trousers should be spec-conform in the first place. My suggestion 
would therefore be to add
a --enable-extra-spec flag to ./configure to allow for such behaviours that 
contradict the spec but actually
make sense.
I would guess that there are even more things like this around...

I'd like to hear your comments...

Best regards,
Andreas


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
TrouSerS-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-tech

Reply via email to