Home
last modified time | relevance | path

Searched refs:ttag (Results 1 – 18 of 18) sorted by relevance

/hardware/interfaces/security/keymint/support/include/keymint_support/
Dauthorization_set.h168 bool Contains(TypedTag<tag_type, tag> ttag, const ValueT& value) const { in Contains() argument
170 auto entry = authorizationValue(ttag, param); in Contains()
230 AuthorizationSetBuilder& Authorization(TagType ttag, ValueType&&... value) { in Authorization() argument
231 push_back(ttag, std::forward<ValueType>(value)...); in Authorization()
236 AuthorizationSetBuilder& Authorization(TypedTag<TagType::BYTES, tag> ttag, const uint8_t* data, in Authorization() argument
239 push_back(ttag, new_blob); in Authorization()
244 AuthorizationSetBuilder& Authorization(TypedTag<TagType::BYTES, tag> ttag, const char* data, in Authorization() argument
246 return Authorization(ttag, reinterpret_cast<const uint8_t*>(data), data_length); in Authorization()
250 AuthorizationSetBuilder& Authorization(TypedTag<TagType::BYTES, tag> ttag, char* data, in Authorization() argument
252 return Authorization(ttag, reinterpret_cast<const uint8_t*>(data), data_length); in Authorization()
[all …]
Dkeymint_tags.h254 inline KeyParameter makeKeyParameter(TypedTag<tag_type, tag> ttag, ValueT&& value) {
257 retval.value = KeyParameterValue::make<TypedTag2ValueType<decltype(ttag)>::unionTag>(
294 inline KeyParameter Authorization(TypedTag<tag_type, tag> ttag, Args&&... args) {
306 return makeKeyParameter(ttag, std::forward<Args>(args)...);
333 authorizationValue(TypedTag<tag_type, tag> ttag, const KeyParameter& param) {
337 return accessTagValue(ttag, param);
/hardware/interfaces/keymaster/3.0/vts/functional/
Dattestation_record.cpp143 void copyAuthTag(const stack_st_ASN1_INTEGER* stack, TypedTag<TagType::ENUM_REP, tag> ttag, in copyAuthTag() argument
145 typedef typename TypedTag2ValueType<decltype(ttag)>::type ValueT; in copyAuthTag()
148 ttag, static_cast<ValueT>(ASN1_INTEGER_get(sk_ASN1_INTEGER_value(stack, i)))); in copyAuthTag()
153 void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::ENUM, tag> ttag, in copyAuthTag() argument
155 typedef typename TypedTag2ValueType<decltype(ttag)>::type ValueT; in copyAuthTag()
157 auth_list->push_back(ttag, static_cast<ValueT>(ASN1_INTEGER_get(asn1_int))); in copyAuthTag()
161 void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::UINT, tag> ttag, in copyAuthTag() argument
164 auth_list->push_back(ttag, ASN1_INTEGER_get(asn1_int)); in copyAuthTag()
192 void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::ULONG, tag> ttag, in copyAuthTag() argument
196 auth_list->push_back(ttag, BignumToUint64(num.get())); in copyAuthTag()
[all …]
Dauthorization_set.h167 bool Contains(TypedTag<tag_type, tag> ttag, const ValueT& value) const { in Contains() argument
169 auto entry = authorizationValue(ttag, param); in Contains()
201 void push_back(TypedTag<TagType::BYTES, tag> ttag, const uint8_t* data, size_t data_length) { in push_back() argument
204 push_back(ttag, new_blob); in push_back()
244 AuthorizationSetBuilder& Authorization(TagType ttag, ValueType&&... value) { in Authorization() argument
245 push_back(ttag, std::forward<ValueType>(value)...); in Authorization()
250 AuthorizationSetBuilder& Authorization(TypedTag<TagType::BYTES, tag> ttag, const uint8_t* data, in Authorization() argument
254 push_back(ttag, new_blob); in Authorization()
259 AuthorizationSetBuilder& Authorization(TypedTag<TagType::BYTES, tag> ttag, const char* data, in Authorization() argument
261 return Authorization(ttag, reinterpret_cast<const uint8_t*>(data), data_length); in Authorization()
[all …]
Dkeystore_tags_utils.cpp29 static TypedTag<tag_type, tag> chooseString(TypedTag<tag_type, tag> ttag, Tag runtime_tag, in chooseString()
34 return ttag; in chooseString()
Dkeymaster_tags.h229 inline KeyParameter makeKeyParameter(TypedTag<tag_type, tag> ttag, ValueT&& value) {
233 accessTagValue(ttag, param) = std::forward<ValueT>(value);
254 inline KeyParameter Authorization(TypedTag<tag_type, tag> ttag, Args&&... args) {
265 return makeKeyParameter(ttag, std::forward<Args>(args)...);
331 authorizationValue(TypedTag<tag_type, tag> ttag, const KeyParameter& param) {
333 return accessTagValue(ttag, param);
Dauthorization_set.cpp245 template <typename T> OutStreams& serialize(T ttag, OutStreams& out, const KeyParameter& param) { in serialize() argument
247 return serializeParamValue(out, accessTagValue(ttag, param)); in serialize()
341 template <typename T> InStreams& deserialize(T&& ttag, InStreams& in, KeyParameter* param) { in deserialize() argument
342 return deserializeParamValue(in, &accessTagValue(ttag, *param)); in deserialize()
Dkeymaster_hidl_hal_test.cpp190 bool contains(hidl_vec<KeyParameter>& set, TypedTag<tag_type, tag> ttag, ValueT expected_value) { in contains() argument
192 return param.tag == tag && accessTagValue(ttag, param) == expected_value; in contains()
859 void CheckKm0CryptoParam(TypedTag<tag_type, tag> ttag, ValueT expected) { in CheckKm0CryptoParam() argument
862 EXPECT_TRUE(contains(key_characteristics_.teeEnforced, ttag, expected)); in CheckKm0CryptoParam()
863 EXPECT_FALSE(contains(key_characteristics_.softwareEnforced, ttag)); in CheckKm0CryptoParam()
865 EXPECT_TRUE(contains(key_characteristics_.softwareEnforced, ttag, expected)); in CheckKm0CryptoParam()
866 EXPECT_FALSE(contains(key_characteristics_.teeEnforced, ttag)); in CheckKm0CryptoParam()
871 void CheckKm1CryptoParam(TypedTag<tag_type, tag> ttag, ValueT expected) { in CheckKm1CryptoParam() argument
874 EXPECT_TRUE(contains(key_characteristics_.teeEnforced, ttag, expected)); in CheckKm1CryptoParam()
875 EXPECT_FALSE(contains(key_characteristics_.softwareEnforced, ttag)); in CheckKm1CryptoParam()
[all …]
/hardware/interfaces/keymaster/4.0/support/include/keymasterV4_0/
Dauthorization_set.h170 bool Contains(TypedTag<tag_type, tag> ttag, const ValueT& value,
173 auto entry = authorizationValue(ttag, param);
236 AuthorizationSetBuilder& Authorization(TagType ttag, ValueType&&... value) { in Authorization() argument
237 push_back(ttag, std::forward<ValueType>(value)...); in Authorization()
242 AuthorizationSetBuilder& Authorization(TypedTag<TagType::BYTES, tag> ttag, const uint8_t* data, in Authorization() argument
246 push_back(ttag, new_blob); in Authorization()
251 AuthorizationSetBuilder& Authorization(TypedTag<TagType::BYTES, tag> ttag, const char* data, in Authorization() argument
253 return Authorization(ttag, reinterpret_cast<const uint8_t*>(data), data_length); in Authorization()
257 AuthorizationSetBuilder& Authorization(TypedTag<TagType::BYTES, tag> ttag, char* data, in Authorization() argument
259 return Authorization(ttag, reinterpret_cast<const uint8_t*>(data), data_length); in Authorization()
Dkeymaster_tags.h237 inline KeyParameter makeKeyParameter(TypedTag<tag_type, tag> ttag, ValueT&& value) {
241 accessTagValue(ttag, param) = std::forward<ValueT>(value);
269 inline KeyParameter Authorization(TypedTag<tag_type, tag> ttag, Args&&... args) {
280 return makeKeyParameter(ttag, std::forward<Args>(args)...);
362 TypedTag<tag_type, tag> ttag, const KeyParameter& param) {
364 return accessTagValue(ttag, param);
/hardware/interfaces/keymaster/4.0/support/
Dattestation_record.cpp187 void copyAuthTag(const stack_st_ASN1_INTEGER* stack, TypedTag<TagType::ENUM_REP, tag> ttag, in copyAuthTag() argument
189 typedef typename TypedTag2ValueType<decltype(ttag)>::type ValueT; in copyAuthTag()
192 ttag, static_cast<ValueT>(ASN1_INTEGER_get(sk_ASN1_INTEGER_value(stack, i)))); in copyAuthTag()
197 void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::ENUM, tag> ttag, in copyAuthTag() argument
199 typedef typename TypedTag2ValueType<decltype(ttag)>::type ValueT; in copyAuthTag()
201 auth_list->push_back(ttag, static_cast<ValueT>(ASN1_INTEGER_get(asn1_int))); in copyAuthTag()
205 void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::UINT, tag> ttag, in copyAuthTag() argument
208 auth_list->push_back(ttag, ASN1_INTEGER_get(asn1_int)); in copyAuthTag()
236 void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::ULONG, tag> ttag, in copyAuthTag() argument
240 auth_list->push_back(ttag, BignumToUint64(num.get())); in copyAuthTag()
[all …]
Dauthorization_set.cpp249 OutStreams& serialize(T ttag, OutStreams& out, const KeyParameter& param) { in serialize() argument
251 return serializeParamValue(out, accessTagValue(ttag, param)); in serialize()
359 InStreams& deserialize(T&& ttag, InStreams& in, KeyParameter* param) { in deserialize() argument
360 return deserializeParamValue(in, &accessTagValue(ttag, *param)); in deserialize()
/hardware/interfaces/keymaster/4.1/support/
Dattestation_record.cpp202 void copyAuthTag(const stack_st_ASN1_INTEGER* stack, TypedTag<TagType::ENUM_REP, tag> ttag, in copyAuthTag() argument
204 typedef typename V4_0::TypedTag2ValueType<decltype(ttag)>::type ValueT; in copyAuthTag()
207 ttag, static_cast<ValueT>(ASN1_INTEGER_get(sk_ASN1_INTEGER_value(stack, i)))); in copyAuthTag()
212 void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::ENUM, tag> ttag, in copyAuthTag() argument
214 typedef typename V4_0::TypedTag2ValueType<decltype(ttag)>::type ValueT; in copyAuthTag()
216 auth_list->push_back(ttag, static_cast<ValueT>(ASN1_INTEGER_get(asn1_int))); in copyAuthTag()
220 void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::UINT, tag> ttag, in copyAuthTag() argument
223 auth_list->push_back(ttag, ASN1_INTEGER_get(asn1_int)); in copyAuthTag()
251 void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::ULONG, tag> ttag, in copyAuthTag() argument
255 auth_list->push_back(ttag, BignumToUint64(num.get())); in copyAuthTag()
[all …]
/hardware/interfaces/security/keymint/support/
Dattestation_record.cpp200 void copyAuthTag(const stack_st_ASN1_INTEGER* stack, TypedTag<TagType::ENUM_REP, tag> ttag, in copyAuthTag() argument
202 typedef typename TypedTag2ValueType<decltype(ttag)>::type ValueT; in copyAuthTag()
205 ttag, static_cast<ValueT>(ASN1_INTEGER_get(sk_ASN1_INTEGER_value(stack, i)))); in copyAuthTag()
210 void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::ENUM, tag> ttag, in copyAuthTag() argument
212 typedef typename TypedTag2ValueType<decltype(ttag)>::type ValueT; in copyAuthTag()
214 auth_list->push_back(ttag, static_cast<ValueT>(ASN1_INTEGER_get(asn1_int))); in copyAuthTag()
218 void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::UINT, tag> ttag, in copyAuthTag() argument
221 auth_list->push_back(ttag, ASN1_INTEGER_get(asn1_int)); in copyAuthTag()
249 void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::ULONG, tag> ttag, in copyAuthTag() argument
253 auth_list->push_back(ttag, BignumToUint64(num.get())); in copyAuthTag()
[all …]
/hardware/interfaces/keymaster/4.1/vts/functional/
DKeymaster4_1HidlTest.h169 void add_tag_from_prop(AuthorizationSetBuilder* tags, TypedTag<TagType::BYTES, tag> ttag, in add_tag_from_prop() argument
173 tags->Authorization(ttag, prop_value.data(), prop_value.size()); in add_tag_from_prop()
/hardware/interfaces/security/keymint/aidl/vts/functional/
DKeyMintAidlTestBase.h321 void add_tag_from_prop(AuthorizationSetBuilder* tags, TypedTag<TagType::BYTES, tag> ttag, in add_tag_from_prop() argument
325 tags->Authorization(ttag, prop_value.data(), prop_value.size()); in add_tag_from_prop()
DKeyMintTest.cpp75 bool contains(const vector<KeyParameter>& set, TypedTag<tag_type, tag> ttag, in contains() argument
78 if (auto p = authorizationValue(ttag, param)) { in contains()
3082 void CheckCryptoParam(TypedTag<tag_type, tag> ttag, ValueT expected) { in CheckCryptoParam() argument
3086 EXPECT_TRUE(contains(entry.authorizations, ttag, expected)) in CheckCryptoParam()
3090 EXPECT_FALSE(contains(entry.authorizations, ttag, expected)) in CheckCryptoParam()
/hardware/interfaces/keymaster/4.0/vts/functional/
Dkeymaster_hidl_hal_test.cpp85 bool contains(hidl_vec<KeyParameter>& set, TypedTag<tag_type, tag> ttag, ValueT expected_value) { in contains() argument
87 return param.tag == tag && accessTagValue(ttag, param) == expected_value; in contains()
101 void add_tag_from_prop(AuthorizationSetBuilder* tags, TypedTag<TagType::BYTES, tag> ttag, in add_tag_from_prop() argument
106 tags->Authorization(ttag, reinterpret_cast<const uint8_t*>(value), in add_tag_from_prop()
1956 void CheckCryptoParam(TypedTag<tag_type, tag> ttag, ValueT expected) { in CheckCryptoParam() argument
1959 EXPECT_TRUE(contains(key_characteristics_.hardwareEnforced, ttag, expected)) in CheckCryptoParam()
1961 EXPECT_FALSE(contains(key_characteristics_.softwareEnforced, ttag)) in CheckCryptoParam()
1964 EXPECT_TRUE(contains(key_characteristics_.softwareEnforced, ttag, expected)) in CheckCryptoParam()
1966 EXPECT_FALSE(contains(key_characteristics_.hardwareEnforced, ttag)) in CheckCryptoParam()