Expose more functionality from hwtrust
Instead of having parsing code in remote_prov_utils and hwtrust, we
should expose more of the values that are parsed in hwtrust and use
that interface to implement the verification of a CSR.
The aim of this CL is to preserve the functionality that previously
existed in remote_prov_utils and, also, add more tests.
Test: atest libkeymint_remote_prov_support_test
Change-Id: Id5408a425f28ea99052ba954c34441ed9307a5d2
diff --git a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
index b9c742a..f0745d7 100644
--- a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
+++ b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
@@ -999,6 +999,7 @@
std::unique_ptr<cppbor::Array> csrPayload = std::move(*result);
ASSERT_TRUE(csrPayload);
+ ASSERT_TRUE(csrPayload->size() > 2);
auto deviceInfo = csrPayload->get(2)->asMap();
ASSERT_TRUE(deviceInfo);