summaryrefslogtreecommitdiffstats
path: root/keymaster
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-11-27 17:15:05 -0800
committerandroid-build-merger <android-build-merger@google.com>2018-11-27 17:15:05 -0800
commit8009b3ccce0888d46ca619b2a33d0e69e706c7c1 (patch)
tree6ad4f6453e63f391109fc1ed193de946393aed21 /keymaster
parenta7e857962661a09564a801d42581e258cfe5c268 (diff)
parent6464114f34a1ee5aa0a812af81ac78f1837b071c (diff)
downloadandroid_hardware_interfaces-8009b3ccce0888d46ca619b2a33d0e69e706c7c1.tar.gz
android_hardware_interfaces-8009b3ccce0888d46ca619b2a33d0e69e706c7c1.tar.bz2
android_hardware_interfaces-8009b3ccce0888d46ca619b2a33d0e69e706c7c1.zip
Merge "C++17 compatibility: add a non-const char* overload." am: f919d0a0b8 am: 9ef0004adc
am: 6464114f34 Change-Id: If291303fec3c252f90a119431c6124d81ec46b2d
Diffstat (limited to 'keymaster')
-rw-r--r--keymaster/3.0/vts/functional/authorization_set.h6
-rw-r--r--keymaster/4.0/support/include/keymasterV4_0/authorization_set.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/keymaster/3.0/vts/functional/authorization_set.h b/keymaster/3.0/vts/functional/authorization_set.h
index 60b00e432..0c15e686f 100644
--- a/keymaster/3.0/vts/functional/authorization_set.h
+++ b/keymaster/3.0/vts/functional/authorization_set.h
@@ -261,6 +261,12 @@ class AuthorizationSetBuilder : public AuthorizationSet {
return Authorization(ttag, reinterpret_cast<const uint8_t*>(data), data_length);
}
+ template <Tag tag>
+ AuthorizationSetBuilder& Authorization(TypedTag<TagType::BYTES, tag> ttag, char* data,
+ size_t data_length) {
+ return Authorization(ttag, reinterpret_cast<const uint8_t*>(data), data_length);
+ }
+
AuthorizationSetBuilder& Authorizations(AuthorizationSet&& set);
AuthorizationSetBuilder& Authorizations(const AuthorizationSet& set);
diff --git a/keymaster/4.0/support/include/keymasterV4_0/authorization_set.h b/keymaster/4.0/support/include/keymasterV4_0/authorization_set.h
index a131423f6..ff08066bc 100644
--- a/keymaster/4.0/support/include/keymasterV4_0/authorization_set.h
+++ b/keymaster/4.0/support/include/keymasterV4_0/authorization_set.h
@@ -251,6 +251,12 @@ class AuthorizationSetBuilder : public AuthorizationSet {
return Authorization(ttag, reinterpret_cast<const uint8_t*>(data), data_length);
}
+ template <Tag tag>
+ AuthorizationSetBuilder& Authorization(TypedTag<TagType::BYTES, tag> ttag, char* data,
+ size_t data_length) {
+ return Authorization(ttag, reinterpret_cast<const uint8_t*>(data), data_length);
+ }
+
AuthorizationSetBuilder& Authorizations(const AuthorizationSet& set) {
for (const auto& entry : set) {
push_back(entry);