summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Shih <robertshih@google.com>2023-12-19 05:00:44 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-12-19 05:00:44 +0000
commit156716d72e76ff7bcc438ba0100a7289877ca6c1 (patch)
tree38d04279588f310c29dbb3e484789655babaea72
parent76cd50594630cbdd1d0927029d0c4061d95b8145 (diff)
parent6c3e15b8acce2c77c69eb9c1481ea865e20df02a (diff)
downloadsecurity-156716d72e76ff7bcc438ba0100a7289877ca6c1.tar.gz
Merge "rkp_factory_extraction_tool: log description when binder fails" into main
-rw-r--r--provisioner/rkp_factory_extraction_lib.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/provisioner/rkp_factory_extraction_lib.cpp b/provisioner/rkp_factory_extraction_lib.cpp
index ab7d17c9..b7e1e340 100644
--- a/provisioner/rkp_factory_extraction_lib.cpp
+++ b/provisioner/rkp_factory_extraction_lib.cpp
@@ -144,7 +144,7 @@ CborResult<Array> getCsrV1(std::string_view componentName, IRemotelyProvisionedC
::ndk::ScopedAStatus status = irpc->getHardwareInfo(&hwInfo);
if (!status.isOk()) {
std::cerr << "Failed to get hardware info for '" << componentName
- << "'. Error code: " << status.getServiceSpecificError() << "." << std::endl;
+ << "'. Description: " << status.getDescription() << "." << std::endl;
exit(-1);
}
@@ -155,7 +155,7 @@ CborResult<Array> getCsrV1(std::string_view componentName, IRemotelyProvisionedC
&keysToSignMac);
if (!status.isOk()) {
std::cerr << "Bundle extraction failed for '" << componentName
- << "'. Error code: " << status.getServiceSpecificError() << "." << std::endl;
+ << "'. Description: " << status.getDescription() << "." << std::endl;
exit(-1);
}
return composeCertificateRequestV1(protectedData, verifiedDeviceInfo, challenge, keysToSignMac,
@@ -171,7 +171,7 @@ void selfTestGetCsrV1(std::string_view componentName, IRemotelyProvisionedCompon
::ndk::ScopedAStatus status = irpc->getHardwareInfo(&hwInfo);
if (!status.isOk()) {
std::cerr << "Failed to get hardware info for '" << componentName
- << "'. Error code: " << status.getServiceSpecificError() << "." << std::endl;
+ << "'. Description: " << status.getDescription() << "." << std::endl;
exit(-1);
}
@@ -187,7 +187,7 @@ void selfTestGetCsrV1(std::string_view componentName, IRemotelyProvisionedCompon
&protectedData, &keysToSignMac);
if (!status.isOk()) {
std::cerr << "Error generating test cert chain for '" << componentName
- << "'. Error code: " << status.getServiceSpecificError() << "." << std::endl;
+ << "'. Description: " << status.getDescription() << "." << std::endl;
exit(-1);
}
@@ -232,7 +232,7 @@ CborResult<cppbor::Array> getCsrV3(std::string_view componentName,
auto status = irpc->generateCertificateRequestV2(emptyKeys, challenge, &csr);
if (!status.isOk()) {
std::cerr << "Bundle extraction failed for '" << componentName
- << "'. Error code: " << status.getServiceSpecificError() << "." << std::endl;
+ << "'. Description: " << status.getDescription() << "." << std::endl;
exit(-1);
}
@@ -254,7 +254,7 @@ CborResult<Array> getCsr(std::string_view componentName, IRemotelyProvisionedCom
auto status = irpc->getHardwareInfo(&hwInfo);
if (!status.isOk()) {
std::cerr << "Failed to get hardware info for '" << componentName
- << "'. Error code: " << status.getServiceSpecificError() << "." << std::endl;
+ << "'. Description: " << status.getDescription() << "." << std::endl;
exit(-1);
}