summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Bires <jbires@google.com>2021-06-03 00:16:06 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-06-03 00:16:06 +0000
commit4b9298ab3fcf9f96a4133f77ff135090980ab20d (patch)
tree0d95a62e316485001f63a3e754e0cba60bd11914
parent43a8733e0c1cac389079b52be1e53e8b00d772b5 (diff)
parentdd136977b257fb008ca1616590d79a05d2c43747 (diff)
downloadkeymaster-4b9298ab3fcf9f96a4133f77ff135090980ab20d.tar.gz
Merge "Fixing up reference impl to match new CDDL" into sc-dev
-rw-r--r--android_keymaster/android_keymaster.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/android_keymaster/android_keymaster.cpp b/android_keymaster/android_keymaster.cpp
index 7fe7b23..ea8b7ff 100644
--- a/android_keymaster/android_keymaster.cpp
+++ b/android_keymaster/android_keymaster.cpp
@@ -87,7 +87,7 @@ cppcose::HmacSha256Function getMacFunction(bool test_mode,
RemoteProvisioningContext* rem_prov_ctx) {
if (test_mode) {
return [](const cppcose::bytevec& input) {
- const cppcose::bytevec macKey{32};
+ const cppcose::bytevec macKey(32);
return cppcose::generateHmacSha256(macKey, input);
};
}
@@ -436,6 +436,7 @@ void AndroidKeymaster::GenerateCsr(const GenerateCsrRequest& request,
.add(std::pair(request.challenge.begin(),
request.challenge.end() - request.challenge.begin()))
.add(std::move(device_info_map))
+ .add(std::pair(pubKeysToSignMac->data(), pubKeysToSignMac->size()))
.encode());
if (!signedMac) {
LOG_E("Failed to construct COSE_Sign1 over the ephemeral mac key.", 0);