Delegate some MAC operations to the provisioning context
The MAC key used to authenticate the public keys between the GenerateRkp
and GenerateCsr calls is supposed to be known _only_ to the secure
element. The code was passing the MAC key up from the context, which
makes the security guarantee difficult or impossible on some platforms.
Generate the MAC by delegating to the provisioning context. This required
refactoring a bit of code to use a callback for MAC calculation instead
of passing the raw MAC key around.
Bug: 182928606
Test: VtsHalRemotelyProvisionedComponentTargetTest
Test: RemoteProvisionerUnitTests
Change-Id: Id9a04ee0e0b1abc11d616ef53f41569cdaae3182
Merged-In: Id9a04ee0e0b1abc11d616ef53f41569cdaae3182
8 files changed