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 <email@example.com>
Commit-Ready: Darren Krahn <firstname.lastname@example.org>
Tested-by: Darren Krahn <email@example.com>
1 file changed