/hardware/interfaces/identity/aidl/vts/ |
D | TestCredentialTests.cpp | 105 vector<uint8_t> tstrLastName = cppbor::Tstr("Turing").encode(); in TEST_P() 117 string cborPretty = cppbor::prettyPrint(proofOfProvisioning.value(), 32, {}); in TEST_P() 145 auto [item, _, message] = cppbor::parse(credentialData); in TEST_P() 147 const cppbor::Array* arrayItem = item->asArray(); in TEST_P() 150 const cppbor::Tstr* docTypeItem = (*arrayItem)[0]->asTstr(); in TEST_P() 151 const cppbor::Bool* testCredentialItem = in TEST_P() 158 const cppbor::Bstr* encryptedCredentialKeysItem = (*arrayItem)[2]->asBstr(); in TEST_P() 164 auto [dckItem, dckPos, dckMessage] = cppbor::parse(decryptedCredentialKeys.value()); in TEST_P() 166 const cppbor::Array* dckArrayItem = dckItem->asArray(); in TEST_P() 174 const cppbor::Bstr* storageKeyItem = (*dckArrayItem)[0]->asBstr(); in TEST_P() [all …]
|
D | EndToEndTests.cpp | 81 auto [item, _, message] = cppbor::parse(credentialData); in extractFromTestCredentialData() 86 const cppbor::Array* arrayItem = item->asArray(); in extractFromTestCredentialData() 91 const cppbor::Tstr* docTypeItem = (*arrayItem)[0]->asTstr(); in extractFromTestCredentialData() 92 const cppbor::Bool* testCredentialItem = in extractFromTestCredentialData() 95 const cppbor::Bstr* encryptedCredentialKeysItem = (*arrayItem)[2]->asBstr(); in extractFromTestCredentialData() 112 auto [dckItem, dckPos, dckMessage] = cppbor::parse(decryptedCredentialKeys.value()); in extractFromTestCredentialData() 116 const cppbor::Array* dckArrayItem = dckItem->asArray(); in extractFromTestCredentialData() 123 const cppbor::Bstr* storageKeyItem = (*dckArrayItem)[0]->asBstr(); in extractFromTestCredentialData() 124 const cppbor::Bstr* credentialPrivKeyItem = (*dckArrayItem)[1]->asBstr(); in extractFromTestCredentialData() 131 const cppbor::Bstr* sha256PopItem = (*dckArrayItem)[2]->asBstr(); in extractFromTestCredentialData() [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::SemanticTag(24, deviceEngagementBytes)) in retrieveData() 266 .add(cppbor::SemanticTag(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 | AuthenticationKeyTests.cpp | 109 vector<uint8_t> tstrLastName = cppbor::Tstr("Turing").encode(); in TEST_P() 121 string cborPretty = cppbor::prettyPrint(proofOfProvisioning.value(), 32, {}); in TEST_P() 175 auto [item, _, message] = cppbor::parse(proofOfBinding.value()); in TEST_P() 177 const cppbor::Array* arrayItem = item->asArray(); in TEST_P() 180 const cppbor::Tstr* strItem = (*arrayItem)[0]->asTstr(); in TEST_P() 183 const cppbor::Bstr* popSha256Item = (*arrayItem)[1]->asBstr(); in TEST_P()
|
D | Util.h | 64 valueCbor = cppbor::Tstr(((const char*)value.data())).encode(); in TestEntryData() 69 valueCbor = cppbor::Bstr(value).encode(); in TestEntryData() 73 valueCbor = cppbor::Bool(value).encode(); in TestEntryData() 78 valueCbor = cppbor::Uint(value).encode(); in TestEntryData() 80 valueCbor = cppbor::Nint(-value).encode(); in TestEntryData()
|
D | UpdateCredentialTests.cpp | 106 vector<uint8_t> tstrLastName = cppbor::Tstr("Prince").encode(); in provisionData() 117 string cborPretty = cppbor::prettyPrint(proofOfProvisioning.value(), 32, {}); in provisionData() 188 vector<uint8_t> tstrLastName = cppbor::Tstr("T.A.F.K.A.P").encode(); in TEST_P() 198 string cborPretty = cppbor::prettyPrint(proofOfProvisioning.value(), 32, {}); in TEST_P()
|
D | DeleteCredentialTests.cpp | 129 string cborPretty = cppbor::prettyPrint(proofOfDeletion.value(), 32, {}); in TEST_P() 156 string cborPretty = cppbor::prettyPrint(proofOfDeletion.value(), 32, {}); in TEST_P()
|
D | ProveOwnershipTests.cpp | 134 string cborPretty = cppbor::prettyPrint(proofOfOwnership.value(), 32, {}); in TEST_P()
|
D | VtsIWritableIdentityCredentialTests.cpp | 341 string cborPretty = cppbor::prettyPrint(proofOfProvisioning.value(), 32, {"readerCertificate"}); in TEST_P() 451 string cborPretty = cppbor::prettyPrint(proofOfProvisioning.value(), in TEST_P()
|
/hardware/interfaces/security/keymint/support/ |
D | remote_prov_utils.cpp | 42 auto eekChain = cppbor::Array(); in generateEekChain() 55 cppbor::Map() /* payload CoseKey */ in generateEekChain() 74 cppbor::Map() /* payload CoseKey */ in generateEekChain() 101 ErrMsgOr<bytevec> verifyAndParseCoseSign1Cwt(const cppbor::Array* coseSign1, in verifyAndParseCoseSign1Cwt() 107 const cppbor::Bstr* protectedParams = coseSign1->get(kCoseSign1ProtectedParams)->asBstr(); in verifyAndParseCoseSign1Cwt() 108 const cppbor::Map* unprotectedParams = coseSign1->get(kCoseSign1UnprotectedParams)->asMap(); in verifyAndParseCoseSign1Cwt() 109 const cppbor::Bstr* payload = coseSign1->get(kCoseSign1Payload)->asBstr(); in verifyAndParseCoseSign1Cwt() 110 const cppbor::Bstr* signature = coseSign1->get(kCoseSign1Signature)->asBstr(); in verifyAndParseCoseSign1Cwt() 116 auto [parsedProtParams, _, errMsg] = cppbor::parse(protectedParams); in verifyAndParseCoseSign1Cwt() 132 auto [parsedPayload, __, payloadErrMsg] = cppbor::parse(payload); in verifyAndParseCoseSign1Cwt() [all …]
|
D | remote_prov_utils_test.cpp | 69 cppbor::parse(kCoseEncodedGeekCert, sizeof(kCoseEncodedGeekCert)); in TEST() 86 cppbor::Array array; in TEST()
|
/hardware/interfaces/identity/support/tests/ |
D | IdentityCredentialSupportTest.cpp | 129 string out = cppbor::prettyPrint(coseSign1.value()); in TEST() 160 string out = cppbor::prettyPrint(coseSign1.value()); in TEST() 321 cppbor::prettyPrint(mac.value())); in TEST() 343 cppbor::prettyPrint(mac.value())); in TEST() 368 const cppbor::Item* findValueForTstr(const cppbor::Map* map, const string& keyValue) { in findValueForTstr() 377 const cppbor::Array* findArrayValueForTstr(const cppbor::Map* map, const string& keyValue) { in findArrayValueForTstr() 378 const cppbor::Item* item = findValueForTstr(map, keyValue); in findArrayValueForTstr() 385 const cppbor::Map* findMapValueForTstr(const cppbor::Map* map, const string& keyValue) { in findMapValueForTstr() 386 const cppbor::Item* item = findValueForTstr(map, keyValue); in findMapValueForTstr() 393 const cppbor::SemanticTag* findSemanticValueForTstr(const cppbor::Map* map, in findSemanticValueForTstr() [all …]
|
/hardware/interfaces/security/keymint/aidl/vts/functional/ |
D | VtsRemotelyProvisionedComponentTests.cpp | 61 auto [coseMac0, _, mac0ParseErr] = cppbor::parse(macedPubKey.macedKey); in corrupt_maced_key() 72 auto corruptMac0 = cppbor::Array(); in corrupt_maced_key() 79 corruptMac0.add(cppbor::Bstr(tagData)); in corrupt_maced_key() 84 ErrMsgOr<cppbor::Array> corrupt_sig(const cppbor::Array* coseSign1) { in corrupt_sig() 88 const cppbor::Bstr* protectedParams = coseSign1->get(kCoseSign1ProtectedParams)->asBstr(); in corrupt_sig() 89 const cppbor::Map* unprotectedParams = coseSign1->get(kCoseSign1UnprotectedParams)->asMap(); in corrupt_sig() 90 const cppbor::Bstr* payload = coseSign1->get(kCoseSign1Payload)->asBstr(); in corrupt_sig() 91 const cppbor::Bstr* signature = coseSign1->get(kCoseSign1Signature)->asBstr(); in corrupt_sig() 96 auto corruptSig = cppbor::Array(); in corrupt_sig() 102 corruptSig.add(cppbor::Bstr(sigData)); in corrupt_sig() [all …]
|
D | KeyMintAidlTestBase.cpp | 1572 auto [parsedPayload, __, payloadParseErr] = cppbor::parse(data); in check_cose_key() 1577 EXPECT_THAT(cppbor::prettyPrint(parsedPayload.get()), in check_cose_key() 1590 EXPECT_THAT(cppbor::prettyPrint(parsedPayload.get()), in check_cose_key() 1608 auto [coseMac0, _, mac0ParseErr] = cppbor::parse(macedPubKey.macedKey); in check_maced_pubkey() 1618 ASSERT_EQ(cppbor::prettyPrint(protParms->value()), "{\n 1 : 5,\n}"); in check_maced_pubkey() 1654 auto [parsedPayload, __, payloadParseErr] = cppbor::parse(coseKeyData); in p256_pub_key() 1657 const std::unique_ptr<cppbor::Item>& xItem = coseKey->get(cppcose::CoseKey::PUBKEY_X); in p256_pub_key() 1660 const std::unique_ptr<cppbor::Item>& yItem = coseKey->get(cppcose::CoseKey::PUBKEY_Y); in p256_pub_key()
|
/hardware/interfaces/identity/aidl/default/common/ |
D | IdentityCredential.cpp | 48 auto [item, _, message] = cppbor::parse(credentialData_); in initialize() 54 const cppbor::Array* arrayItem = item->asArray(); in initialize() 60 const cppbor::Tstr* docTypeItem = (*arrayItem)[0]->asTstr(); in initialize() 61 const cppbor::Bool* testCredentialItem = in initialize() 64 const cppbor::Bstr* encryptedCredentialKeysItem = (*arrayItem)[2]->asBstr(); in initialize() 101 cppbor::Array array = {"ProofOfDeletion", docType_, testCredential_}; in deleteCredentialCommon() 136 cppbor::Array array; in proveOwnership() 220 std::unique_ptr<cppbor::Item> sessionTranscriptItem; in startRetrieval() 222 auto [item, _, message] = cppbor::parse(sessionTranscript); in startRetrieval() 426 auto [item, _, message] = cppbor::parse(itemsRequest); in startRetrieval() [all …]
|
D | WritableIdentityCredential.cpp | 125 signedDataAccessControlProfiles_ = cppbor::Array(); in startPersonalization() 126 signedDataNamespaces_ = cppbor::Map(); in startPersonalization() 127 signedDataCurrentNamespace_ = cppbor::Array(); in startPersonalization() 184 cppbor::Map profileMap; in addAccessControlProfile() 188 cppbor::Bstr(profile.readerCertificate.encodedCertificate)); in addAccessControlProfile() 254 signedDataCurrentNamespace_ = cppbor::Array(); in beginAddEntry() 316 auto [item, _, message] = cppbor::parse(entryBytes_); in addEntryValue() 321 cppbor::Map entryMap; in addEntryValue() 324 cppbor::Array profileIdArray; in addEntryValue() 353 cppbor::Array popArray; in finishAddingEntries() [all …]
|
D | WritableIdentityCredential.h | 97 cppbor::Array signedDataAccessControlProfiles_; 98 cppbor::Map signedDataNamespaces_; 99 cppbor::Array signedDataCurrentNamespace_;
|
D | IdentityCredential.h | 126 cppbor::Map deviceNameSpacesMap_; 127 cppbor::Map currentNameSpaceDeviceNameSpacesMap_;
|
/hardware/interfaces/identity/support/src/ |
D | IdentityCredentialSupport.cpp | 1576 cppbor::Array sigStructure; in coseBuildToBeSigned() 1596 vector<uint8_t> coseEncodeHeaders(const cppbor::Map& protectedHeaders) { in coseEncodeHeaders() 1598 cppbor::Bstr emptyBstr(vector<uint8_t>({})); in coseEncodeHeaders() 1675 cppbor::Map unprotectedHeaders; in coseSignEcDsaWithSignature() 1676 cppbor::Map protectedHeaders; in coseSignEcDsaWithSignature() 1689 cppbor::Array certArray; in coseSignEcDsaWithSignature() 1699 cppbor::Array coseSign1; in coseSignEcDsaWithSignature() 1703 cppbor::Null nullValue; in coseSignEcDsaWithSignature() 1718 cppbor::Map unprotectedHeaders; in coseSignEcDsa() 1719 cppbor::Map protectedHeaders; in coseSignEcDsa() [all …]
|
D | cppbor.cpp | 23 namespace cppbor { namespace
|
D | cppbor_parse.cpp | 25 namespace cppbor { namespace
|
/hardware/interfaces/security/keymint/support/include/remote_prov/ |
D | remote_prov_utils.h | 88 ErrMsgOr<std::vector<BccEntryData>> validateBcc(const cppbor::Array* bcc); 110 JsonOutput jsonEncodeCsrWithBuild(const cppbor::Array& csr);
|
/hardware/interfaces/identity/support/ |
D | Android.bp | 76 "src/cppbor.cpp", 80 "include/cppbor",
|
/hardware/interfaces/identity/support/include/cppbor/ |
D | cppbor_parse.h | 21 namespace 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
|