summaryrefslogtreecommitdiff
path: root/security/keymint/support/remote_prov_utils.cpp
AgeCommit message (Collapse)Author
2022-03-15Merge "Prevent test crashes if device sets invalid curve"David Drysdale
2022-03-10Prevent test crashes if device sets invalid curveDavid Drysdale
Test: VtsHalRemotelyProvisionedComponentTargetTest Change-Id: Ib623b3dcdd5a496b34314c1e0d1a310c8beeb18d
2022-03-10remote_prov_utils: Add instance name in the JSON outputTommy Chiu
Bug: 223509807 Test: libkeymint_remote_prov_support_test Change-Id: I45d2ee46f6fe3c8a7da55c7cc0b04fc007ddea43
2022-02-23Support for P256 curve in RKP for Strongboxsubrahmanyaman
Test: Run Rkp Vts tests. Change-Id: Ic38fd2318dd8749ae125f1e78d25f2722bd367e5
2022-02-02Include the CWT validation in VTS testing.Max Bires
This change modifies the VTS tests to validate the structure of the CBOR Web Token (CWT) which contains the public key as one of several fields in the map. It only validates the subset of fields expected to be seen in the VTS tests. The ones related to the actual BCC will not be present in test mode due to the security guarantees of the interface. Additionally, the test will also now check that the first key in the BCC array matches the public key that should be self-signed in the certificate located in the second index of the BCC array. Test: atest VtsHalRemotelyProvisionedComponentTargetTest Change-Id: I9e7769861529b8095d77ce8fee3c78222579d38c
2021-07-01Add a utility to JSON-format a CSR with build infoSeth Moore
We need both the build fingerprint as well as the CSR when uploading data to the APFE provisioning server. Add a utility function to format the output as a JSON blob so that it may be easily collected in the factory in a serialized data format, then later uploaded. Test: libkeymint_remote_prov_support_test Test: VtsAidlKeyMintTargetTest Test: VtsHalRemotelyProvisionedComponentTargetTest Bug: 191301285 Change-Id: I751c5461876d83251869539f1a395ba13cb5cf84
2021-06-25Add real GEEK for RKP factory enrollmentSeth Moore
Include a unit test to verify the GEEK cert chain is valid. Test: libkeymint_remote_prov_support_test Bug: 191301285 Change-Id: Icf9cfa165fbccb24b36b03ff3ce729a7e9c44cfd Merged-In: Icf9cfa165fbccb24b36b03ff3ce729a7e9c44cfd
2021-06-25Add a unit test for remote_prov_utilsSeth Moore
This functionality will be used for the factory tooling, so we should test it. Additionally, some new functionality will soon be added, and it also needs to be tested. Test: libkeymint_remote_prov_support_test Bug: 191301285 Change-Id: I6a8798fc4b09fff1e829185a4b9e471921e5d2a9 Merged-In: I6a8798fc4b09fff1e829185a4b9e471921e5d2a9
2021-06-22Remove ignoreSignature for cose signature checksSeth Moore
This flag is never used anywhere, so just remove it. When used, it would bypass signature checks. This is something we generally don't want to do, even in testing. So remove the flag so there's no temptation to use it. Bug: 190942528 Test: VtsHalRemotelyProvisionedComponentTargetTest Change-Id: I0433c1eedc08e9a5a5ad71347154867dba61689e Merged-In: I0433c1eedc08e9a5a5ad71347154867dba61689e
2021-03-29Add more EEK variant tests and related fixesDavid Drysdale
- Test with deliberately-invalid EEK in request: - corrupt signature - missing initial self-signed cert - Test with different sizes of EEK chain. These tests will only really take effect when we have a valid GEEK to test with. Other changes: - Fix encoding of KeyUsage bitset. - Add a made-up allowed-root pubkey for prod mode. This needs to be replaced with the real GEEK when available. - Fix generateEek() so that the first private key isn't used for all signing operations. Test: VtsHalRemotelyProvisionedComponentTargetTest Change-Id: I833894d33cd1757b7a0cfcf18f79b61e4e56a556
2021-03-15COSE unprotected parameters are a map not a bstrDavid Drysdale
As per RFC 8152 section 3, the unprotected parameters in the headers of COSE objects are just encoded as a map, not as a bstr that contains the CBOR-encoding of a map. Test: TreeHugger presubmit Change-Id: Id4eeb023d3a81ad1398d78d410c8224bf941f9b1
2021-02-16Add RemotelyProvisionedComponent HAL.Shawn Willden
Test: VtsHalRemotelyProvisionedComponentTargetTest Change-Id: I51fb01f4c52949c81f3ad2d694a4afdf0fa67788