summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Moore <sethmo@google.com>2022-02-08 05:37:53 -0800
committerSeth Moore <sethmo@google.com>2022-02-08 06:40:49 -0800
commit3979e68e6f37f2decdbc1c67c8cb86f414248c5f (patch)
treecac41f16fc4fdd0c7dccf61b1bf665274c89811f
parentb522d8d9ab2dad6009912440295f2e679931c240 (diff)
downloadkeymaster-3979e68e6f37f2decdbc1c67c8cb86f414248c5f.tar.gz
We were copying the macFunction, but we really only needed a reference. This is just a bit of clean up to quiet some compiler warnings. Test: VtsHalRemotelyProvisionedComponentTargetTest Change-Id: I948faff6a97af854b0333ff1a2909667a57afdea
-rw-r--r--android_keymaster/remote_provisioning_utils.cpp2
-rw-r--r--include/keymaster/remote_provisioning_utils.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/android_keymaster/remote_provisioning_utils.cpp b/android_keymaster/remote_provisioning_utils.cpp
index 8cb635b..78a058a 100644
--- a/android_keymaster/remote_provisioning_utils.cpp
+++ b/android_keymaster/remote_provisioning_utils.cpp
@@ -126,7 +126,7 @@ validateAndExtractEekPubAndId(bool testMode, const KeymasterBlob& endpointEncryp
StatusOr<std::vector<uint8_t> /* pubkeys */>
validateAndExtractPubkeys(bool testMode, uint32_t numKeys, KeymasterBlob* keysToSign,
- cppcose::HmacSha256Function macFunction) {
+ const cppcose::HmacSha256Function& macFunction) {
auto pubKeysToMac = cppbor::Array();
for (size_t i = 0; i < numKeys; i++) {
auto [macedKeyItem, _, coseMacErrMsg] =
diff --git a/include/keymaster/remote_provisioning_utils.h b/include/keymaster/remote_provisioning_utils.h
index 7c38a76..76acdc7 100644
--- a/include/keymaster/remote_provisioning_utils.h
+++ b/include/keymaster/remote_provisioning_utils.h
@@ -70,7 +70,7 @@ validateAndExtractEekPubAndId(bool testMode, const KeymasterBlob& endpointEncryp
StatusOr<std::vector<uint8_t> /* pubkeys */>
validateAndExtractPubkeys(bool testMode, uint32_t numKeys, KeymasterBlob* keysToSign,
- cppcose::HmacSha256Function macFunction);
+ const cppcose::HmacSha256Function& macFunction);
cppbor::Array buildCertReqRecipients(const std::vector<uint8_t>& pubkey,
const std::vector<uint8_t>& kid);