/hardware/interfaces/security/keymint/support/include/keymint_support/ |
D | authorization_set.h | 168 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 …]
|
D | keymint_tags.h | 255 inline KeyParameter makeKeyParameter(TypedTag<tag_type, tag> ttag, ValueT&& value) { 258 retval.value = KeyParameterValue::make<TypedTag2ValueType<decltype(ttag)>::unionTag>( 295 inline KeyParameter Authorization(TypedTag<tag_type, tag> ttag, Args&&... args) { 307 return makeKeyParameter(ttag, std::forward<Args>(args)...); 334 authorizationValue(TypedTag<tag_type, tag> ttag, const KeyParameter& param) { 338 return accessTagValue(ttag, param);
|
/hardware/interfaces/keymaster/3.0/vts/functional/ |
D | attestation_record.cpp | 143 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 …]
|
D | authorization_set.h | 167 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 …]
|
D | keystore_tags_utils.cpp | 29 static TypedTag<tag_type, tag> chooseString(TypedTag<tag_type, tag> ttag, Tag runtime_tag, in chooseString() 34 return ttag; in chooseString()
|
D | keymaster_tags.h | 229 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);
|
D | authorization_set.cpp | 245 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()
|
D | keymaster_hidl_hal_test.cpp | 190 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/ |
D | authorization_set.h | 170 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()
|
D | keymaster_tags.h | 237 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/ |
D | attestation_record.cpp | 187 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 …]
|
D | authorization_set.cpp | 249 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/security/keymint/support/ |
D | attestation_record.cpp | 203 void copyAuthTag(const stack_st_ASN1_INTEGER* stack, TypedTag<TagType::ENUM_REP, tag> ttag, in copyAuthTag() argument 205 typedef typename TypedTag2ValueType<decltype(ttag)>::type ValueT; in copyAuthTag() 208 ttag, static_cast<ValueT>(ASN1_INTEGER_get(sk_ASN1_INTEGER_value(stack, i)))); in copyAuthTag() 213 void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::ENUM, tag> ttag, in copyAuthTag() argument 215 typedef typename TypedTag2ValueType<decltype(ttag)>::type ValueT; in copyAuthTag() 217 auth_list->push_back(ttag, static_cast<ValueT>(ASN1_INTEGER_get(asn1_int))); in copyAuthTag() 221 void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::UINT, tag> ttag, in copyAuthTag() argument 224 auth_list->push_back(ttag, ASN1_INTEGER_get(asn1_int)); in copyAuthTag() 252 void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::ULONG, tag> ttag, in copyAuthTag() argument 256 auth_list->push_back(ttag, BignumToUint64(num.get())); in copyAuthTag() [all …]
|
/hardware/interfaces/keymaster/4.1/support/ |
D | attestation_record.cpp | 202 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/keymaster/4.1/vts/functional/ |
D | Keymaster4_1HidlTest.h | 169 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/ |
D | KeyMintAidlTestBase.h | 390 void add_tag_from_prop(AuthorizationSetBuilder* tags, TypedTag<TagType::BYTES, tag> ttag, in add_tag_from_prop() argument 394 tags->Authorization(ttag, prop_value.data(), prop_value.size()); in add_tag_from_prop()
|
D | KeyMintTest.cpp | 90 bool contains(const vector<KeyParameter>& set, TypedTag<tag_type, tag> ttag, in contains() argument 93 if (auto p = authorizationValue(ttag, param)) { in contains() 3961 void CheckCryptoParam(TypedTag<tag_type, tag> ttag, ValueT expected) { in CheckCryptoParam() argument 3965 EXPECT_TRUE(contains(entry.authorizations, ttag, expected)) in CheckCryptoParam() 3969 EXPECT_FALSE(contains(entry.authorizations, ttag, expected)) in CheckCryptoParam()
|
/hardware/interfaces/keymaster/4.0/vts/functional/ |
D | keymaster_hidl_hal_test.cpp | 92 bool contains(hidl_vec<KeyParameter>& set, TypedTag<tag_type, tag> ttag, ValueT expected_value) { in contains() argument 94 return param.tag == tag && accessTagValue(ttag, param) == expected_value; in contains() 108 void add_tag_from_prop(AuthorizationSetBuilder* tags, TypedTag<TagType::BYTES, tag> ttag, in add_tag_from_prop() argument 113 tags->Authorization(ttag, reinterpret_cast<const uint8_t*>(value), in add_tag_from_prop() 1963 void CheckCryptoParam(TypedTag<tag_type, tag> ttag, ValueT expected) { in CheckCryptoParam() argument 1966 EXPECT_TRUE(contains(key_characteristics_.hardwareEnforced, ttag, expected)) in CheckCryptoParam() 1968 EXPECT_FALSE(contains(key_characteristics_.softwareEnforced, ttag)) in CheckCryptoParam() 1971 EXPECT_TRUE(contains(key_characteristics_.softwareEnforced, ttag, expected)) in CheckCryptoParam() 1973 EXPECT_FALSE(contains(key_characteristics_.hardwareEnforced, ttag)) in CheckCryptoParam()
|