TinyCBOR release 0.5 (beta1)

This is a beta release of TinyCBOR 0.5. Beta releases may have bugs and
the API is still subject to change.

TinyCBOR 0.5 contains numerous fixes and new API compared to 0.4. The
main feature in this release is the CBOR Validation API, which can be
used to perform a deeper validation of the contents than the simple
syntax correctness that the main parser API provides. In particular, the
API can be used to confirm that a given CBOR data type was encoded using
either the Canonical Format (RFC 7049 section 3.9) and the Strict Mode
(section 3.10). The API can also be used to confirm CBOR Text Strings
carry properly-encoded UTF-8 text, a verification that the main parser
does not perform.

Starting in this release, the TINYCBOR_VERSION macro will be defined to
the current version number.

Other relevant changes include:

 - The list of known tags includes the tags used for CBOR Object Signing
   and Encryption (COSE - RFC 8152).
 - A new pair of functions cbor_value_get_{text,byte}_string_chunk can
   be used to obtain a direct pointer to the string data, without any
   memory allocation or memcpy (zero copy).
 - the functions taking FILE* are now conditional on a hosted C
   environment. They are not declared for freestanding C environments.

The project maintainer would like to thank the following people for
contributing to this release:
 Alex Radutskiy
 Bertrand Roussel
 Erich Keane
 Fabrice Fontaine
 Philippe Coval
 Vipul Rahane
Encoder: Fix off-by-one error encoding negative numbers

The documentation said we encoded the negative value equivalent to the
passed absolute value. That means encode_number() requires the

This commit takes the opportunity to unit-test the rest of the integer
API in the parser.

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
3 files changed