commit | d6f46a3b87503631f6545c27181bd1ba7c29f445 | [log] [tgz] |
---|---|---|
author | wgtdkp <wgtdkp@163.com> | Wed May 15 01:59:31 2019 +0800 |
committer | Jim Schaad <ietf@augustcellars.com> | Tue May 14 10:59:31 2019 -0700 |
tree | 7ed1f990cd882deafdcaae6e8ac773533f4dfb73 | |
parent | ba835ff20a6a7668d4a225badf66b6bcdced0f3a [diff] |
move configure.h to include/ (issue #63) (#64) * move configure.h to include/ (issue #63) * remove configure.h from cose.h * fixbug: includes configure.h in tests
This project is a C implementation of the IETF CBOR Encoded Message Syntax (COSE). COSE has reached RFC status and is now available at RFC 8152.
In addition to the core document the following have also become RFCs:
The project is using the CN-CBOR project to provide an implementation of the Concise Binary Object Representation or CBOR.
The project is setup to use two different cryptographic
Open SSL - This is a reasonable complete implementation
MbedTLS - Not all cryptographic primitives have been linked between COSE and the library yet.
Go ahead, file issues, make pull requests.
The project is setup to build using CMake. The way that the CMake files are setup, it requires that version 3.0 or higher is used.
The project requires the use of cn-cbor(https://github.com/jimsch/cn-cbor) in order to build. While this is based on the original version at (https://github.com/cabo/cn-cbor) there have been several updates to this version which have not been reflected in the base library. The CMake configuration files will automatically pull down the correct version when run.
The memory model used in this library is a mess. This is in large part because the memory model of cn-cbor is still poorly understood.
There are three different memory models that can be used with cn-cbor and cose-c, at this time only one of them is going to produce good results for long running systems.
The cn-cbor project was built with a specific memory model, but did not limit itself to that memory model when writing the code. It was originally designed for working on small devices that use a block allocator with sub-allocations done from that allocated block. This allows for all of the items allocated in that large block to be freed in a single operation when everything is done.
Build without USE_CONTEXT: This model uses standard calloc/free and suffers from the cn-cbor memory model problems.
Build with USE_CONTEXT and pass in NULL: This model is equivalent to the previous configuration.
Build with USE_CONTEXT and pass in a block allocator: This model works, but requires that you provide the allocator.