KEYS: trusted tpmdd-queue on 20210423

Fix a regression in the TPM trusted keys caused by the generic rework
to add ARM TEE based trusted keys.  Without this fix, the TPM trusted
key subsystem fails to add or load any keys.

Signed-off-by: James E.J. Bottomley <>
KEYS: trusted: fix TPM trusted keys for generic framework

The generic framework patch broke the current TPM trusted keys because
it doesn't correctly remove the values consumed by the generic parser
before passing them on to the implementation specific parser.  Fix
this by having the generic parser return the string minus the consumed

Additionally, there may be no tokens left for the implementation
specific parser, so make it handle the NULL case correctly and finally
fix a TPM 1.2 specific check for no keyhandle.

Fixes: 5d0682be3189 ("KEYS: trusted: Add generic trusted keys framework")
Tested-by: Sumit Garg <>
Signed-off-by: James Bottomley <>
2 files changed