Age | Commit message (Collapse) | Author |
|
Bug: 192743373
Test: To be verified with fuzzer test case.
Change-Id: If052fcb2b2bbc5e0bfc8cfccc51cef11b9914017
|
|
Bug: 191303307
Test: Fuzzer from bug
Change-Id: I98830ec1bd77f152266f35a585d286be13a2551b
|
|
This fixes an incorrect integer cast in the handleNint function
in cppbor_parse.cpp which would trigger UBSAN failures in the
Trusty apploader.
Change-Id: Id35865e524c9837d907fe352feac783b3f7f36b0
|
|
Null, true and false are handled but any other simple value, or floating
pointer value, would otherwise reach the CHECK() that was expected to be
unreachable. Instead, error when an unhandled value is seen.
Test: cppbor_host_test_external
Change-Id: Idb1099bbc51649e5eb8f5fb4fa60553e8cbe7e8f
|
|
RFC 8949 defines additional information values 28, 29, 30 and 31 as
either reserved or indicating indefinite length values. Reject all of
these.
Test: cppbor_host_test_external
Change-Id: Ic9ae7630c8f75d060e4199d375c1f696699a4f66
|
|
This CL adds two new ViewTstr and ViewBstr Item types that hold
strings as string_view and basic_string_view<uint8_t> types
instead of std::string or std::vector<uint8_t>, respectively.
This allows for zero-copy parsing of CBOR (mainly strings),
which is useful in low-memory environments like the apploader
where CBOR data can contain large bstr values.
Bug: 115420908
Test: cppbor_host_test_external
Change-Id: I69322f0de258e3583cbd842ce240398504a1973f
|
|
Semantic tagging in libcppbor was a bit cumbersome to use, with tags
treated as separate items, requiring code that analyzes tagged data to
pay attention to the tags. Among other issues, that violates the
intention of semantic tagging in CBOR, which, per the RFC, does not
require decoders to understand tags. This CL changes that behavior so
that code that walks a parsed Item tree will not "see" the tags unless
it looks for them, by calling "Item::semanticTagCount()" and then
"Item::semanticTag()". Nested tags are supported.
Test: cppbor_test_external
Change-Id: Ifa99475fd0d9f369f3e379251979446a2ec262b5
|
|
This CL changes Map storage to use a vector of pairs, which removes
the need to copy the contents twice to sort them and makes it easy to
support Map iteration. Support for recursive canonicalization is
added as well, and Map::get() uses a binary search when the map is
canonicalized.
Test: cppbor_test_external
Change-Id: Ie7cee5d504e205e1768a26ec5df8436805a6eefe
|
|
Refactor to remove CompoundItem. It was a way to share some common
code between Array and Map, and later Semantic, but the
representations of those classes need to diverge so it adds no value.
Test: cppbor_test_external
Change-Id: I986e90c1d212f6d81debe4b2f650ba68f065a6ed
|
|
1. Add pretty-printing (moved from IdentityCredentialSupport)
2. Add EncodedItem to make it easy to add already-encoded CBOR.
3. Add Map canonicalization.
4. Add support for adding enums as integers.
Test: cppbor_test_external
Change-Id: I641c87567a11de4641b2fcadebe72dd832fceb51
|
|
Test: cppbor_test_external
Change-Id: If907312dc498a241f077de40745c5908fad6c15a
|
|
Bug: 171373138
Test: trusty/vendor/google/aosp/scripts/build.py generic-arm64-test-debug
Test: m -j
Change-Id: Ib8ef8528ed21dc5043cf6fbc2d048c1a657e7be3
|
|
Add a rules.mk file to libcppbor to allow Trusty to depend on it.
Additionally, remove dependency on the Android logging framework when
running in the Trusty environment, and remove dependencies on
stringstream to improve portability.
Bug: 171373138
Test: trusty/vendor/google/aosp/scripts/build.py
generic-arm64-test-debug
Test: m -j
Change-Id: I7a01db28e6bf448886f4a7a1a4dea02d569493c9
|
|
This commit alters the binary names in the Android.bp file to avoid
conflicts with the internal copy of libcppbor in hardware/interfaces.
Once checked in, the copy will be removed and the binary names will be
reverted back to normal. This is to avoid chicken and egg build errors.
Test: tests are under tests/
Change-Id: I61355fb05d862a6809ac1e42bce714908da869b2
|
|
This reverts commit a7b145a6a5d05b89e9769ffea84d1068ef32bd4e.
Reason for revert: Need to submit with altered binary names
Change-Id: I73a6e442fdbd955bbbd9ab03a7c3096deabbc786
|
|
This commit just populates the repository with the code from the google
github repository
Test: tests/cppbor_test.cpp contains the relevant tests
Change-Id: I693c70abbec6919ed0aa477604a0dd6a16f32df2
|