We're only flushing 2 transients, but there are 3 handles. Use <= to also
flush the third handle since TRANSIENT_LAST is inclusive
The number of transient handles/keys is hardware dependent, so this
should query for the limit. And assignment of handles is assumed to be
sequential from the minimum. That may not be guaranteed, but seems okay
with my tpm2.
Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Daniel P. Smith <dpsmith@apertussolutions.com>
{
int i;
- for (i = TRANSIENT_FIRST; i < TRANSIENT_LAST; i++)
+ for (i = TRANSIENT_FIRST; i <= TRANSIENT_LAST; i++)
TPM2_FlushContext(i);
return TPM_SUCCESS;