diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-02-28 21:18:57 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-02-28 21:18:57 +0000 |
commit | 59ab7beae3a41e3bc9b73a2c1ad37bec255cc41b (patch) | |
tree | 4ab5abbe93f4b53111e71bc5f234ff40c015cc0e | |
parent | cd13c5bac2152986e8a0780f26a0231bcec96528 (diff) | |
parent | 06c5483c920ff9f2f80ca92c17d0d30018cd99df (diff) | |
download | keymaster-simpleperf-release.tar.gz |
Snap for 11510257 from 06c5483c920ff9f2f80ca92c17d0d30018cd99df to simpleperf-releasesimpleperf-release
Change-Id: I39f240feb846212f5f2ccc9b8d73de01a6213b2e
-rw-r--r-- | Android.bp | 1 | ||||
-rw-r--r-- | android_keymaster/remote_provisioning_utils.cpp | 14 | ||||
-rw-r--r-- | fuzzer/Android.bp | 1 | ||||
-rw-r--r-- | tests/Android.bp | 3 |
4 files changed, 13 insertions, 6 deletions
@@ -15,6 +15,7 @@ // libkeymaster_messages contains just the code necessary to communicate with a // AndroidKeymaster implementation, e.g. one running in TrustZone. package { + default_team: "trendy_team_android_hardware_backed_security", default_applicable_licenses: ["system_keymaster_license"], } diff --git a/android_keymaster/remote_provisioning_utils.cpp b/android_keymaster/remote_provisioning_utils.cpp index 7d9b7ec..fb06850 100644 --- a/android_keymaster/remote_provisioning_utils.cpp +++ b/android_keymaster/remote_provisioning_utils.cpp @@ -14,10 +14,13 @@ * limitations under the License. */ -#include "keymaster/cppcose/cppcose.h" -#include <keymaster/logger.h> #include <keymaster/remote_provisioning_utils.h> -#include <string_view> + +#include <algorithm> +#include <span> + +#include <keymaster/cppcose/cppcose.h> +#include <keymaster/logger.h> namespace keymaster { @@ -40,7 +43,7 @@ using cppcose::OCTET_KEY_PAIR; using cppcose::P256; using cppcose::verifyAndParseCoseSign1; -using byte_view = std::basic_string_view<uint8_t>; +using byte_view = std::span<const uint8_t>; struct KeyInfo { CoseKeyCurve curve; @@ -49,7 +52,8 @@ struct KeyInfo { // that all root keys are EDDSA. bool operator==(const KeyInfo& other) const { - return curve == other.curve && pubkey == other.pubkey; + return curve == other.curve && + std::equal(pubkey.begin(), pubkey.end(), other.pubkey.begin(), other.pubkey.end()); } }; diff --git a/fuzzer/Android.bp b/fuzzer/Android.bp index 75af40f..2fd54a7 100644 --- a/fuzzer/Android.bp +++ b/fuzzer/Android.bp @@ -16,6 +16,7 @@ */ package { + default_team: "trendy_team_android_hardware_backed_security", // See: http://go/android-license-faq // A large-scale-change added 'default_applicable_licenses' to import // all of the 'license_kinds' from "system_keymaster_license" diff --git a/tests/Android.bp b/tests/Android.bp index d5ea46b..261ee03 100644 --- a/tests/Android.bp +++ b/tests/Android.bp @@ -1,4 +1,5 @@ package { + default_team: "trendy_team_android_hardware_backed_security", // See: http://go/android-license-faq // A large-scale-change added 'default_applicable_licenses' to import // all of the 'license_kinds' from "system_keymaster_license" @@ -55,7 +56,7 @@ cc_test { "authorization_set_test.cpp", "key_blob_test.cpp", "android_keymaster_messages_test.cpp", - "keymaster_enforcement_test.cpp", + "keymaster_enforcement_test.cpp", "attestation_record_test.cpp", "wrapped_key_test.cpp", ], |