Home
last modified time | relevance | path

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

12

/hardware/interfaces/identity/aidl/vts/
DTestCredentialTests.cpp105 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 …]
DEndToEndTests.cpp81 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 …]
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::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 …]
DAuthenticationKeyTests.cpp109 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()
DUtil.h64 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()
DUpdateCredentialTests.cpp106 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()
DDeleteCredentialTests.cpp129 string cborPretty = cppbor::prettyPrint(proofOfDeletion.value(), 32, {}); in TEST_P()
156 string cborPretty = cppbor::prettyPrint(proofOfDeletion.value(), 32, {}); in TEST_P()
DProveOwnershipTests.cpp134 string cborPretty = cppbor::prettyPrint(proofOfOwnership.value(), 32, {}); in TEST_P()
DVtsIWritableIdentityCredentialTests.cpp341 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/
Dremote_prov_utils.cpp42 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 …]
Dremote_prov_utils_test.cpp69 cppbor::parse(kCoseEncodedGeekCert, sizeof(kCoseEncodedGeekCert)); in TEST()
86 cppbor::Array array; in TEST()
/hardware/interfaces/identity/support/tests/
DIdentityCredentialSupportTest.cpp129 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/
DVtsRemotelyProvisionedComponentTests.cpp61 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 …]
DKeyMintAidlTestBase.cpp1572 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/
DIdentityCredential.cpp48 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 …]
DWritableIdentityCredential.cpp125 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 …]
DWritableIdentityCredential.h97 cppbor::Array signedDataAccessControlProfiles_;
98 cppbor::Map signedDataNamespaces_;
99 cppbor::Array signedDataCurrentNamespace_;
DIdentityCredential.h126 cppbor::Map deviceNameSpacesMap_;
127 cppbor::Map currentNameSpaceDeviceNameSpacesMap_;
/hardware/interfaces/identity/support/src/
DIdentityCredentialSupport.cpp1576 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 …]
Dcppbor.cpp23 namespace cppbor { namespace
Dcppbor_parse.cpp25 namespace cppbor { namespace
/hardware/interfaces/security/keymint/support/include/remote_prov/
Dremote_prov_utils.h88 ErrMsgOr<std::vector<BccEntryData>> validateBcc(const cppbor::Array* bcc);
110 JsonOutput jsonEncodeCsrWithBuild(const cppbor::Array& csr);
/hardware/interfaces/identity/support/
DAndroid.bp76 "src/cppbor.cpp",
80 "include/cppbor",
/hardware/interfaces/identity/support/include/cppbor/
Dcppbor_parse.h21 namespace 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

12