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.

BUG=chrome-os-partner:13878
TEST=Reproduce the problem and verify the error code.

Change-Id: I918f4e2c12c6258c8078ea10a3562c1e6345cfb9
Reviewed-on: https://gerrit.chromium.org/gerrit/33007
Reviewed-by: Kees Cook <keescook@chromium.org>
Commit-Ready: Darren Krahn <dkrahn@chromium.org>
Tested-by: Darren Krahn <dkrahn@chromium.org>
1 file changed