Test for patchlevels and too much entropy

Add tests for:
 - Too much entropy should be rejected with INVALID_INPUT_LENGTH
 - All authorization lists should include a vendor and boot patchlevel.

These requirements are in both the KeyMint and the KeyMaster 4.0 AIDL
specificications, but have never been policed before.

Currently disabled with a command-line flag because CF does not have
the patchlevels and so fails lots of tests.

Test: VtsKeyMintAidlTargetTest
Change-Id: Ic9622ef3f1b80e013a34059218e3e029f392eb72
This commit is contained in:
David Drysdale
2021-04-13 11:15:51 +01:00
parent 7de9febd17
commit bb3d85eaa4
5 changed files with 42 additions and 8 deletions

View File

@@ -170,6 +170,7 @@ void KeyMintAidlTestBase::InitializeKeyMint(std::shared_ptr<IKeyMintDevice> keyM
os_version_ = getOsVersion();
os_patch_level_ = getOsPatchlevel();
vendor_patch_level_ = getVendorPatchlevel();
}
void KeyMintAidlTestBase::SetUp() {