We are developing a JavaCard-based security sensitive application. Our goal is to allow client code communicating with a GlobaPlatform 2.2+ based JavaCard applet to convince itself that it's actually talking to a specific (and verifiable) version of the JavaCard applet it needs to talk to. In other words, we are looking for a "platform integrity" mechanism to be sure there's no possibility that the JavaCard applet code was substituted/modified by "insiders" (e.g. even us who developed the applet).
At first we were hoping to use an Installation Receipt mechanism as described in the GP specification, but we were advised that this doesn't apply in that case.
So is there a way for client code to query the card about the authenticity (e.g. a simple hash) of the applet codebase (i.e. the installed .cap file) without having to query and trust the JavaCard applet itself?