Modify SoftKeymasterDevice to fully handle keymaster1 devices
When SoftKeymasterDevice is wrapping a keymaster1 device that does not
implement all of the required digests, it simply rejects creation or
import of HMAC keys that use an unsupported digest. This works only
because keystore has a "fallback" software-only device which will be
used to handle the issue. Treblization makes that fallback device
rather weird. To allow removal of the fallback device,
SoftKeymasterDevice needs to allow creation and import of HMAC keys that
cannot be supported by the underlying hardware, creating a
software-based key and using the software implementation for
operations. This CL makes it do that.
Test: Tested by running dev machine unit tests.
Bug: 32020919
Change-Id: I6cdb5d57dc3360c279bf94a402c3b8fe3d673950
3 files changed