Update the message versioning system.
A few changes to message versioning, and KM versioning:
1. Change GetVersionResponse to use a uint32_t's rather than
uint8_t's. This is a little dangerous because it will break any
existing uses of GetVersionResponse (which isn't
versionable!). But as far as I can tell, no one is presently using
GetVersion.
2. Update MessageVersion() to include support for KM3/4.
3. Distinguish between the default message version and the max
message version, and use the former (which is usually the same as
the latter) as the default for the message ctors.
4. Change the KmVersion enum to be more complete, which requires
breaking from the previous plan to have the enum values track the
attestation KM version values.
5. Change the AndroidKeymaster::GetVersion method to use the
KmVersion to determine what version values to return.
Test: keymaster_tests
Change-Id: I9ee5a3e8adf8eb04bb32146601ecdaaff133a3b7
8 files changed