Age | Commit message (Collapse) | Author |
|
The variadic Array constructor would implicitly make an Array object
from a single input that is convertable to an Item. This leads to
surprising behaviors wherein Arrays could be created unintentionally.
Fix this by making the variadic constructor only work for more than
one argument. Add an additional, single-item constructor that is
explicit.
Bug: 191778240
Test: cppbor_host_test_external
Change-Id: Ifadc6d3137ee285a81076a4125b6053f1d7c21c4
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1536784
Change-Id: I8003ef670f9ec658392ffeb4496df7aaae7cf15d
|
|
Switch to building libcppcbor with the library.mk system instead of as a
generic lk module.
Test: build.py qemu-generic-arm64-test-debug
Change-Id: I04b91b6c18480bdc9018be18aebaf9b40bdefedf
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1670288
Change-Id: I3e6410ec4e3dfddf1c8d00241c175ad6307f39df
|
|
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1663840
Change-Id: I8e27a73ec953c0db8a44fbff11c5dc81b26e11b0
|
|
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
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1670287
Change-Id: I817c04110708942a2977487603f852f949160529
|
|
AOSP is the upstream source for this library.
Test: Purple is a good color for a bike shed.
Change-Id: I6be4c7ec47b15cc5fbed8091555613ef22623c28
|
|
Due to the overloading behavior in sub-classes, access to the methods
returning const types in Item were not accessible from the Item
subclasses. This change adds the using statements necessary to fix that.
Test: cd hardware/interfaces/identity && mm -j48
Change-Id: I40bff6470c5fecfb308fec527540a8fbf1abf91a
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1658065
Change-Id: I382cf2f91896465db2fbdc67e7d6afb4ee51bf61
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1658064
Change-Id: I643cd7fc1fa0f5e7430adabc73b7a2536d14bf0f
|
|
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
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1588192
Change-Id: I97ebf04460b75af783b1759a8e5816bc198cf321
|
|
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
|
|
Bug: 180401296
Merged-In: Iaa423f28a08a8b8619ceff179b69b7d102a596ce
Change-Id: I6a852dd1175a92e556ba415cf48822ae6ab607eb
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1588871
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I68b59e51881ce2565f9791ee5d9ce6ab845704fc
|
|
Added SPDX-license-identifier-Apache-2.0 to:
Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Exempt-From-Owner-Approval: janitorial work
Change-Id: Iaf70ec58fa73969cf9d7baeac57f56d745475e40
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515385
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Iaa423f28a08a8b8619ceff179b69b7d102a596ce
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515385
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ic98c01b5918eda13e21f0ff8d5343f98d5286914
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515384
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Icb8f251953eac9e5d58d9231e2c00fe76522abfa
|
|
be17dfffad
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515383
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I92a8bb0aae2636ceacc214160d1a7b4079064a65
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515384
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I1ed83527b3d731f12817e3a860e40f8b7be06251
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515383
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ic2e4d9e214c50a92d595d19e9c9a7aaddb213e91
|
|
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 safe downcast template was never used and is hard to implement
with the coming SemanticTag changes, so this CL removes it.
Test: cppbor_test_external
Change-Id: I0d4dd8b7323653c3924080f8fb328282dbca4566
|
|
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
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515382
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I8858e2a6fc149eb8dd9de15bef54264b08ecf5ca
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515382
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ic1ef63c321e42104feadca4751ac54b8d88abdb4
|
|
* changes:
Add Array iterators.
Add non-const as*() methods.
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515380
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ic67708c894be12ebeffbe54d5b8f075e94778f64
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515380
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I9dd3988cda35ddd5e18c98d09d168318c68ea8bc
|
|
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515379
Change-Id: If566527cdf971bf327e1e15886c50ab834a6f861
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1515379
Change-Id: I0f75631937e389d57d5733719629ed5a603b6cac
|
|
Test: cppbor_test_external
Change-Id: Id47afed4927db47312b8bdf31a594b847448fb7d
|
|
Other changes coming require non-const methods for safe downcasting,
but this change stands alone since not having them was clearly an
oversight.
Test: cppbor_test_external
Change-Id: I55b8206778f3c4de8e9fc5039efda0c2f45bfe00
|
|
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
|
|
Test: cppbor_host_test_external
Change-Id: I0a7aaa1ba7d98c4660950ccfa1df743fe5f23d47
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1510449
Change-Id: I5f1d923295ad123260c9c5270c0a2e8cabcee4ba
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1510449
Change-Id: I2c91190210b6aba9090781d9bee372d6fbc6ef02
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1506866
Change-Id: I1cfa47099cf6259b82362bbbfbb69a35a6a96723
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1506865
Change-Id: I09b23e6d8afc616ba7f4b1bb4b66ad7f59664611
|
|
Bug: 174164961
Test: Build Trusty
Change-Id: Id0d9d464e6c4b600ffec53a4dbb5a1992b573c29
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1506866
Change-Id: Ia920be733265e7feb01aee1633ed39e5560998cf
|
|
Original change: https://android-review.googlesource.com/c/platform/external/libcppbor/+/1506865
Change-Id: I5c9067a0ebaa7c4b1921c8046db444b0672f50ed
|
|
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
|
|
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/libcppbor/+/13112837
Change-Id: I76e5d30c9eed5a580a496f3d021f6e9be3d11e70
|
|
Bug: 172690556
Change-Id: I2f94cb574530b92e39f749c9c5a0e2ba4cd61967
|