Situation: Signer has backup file with locator a. HSM already purged key with locator a. lhsm_get_key() fails. Signer thinks the HSM connection is bad, recreates context. Looks up locator a, fails, recreates context. etc.
I was expecting that in such a case, hsm_get_error() would return an error.
Proposed fix 1: Max one retry reestablishing HSM connection.