diff --git a/security/keymint/support/include/remote_prov/remote_prov_utils.h b/security/keymint/support/include/remote_prov/remote_prov_utils.h index 3b02fadaf4..b8c69eb7d6 100644 --- a/security/keymint/support/include/remote_prov/remote_prov_utils.h +++ b/security/keymint/support/include/remote_prov/remote_prov_utils.h @@ -17,6 +17,7 @@ #pragma once #include +#include #include #include "aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.h" @@ -129,8 +130,8 @@ struct JsonOutput { * "name": * } */ -JsonOutput jsonEncodeCsrWithBuild(const std::string instance_name, - const cppbor::Array& csr, const std::string serialno_prop); +JsonOutput jsonEncodeCsrWithBuild(const std::string& instance_name, const cppbor::Array& csr, + const std::string& serialno_prop); /** * Parses a DeviceInfo structure from the given CBOR data. The parsed data is then validated to diff --git a/security/keymint/support/remote_prov_utils.cpp b/security/keymint/support/remote_prov_utils.cpp index ecfdfd2b33..a830041d64 100644 --- a/security/keymint/support/remote_prov_utils.cpp +++ b/security/keymint/support/remote_prov_utils.cpp @@ -337,8 +337,8 @@ ErrMsgOr> validateBcc(const cppbor::Array* bcc, return result; } -JsonOutput jsonEncodeCsrWithBuild(const std::string instance_name, const cppbor::Array& csr, - const std::string serialno_prop) { +JsonOutput jsonEncodeCsrWithBuild(const std::string& instance_name, const cppbor::Array& csr, + const std::string& serialno_prop) { const std::string kFingerprintProp = "ro.build.fingerprint"; if (!::android::base::WaitForPropertyCreation(kFingerprintProp)) {