Home
last modified time | relevance | path

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

/hardware/interfaces/identity/support/tests/
DIdentityCredentialSupportTest.cpp59 EXPECT_EQ("'Some text'", support::cborPrettyPrint(cppbor::Tstr("Some text").encode())); in TEST()
61 EXPECT_EQ("''", support::cborPrettyPrint(cppbor::Tstr("").encode())); in TEST()
65 cppbor::Bstr(vector<uint8_t>({1, 0, 2, 240, 255, 64})).encode())); in TEST()
67 EXPECT_EQ("{}", support::cborPrettyPrint(cppbor::Bstr(vector<uint8_t>()).encode())); in TEST()
69 EXPECT_EQ("true", support::cborPrettyPrint(cppbor::Bool(true).encode())); in TEST()
71 EXPECT_EQ("false", support::cborPrettyPrint(cppbor::Bool(false).encode())); in TEST()
73 EXPECT_EQ("42", support::cborPrettyPrint(cppbor::Uint(42).encode())); in TEST()
76 support::cborPrettyPrint(cppbor::Uint(std::numeric_limits<int64_t>::max()).encode())); in TEST()
78 EXPECT_EQ("-42", support::cborPrettyPrint(cppbor::Nint(-42).encode())); in TEST()
81 support::cborPrettyPrint(cppbor::Nint(std::numeric_limits<int64_t>::min()).encode())); in TEST()
[all …]
Dcppbor_test.cpp26 using namespace cppbor;
/hardware/interfaces/identity/aidl/vts/
DVtsHalIdentityEndToEndTest.cpp78 auto [item, _, message] = cppbor::parse(credentialData); in extractFromTestCredentialData()
83 const cppbor::Array* arrayItem = item->asArray(); in extractFromTestCredentialData()
88 const cppbor::Tstr* docTypeItem = (*arrayItem)[0]->asTstr(); in extractFromTestCredentialData()
89 const cppbor::Bool* testCredentialItem = in extractFromTestCredentialData()
92 const cppbor::Bstr* encryptedCredentialKeysItem = (*arrayItem)[2]->asBstr(); in extractFromTestCredentialData()
109 auto [dckItem, dckPos, dckMessage] = cppbor::parse(decryptedCredentialKeys.value()); in extractFromTestCredentialData()
113 const cppbor::Array* dckArrayItem = dckItem->asArray(); in extractFromTestCredentialData()
117 const cppbor::Bstr* storageKeyItem = (*dckArrayItem)[0]->asBstr(); in extractFromTestCredentialData()
118 const cppbor::Bstr* credentialPrivKeyItem = (*dckArrayItem)[1]->asBstr(); in extractFromTestCredentialData()
316 cppbor::Map deviceEngagement = cppbor::Map().add("ephX", ephX).add("ephY", ephY); in TEST_P()
[all …]
DReaderAuthTests.cpp261 cppbor::Map deviceEngagement = cppbor::Map().add("ephX", ephX).add("ephY", ephY); in retrieveData()
263 vector<uint8_t> eReaderPubBytes = cppbor::Tstr("ignored").encode(); in retrieveData()
264 cppbor::Array sessionTranscript = cppbor::Array() in retrieveData()
265 .add(cppbor::Semantic(24, deviceEngagementBytes)) in retrieveData()
266 .add(cppbor::Semantic(24, eReaderPubBytes)); in retrieveData()
272 cppbor::Map("nameSpaces", in retrieveData()
273 cppbor::Map().add("ns", cppbor::Map() in retrieveData()
282 cppbor::Map("nameSpaces", in retrieveData()
283 cppbor::Map().add("ns", cppbor::Map() in retrieveData()
293 cppbor::Array() in retrieveData()
[all …]
DUserAuthTests.cpp84 cppbor::Map sessionTranscript_;
155 cppbor::Map calcSessionTranscript(const vector<uint8_t>& ePublicKey) { in calcSessionTranscript()
157 cppbor::Map deviceEngagement = cppbor::Map().add("ephX", ephX).add("ephY", ephY); in calcSessionTranscript()
159 vector<uint8_t> eReaderPubBytes = cppbor::Tstr("ignored").encode(); in calcSessionTranscript()
162 cppbor::Map sessionTranscript; in calcSessionTranscript()
163 sessionTranscript.add(42, cppbor::Semantic(24, deviceEngagementBytes)); in calcSessionTranscript()
164 sessionTranscript.add(43, cppbor::Semantic(24, eReaderPubBytes)); in calcSessionTranscript()
202 cppbor::Map("nameSpaces", in retrieveData()
203 cppbor::Map().add("ns", cppbor::Map() in retrieveData()
209 vector<uint8_t> dataToSign = cppbor::Array() in retrieveData()
[all …]
DVtsIdentityTestUtils.h63 valueCbor = cppbor::Tstr(((const char*)value.data())).encode(); in TestEntryData()
68 valueCbor = cppbor::Bstr(value).encode(); in TestEntryData()
72 valueCbor = cppbor::Bool(value).encode(); in TestEntryData()
77 valueCbor = cppbor::Uint(value).encode(); in TestEntryData()
79 valueCbor = cppbor::Nint(-value).encode(); in TestEntryData()
/hardware/interfaces/identity/aidl/default/
DIdentityCredential.cpp46 auto [item, _, message] = cppbor::parse(credentialData_); in initialize()
52 const cppbor::Array* arrayItem = item->asArray(); in initialize()
58 const cppbor::Tstr* docTypeItem = (*arrayItem)[0]->asTstr(); in initialize()
59 const cppbor::Bool* testCredentialItem = in initialize()
62 const cppbor::Bstr* encryptedCredentialKeysItem = (*arrayItem)[2]->asBstr(); in initialize()
88 auto [dckItem, dckPos, dckMessage] = cppbor::parse(decryptedCredentialKeys.value()); in initialize()
93 const cppbor::Array* dckArrayItem = dckItem->asArray(); in initialize()
98 const cppbor::Bstr* storageKeyItem = (*dckArrayItem)[0]->asBstr(); in initialize()
99 const cppbor::Bstr* credentialPrivKeyItem = (*dckArrayItem)[1]->asBstr(); in initialize()
112 cppbor::Array array = {"ProofOfDeletion", docType_, testCredential_}; in deleteCredential()
[all …]
DWritableIdentityCredential.cpp132 signedDataAccessControlProfiles_ = cppbor::Array(); in startPersonalization()
133 signedDataNamespaces_ = cppbor::Map(); in startPersonalization()
134 signedDataCurrentNamespace_ = cppbor::Array(); in startPersonalization()
191 cppbor::Map profileMap; in addAccessControlProfile()
195 cppbor::Bstr(profile.readerCertificate.encodedCertificate)); in addAccessControlProfile()
252 signedDataCurrentNamespace_ = cppbor::Array(); in beginAddEntry()
315 auto [item, _, message] = cppbor::parse(entryBytes_); in addEntryValue()
320 cppbor::Map entryMap; in addEntryValue()
323 cppbor::Array profileIdArray; in addEntryValue()
345 cppbor::Array array; in generateCredentialKeys()
[all …]
DUtil.cpp43 cppbor::Map map; in secureAccessControlProfileEncodeCbor()
47 map.add("readerCertificate", cppbor::Bstr(profile.readerCertificate.encodedCertificate)); in secureAccessControlProfileEncodeCbor()
96 cppbor::Map map; in entryCreateAdditionalData()
100 cppbor::Array acpIds; in entryCreateAdditionalData()
DWritableIdentityCredential.h85 cppbor::Array signedDataAccessControlProfiles_;
86 cppbor::Map signedDataNamespaces_;
87 cppbor::Array signedDataCurrentNamespace_;
DIdentityCredential.h106 std::unique_ptr<cppbor::Item> sessionTranscriptItem_;
110 cppbor::Map deviceNameSpacesMap_;
111 cppbor::Map currentNameSpaceDeviceNameSpacesMap_;
/hardware/interfaces/identity/support/src/
DIdentityCredentialSupport.cpp151 static bool cborAreAllElementsNonCompound(const cppbor::CompoundItem* compoundItem) { in cborAreAllElementsNonCompound()
152 if (compoundItem->type() == cppbor::ARRAY) { in cborAreAllElementsNonCompound()
153 const cppbor::Array* array = compoundItem->asArray(); in cborAreAllElementsNonCompound()
155 const cppbor::Item* entry = (*array)[n].get(); in cborAreAllElementsNonCompound()
157 case cppbor::ARRAY: in cborAreAllElementsNonCompound()
158 case cppbor::MAP: in cborAreAllElementsNonCompound()
165 const cppbor::Map* map = compoundItem->asMap(); in cborAreAllElementsNonCompound()
169 case cppbor::ARRAY: in cborAreAllElementsNonCompound()
170 case cppbor::MAP: in cborAreAllElementsNonCompound()
176 case cppbor::ARRAY: in cborAreAllElementsNonCompound()
[all …]
Dcppbor.cpp23 namespace cppbor { namespace
Dcppbor_parse.cpp25 namespace cppbor { namespace
/hardware/interfaces/identity/support/
DAndroid.bp66 "src/cppbor.cpp",
70 "include/cppbor",
/hardware/interfaces/identity/support/include/cppbor/
DREADME.md70 cppbor::Uint val(0);
78 ``` using cppbor::Map;
79 using cppbor::Array;
101 using cppbor::Map;
102 using cppbor::Array;
155 using namespace cppbor; // For example brevity
Dcppbor_parse.h21 namespace cppbor {
Dcppbor.h27 namespace cppbor {
187 return ::cppbor::encodeHeader(type(), addlInfo, pos, end); in encodeHeader()
194 ::cppbor::encodeHeader(type(), addlInfo, encodeCallback); in encodeHeader()