cose-wg / COSE-C

Implementation of COSE in C++; Provides a C interface; Crypto by openssl or mbedtls
BSD 3-Clause "New" or "Revised" License
30 stars 22 forks source link

move configure.h to include/ #63

Closed wgtdkp closed 5 years ago

wgtdkp commented 5 years ago

It is weird that a header file cose.h in include/ needs to include configure.h in src/. Application using COSE-C should only need to set COSE-C/include as header directory, but it currently needs to set COSE-C/src also.

The interface(include/) should not depend on the implementation(src/).

So, I think we should move configure.h to include/.

jimsch commented 5 years ago

makes sense.

jimsch commented 5 years ago

How much should the configure.h file be available to an external program? Should we just removed the configure.h file from cose.h?

wgtdkp commented 5 years ago

It seems that there is no necessary to include configure.h in cose.h, I will agree on removing it.

There is no necessary for an application to include configure.h. But, if we move configure.h to include/, applications using COSE-C are suggested to change macros in configure.h to enable/disable specific algorithms. It could be useful to reduce resources when it is used in embedded systems.

So, my opinion will be: