Thus it must not be postfixed with a colon character in the optstring.
While at it move the option to the beginning of the opstring to the
other options which don't expect an argument.
Without this commit the -U option is unusable.
The install target of cn-cbor's Makefile fails when the documentation
files have not been generated. To fix this, the doc target is
explicitly invoked before install.
examples/coap-server.c:
examples/etsi_iot_01.c:
Replace signal() with sigaction() for handling SIGINT or SIGTERM
examples/client.c:
Include sigaction() for catching SIGINT or SIGTERM for a clean shutdown.
undef PACKAGE_* so that TinyDTLS versions are used instead
include dtls_debug.h to get in the correct function definitions instead of
hardcoding some of them.
Create a read-write version of some of the const parameters passed in to
the interim functions before calling the underlying TinyDTLS functions.
.travis.yml
Add in the gnutls build.
build-env/Dockerfile.build-env
build-env/Dockerfile.develop
Add in libgnutls28-dev to the apt-get list.
scripts/build.sh
scripts/dist.sh
Support TLS set to gnutls for building.
man/coap-client.txt.in
man/coap-rd.txt.in
man/coap-server.txt.in
Document usage over -v7 for extra GnuTLS library output.
man/coap_attribute.txt.in
man/coap_context.txt.in
man/coap_encryption.txt.in
man/coap_handler.txt.in
man/coap_logging.txt.in
man/coap_observe.txt.in
man/coap_pdu_setup.txt.in
man/coap_recovery.txt.in
man/coap_resource.txt.in
man/coap_session.txt.in
man/coap_tls_library.txt.in
Include new -lcoap-@LIBCOAP_API_VERSION@-gnutls option.
Remove trailing spaces at end of line
man/coap_encryption.txt.in
Update with GnuTLS information
man/coap_logging.txt.in
Update with more information about logging levels.
man/coap_tls_library.txt.in
Include new functions coap_show_tls_version() and coap_string_tls_version()
HAVE_GNUTLS -> HAVE_LIBGNUTLS
Correct TinyDTLS version checks as TinyDTLS is now returning the
actual TinyDTLS library version.
For TinyDTLS builds, #undef PACKAGE_* to remove compiler warnings.
These new functions can be used to either update a buffer with, or coap_log()
out the current runtime TLS library along with the version of the library
that libcoap was built against.
include/coap2/debug.h
src/debug.c
libcoap-2.map
libcoap-2.sym
Support for the new functions coap_show_tls_version() and coap_string_tls_version().
This allows an application to determine what the built version is
as well as what the runtime version of a TLS library is.
include/coap2/coap_dtls.h
Add built_version to coap_tls_version_t
src/coap_openssl.c
src/coap_tinydtls.c
Additionally populate coap_tls_version_t with build_version when
coap_get_tls_library_version() is called.
src/coap_tinydtls.c
Correct the version returned as actual TinyDTLS version instead the
binary value of a DTLS packet type.
examples/client.c
examples/coap-server.c
For the client, the next block to transmit is always now the last acknowledged
block plus one.
If the client receives a duplicate BLOCK1 ACK, the duplicate ACK is ignored by
checking the message ids.
For the server, it no longer rejectes a duplicate BLOCK1 request, but does
still object if there is a gap in the provided data due to a missing block.
In otherwords, the blocks must arrive sequentially from the client.
This then removes the need for name polution/confict of debug(), info() and
warn() when building other projects that use libcoap and need to #include the
libcoap header files
Updated:
examples/client.c
examples/contiki/coap-observer.c
examples/etsi_iot_01.c
include/coap2/debug.h
src/async.c
src/block.c
src/coap_io.c
src/coap_openssl.c
src/coap_session.c
src/coap_tinydtls.c
src/debug.c
src/mem.c
src/net.c
src/option.c
src/pdu.c
src/resource.c
src/uri.c
If the debug() etc. macros are still required, then the change to
include/coap2/debug.h just needs to be reverted.
There are also a couple of space changes - to cause log output to be columnar
e.g "ERR" was padded to "ERR ", so that "EMRG" or "ERR " log output output was
aligned in the same way.
This is a replacement for PR#51, and partially deals with name polution issues
raised in Issue #50.
Parameter re-aligned some long strings, splitting strings across multiple lines
This reverts commit 91bfd5b103 because
it introduced a wrong variable substitution:
The problem here is that top_srcdir is . in the top-level Makefile, so
the link command ends up having this:
[...] ../.libs/libcoap-2-tinydtls.a -L./ext/tinydtls -ltinydtls
Whereas, in examples/Makefile.am, top_srcdir is .., so using DTLS_LIBS
would be correctly replaced by
../.libs/libcoap-2-tinydtls.a -L../ext/tinydtls -ltinydtls
The same holds for the Makefile in the subdirectory tests.
The libcoap development isn't currently ready to also use the GnuTLS
cryptography library and development files within the release of 4.2.0.
An available configure option '--with-gnutls' or the preferred automatic
usage of the GnuTLS cryptography functions within the libcoap library
without some real usability would confuse users for sure.
This commit removes the visible implementation of the additional
configure option '--with-gnutls' but also some internal checking and
logic of variables to control the linking of libcoap.
This commit can simply be reverted once 4.2.0 is released and the usage
of the needed cryptography functions from the GnuTLS library will get
implemented.
Note: Normally the part of the source that is now commented out would
would just get removed as we are working with git, but I dropped
that so it's probably easier to see without the usage of git what
was changed.
Using the variable $(DTLS_LIBS) in the *_LDADD isn't correct, for
controlling the linker flags the *.la file is normally holding all the
required information.
This was introduced by 5687681d71 and is
partially removed by this commit.
If a user isn't explicitly disabling the DTLS support for libcoap or
requesting the usage of tinydtls then instead the configure script needs
to detect at least the development files for GnuTLS or OpenSSL.
If not the script must break and give up with an error message.
Because of some wrong logic within the evaluation if one of both TLS
libraries was found configure was *not* stopping with an error message.
The logic to check the possibilities of an automatic usage of the TLS
libraries was different, the check for GnuTLS was correct but on
OpenSSL a wrong check condition chain was used, it should and must have
been the same on both libraries. This commit is fixing this.
As all conditions must the true in theses check to set the correct
variables which are used later within configure.
But the sanity check at the end was also not completely correct and
failing so configure was not running into the desired error break.
This script creates a libcoap archive, unpacks it and does an
out-of-tree build and installation afterwards. The environment
variables PLATFORM, TESTS, TLS and DOCS control the build
configuration. Suggested invocation from travis CI is:
PLATFORM=posix TESTS=yes TLS=no DOCS=yes scripts/dist.sh
If the environment variable DOCS is set to yes, --enable-documentation
will be set during configure, --disable-documentation otherwise (the
previous default).
configure.ac:
remove reference to doc/build_man_files.sh as it is no longer used
doc/Makefile.am:
Correct BASE definition to be that of the filename without any suffix so
Doxygen can properly @ref the file
Remove usage of 'cat'
Tidy up debug comments and indentation
Make sure cp overwrites destination files if they exist
Support building doc/ if asciidoc (a2x) is not available (the nam pages will
not get generated and included though.
If we work out of tree some files are build in top_builddir and not in
top_souredir.
Also fix up the used libcoap API versin by using a global variable here.
If you are working out of tree you get a deadloop because you are unable
to recreate the *.{map,sym} file in your current working directory.
configure is thinking the source is already configured in another folder
if you want to call the configure script outside the top_sourcedir and
is requireing a "make distclean' call in top_sourcedir which is also
deleting libcoap-2.{map,sym}. But the source is *always* building these
two files in the top_sourcedir.
This commit is pointing the build of these two files into top_builddir
which is also top_sourcedir if you are doing a in tree build.
Use a new template doc/build_man_files.sh.in to include @top_srcdir@/doc
@top_srcdir@/man as appropropriate.
Update doc/Doxyfile.in in a similar way (and coap/ to coap2/)
Makefile.am autogen.sh configure.ac taught about doc/build_man_files.sh.in
Update doc/Makefile.am to include $(top_srcdir) and $(top_builddir)