summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Bires <jbires@google.com>2023-05-12 16:00:02 +0000
committerCherrypicker Worker <android-build-cherrypicker-worker@google.com>2023-05-12 16:00:02 +0000
commite9bb4bd1a200e34714bb21dae68535fdc5affbad (patch)
tree36a8203bcf89af38aa9dd0020fb3089a7c813e13
parent4a5f6d4a3d7f2282dfcd645eea9d684ff7d6c24d (diff)
downloadkeymaster-e9bb4bd1a200e34714bb21dae68535fdc5affbad.tar.gz
With the introduction of the generateCertificateRequestV2 call, there was a new code path introduce in android_keymaster to handle this additional HAL method. The underlying code this HAL called in the pure software provisioning context did not also trigger generation of the BCC and device private key for the new HAL method. This is now fixed by initializing the Bcc in BuildCsr Fixes: 270522174 Test: N/A (cherry picked from https://android-review.googlesource.com/q/commit:84260d0c6c50675b006113178796a6a0021116b2) Merged-In: Ic49008d832e6b1fdc846817a8e7dcda07657983a Change-Id: Ic49008d832e6b1fdc846817a8e7dcda07657983a
-rw-r--r--contexts/pure_soft_remote_provisioning_context.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/contexts/pure_soft_remote_provisioning_context.cpp b/contexts/pure_soft_remote_provisioning_context.cpp
index 72232ac..fcafec4 100644
--- a/contexts/pure_soft_remote_provisioning_context.cpp
+++ b/contexts/pure_soft_remote_provisioning_context.cpp
@@ -207,6 +207,7 @@ void PureSoftRemoteProvisioningContext::GetHwInfo(GetHwInfoResponse* hwInfo) con
cppcose::ErrMsgOr<cppbor::Array>
PureSoftRemoteProvisioningContext::BuildCsr(const std::vector<uint8_t>& challenge,
cppbor::Array keysToSign) const {
+ LazyInitProdBcc();
uint32_t csrVersion = 3;
auto deviceInfo = std::move(*CreateDeviceInfo(csrVersion));
auto csrPayload = cppbor::Array()