e_tpm2: fix spurious error on successful operation

When the engine successfully performs an operation with an older key,
we still end up with an apparent error (which can be displayed to the
user) about a failed load.  This comes from the initial failed attempt
to load the new key format and can be fixed by clearing all openssl
errors if the old key format load succeeds.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
1 file changed