Use better error code when key reload fails.
When an operation uses a key that has been evicted from the TPM, tcsd
attempts to reload the key. On some TPMs this can fail with
TPM_E_AUTHFAIL. We want to convert this into something more appropriate
so an application can distinguish this case from an actual authorization
problem with the current operation.
TEST=Reproduce the problem and verify the error code.
Reviewed-by: Kees Cook <firstname.lastname@example.org>
Commit-Ready: Darren Krahn <email@example.com>
Tested-by: Darren Krahn <firstname.lastname@example.org>
1 file changed