/hardware/interfaces/identity/support/tests/ |
D | IdentityCredentialSupportTest.cpp | 59 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 …]
|
D | cppbor_test.cpp | 26 using namespace cppbor;
|
/hardware/interfaces/identity/aidl/vts/ |
D | VtsHalIdentityEndToEndTest.cpp | 78 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 …]
|
D | ReaderAuthTests.cpp | 261 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 …]
|
D | UserAuthTests.cpp | 84 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 …]
|
D | VtsIdentityTestUtils.h | 63 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/ |
D | IdentityCredential.cpp | 46 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 …]
|
D | WritableIdentityCredential.cpp | 132 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 …]
|
D | Util.cpp | 43 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()
|
D | WritableIdentityCredential.h | 85 cppbor::Array signedDataAccessControlProfiles_; 86 cppbor::Map signedDataNamespaces_; 87 cppbor::Array signedDataCurrentNamespace_;
|
D | IdentityCredential.h | 106 std::unique_ptr<cppbor::Item> sessionTranscriptItem_; 110 cppbor::Map deviceNameSpacesMap_; 111 cppbor::Map currentNameSpaceDeviceNameSpacesMap_;
|
/hardware/interfaces/identity/support/src/ |
D | IdentityCredentialSupport.cpp | 151 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 …]
|
D | cppbor.cpp | 23 namespace cppbor { namespace
|
D | cppbor_parse.cpp | 25 namespace cppbor { namespace
|
/hardware/interfaces/identity/support/ |
D | Android.bp | 66 "src/cppbor.cpp", 70 "include/cppbor",
|
/hardware/interfaces/identity/support/include/cppbor/ |
D | README.md | 70 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
|
D | cppbor_parse.h | 21 namespace cppbor {
|
D | cppbor.h | 27 namespace cppbor { 187 return ::cppbor::encodeHeader(type(), addlInfo, pos, end); in encodeHeader() 194 ::cppbor::encodeHeader(type(), addlInfo, encodeCallback); in encodeHeader()
|