diff options
author | Seth Moore <sethmo@google.com> | 2022-02-08 05:37:53 -0800 |
---|---|---|
committer | Seth Moore <sethmo@google.com> | 2022-02-08 06:40:49 -0800 |
commit | 3979e68e6f37f2decdbc1c67c8cb86f414248c5f (patch) | |
tree | cac41f16fc4fdd0c7dccf61b1bf665274c89811f | |
parent | b522d8d9ab2dad6009912440295f2e679931c240 (diff) | |
download | keymaster-3979e68e6f37f2decdbc1c67c8cb86f414248c5f.tar.gz |
Stop copying macFunction in RPK utilitiesandroid-t-preview-2android-t-preview-1android-t-beta-3android-s-v2-beta-3android-s-qpr3-beta-1android-t-preview-1android-s-v2-beta-3android-s-qpr3-beta-1
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.cpp | 2 | ||||
-rw-r--r-- | include/keymaster/remote_provisioning_utils.h | 2 |
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); |