Commit Graph
1279 Commits
Author SHA1 Message Date
Jon Shallow 89f2f68ddf examples/coap-server.c: Replace debug() with coap_log(LOG_DEBUG, )
Replace debug() with coap_log(LOG_DEBUG, )
Remove unneeded include files
Remove compiler optimizer warnings for ntohs(htons())
Fix compiler warning about unused options
2018-05-17 18:45:07 +01:00
Jon Shallow 032a46fcb3 examples/coap-rd.c: Replace debug() with coap_log(LOG_DEBUG, ) 2018-05-17 18:45:07 +01:00
Jon Shallow 843f036b16 examples/Makefile.am: Remove coap_list.c from files needed for coap-client 2018-05-17 18:45:07 +01:00
Jon Shallow c129a0abe8 examples/client.c: Make use of new optlist functions
Remove coap_list_t structure and replace with coap_optlist_t to maintain
backward code compatability.
Make use of the new coap_optlist_* functions
Use the new coap_optlist_t structure
Remove unneeded header includes
warn() -> coap_log(LOG_WARNING, )
debug() -> coap_log(LOG_DEBUG, )
2018-05-17 18:41:46 +01:00
obgm 1beff614f5 Merge pull request #168 from spinetix/spx-win32build
Improve win32 build configuration and installation.
2018-05-15 18:26:01 +02:00
jcmichelou d27790ffa5 win32: Use libcoap-2.sym and retarget to Windows SDK version 10.0.17134. 2018-05-15 17:01:41 +02:00
jcmichelou 8f5e3beab6 win32: Change DLL version number to 2-openssl 2018-05-15 16:50:52 +02:00
jcmichelou 2c9fd4cceb win32: Do not use $(IntDir) as it confuses msbuild. 2018-05-15 16:50:51 +02:00
jcmichelou eb86b6fd4e win32: PDB file for libcoap DLL duplicated by install.
It should be installed only once, next to the DLL in bin.
2018-05-15 16:50:50 +02:00
jcmichelou a794fbd983 win32: Add configuration variables and install project for VS2017
Upgrade to VS2017. Added a property sheet with user variables to configure the
target installation directory and location of openssl library from within the
Visual Studio GUI and in a manner compatible with msbuild. This method is
inspired by the GTK project. It supports out of tree builds, and separate or
common directories for debug and release builds. The new install project copies
the library files to the selected target directory. It has all other projects
in dependency, so to build the library and utilities, you just build the
"install" target and it will take care of building the library, executable,
then copy to a tree with a unix-like structure (bin, lib, include).
Also fixes missing files in the testdriver project.
2018-05-15 16:50:49 +02:00
Olaf Bergmann a073078b3d ax_check_a2x_to_man.m4: verbose output diagnostics from a2x
a2x now is run with option '--verbose' to provide more diagnostic
output. In case of an error, the output generated by a2x is written
into config.log.
2018-05-04 15:41:46 +02:00
Olaf Bergmann 797f09d51e ax_check_a2x_to_man.m4: cleanup temporary files created for a2x test 2018-05-04 12:51:27 +02:00
Olaf Bergmann 072357c780 configure.ac: check if a2x can be used for manual page creation
This change adds a new m4 macro AX_CHECK_A2X_TO_MANPAGE that
invokes the a2x program passed in the environment variable A2X
to create a minimal manual page. If A2X is set correctly, failing
this test is a good indicator that the docbook DTD or the
docbook XSL stylesheets are missing.
2018-05-03 13:56:25 +02:00
Olaf Bergmann 4280e75a0c coap_tinydtls.c: fix compiler warning for printf() format string 2018-04-20 10:50:48 +02:00
Olaf Bergmann e2a8ed7785 tinydtls: updated submodule to develop HEAD 2018-04-20 10:50:48 +02:00
Olaf Bergmann 50f2d74186 Merge branch 'nikosft-develop' into develop
This merge closes PR #43 [1].

[1] https://github.com/obgm/libcoap/pull/43.
2018-04-20 10:10:55 +02:00
Olaf Bergmann 837917f272 Merge branch 'develop' of https://github.com/nikosft/libcoap-fork into nikosft-develop
Resolved conflicts in file resource.h.
2018-04-20 10:10:08 +02:00
Olaf Bergmann ddfb94bc92 Merge branch 'PawelWMS-bracket_fixes' into develop
This resolves PR #76 [1].

[1] https://github.com/obgm/libcoap/pull/76
2018-04-20 10:00:34 +02:00
Olaf Bergmann 6d232dfc82 Merge branch 'bracket_fixes' of https://github.com/PawelWMS/libcoap into PawelWMS-bracket_fixes
Resolved merge conflicts (net.c, resource.c)
2018-04-20 09:53:43 +02:00
Olaf Bergmann c4e6601944 net.c: fix PDU find bug in coap_remove_from_queue()
Issue #163 [1] points out that coap_remove_from_queue() may release
the wrong PDU from the retransmit queue due to a false hit in the
do/while loop. This change was proposed by hongnguyen-tma to fix
this issue.

[1] https://github.com/obgm/libcoap/issues/163
2018-04-18 12:01:46 +02:00
Olaf Bergmann 8c35e7625b net.h: fixed data type option number in coap_register_option()
As option numbers can be up to 16 bit, the function
coap_register_option() for making new options known to libcoap
must also take at least 16 bit numbers. The data type for
argument type therefore has been changed to uint16_t.
2018-04-18 09:21:02 +02:00
obgm 0af655db70 Merge pull request #169 from spinetix/spx-freetls
net.c: use after free in coap_free_context()
2018-04-17 08:57:46 +02:00
jcmichelou fa5766f642 net.c: use after free in coap_free_context()
Because of incorrect free order, if there are open TLS connections when
coap_free_context() is called a use after free will occur as OpenSSL tries to
shutdown the connections.
2018-04-16 20:48:23 +02:00
Olaf Bergmann 9b62b79ef7 mem.c: allow re-definition of COAP_MAX_STRING_SIZE and COAP_MAX_STRINGS
The pre-processor symbols COAP_MAX_STRING_SIZE and COAP_MAX_STRINGS
are to be used on platforms that allocate memory from fixed-size
blocks such as the MEMB allocator on Contiki. As the strings are
used to reassemble URIs (including query strings), the reasonable
string size depends on the application. The current values now are

COAP_MAX_STRING_SIZE = 64, and
COAP_MAX_STRINGS = 8.

These can be changed at build time with compiler flag -D.

Currently, only platform Contiki uses these definitions.
2018-04-16 11:32:14 +02:00
obgm 132a830b59 Merge pull request #165 from mrdeep1/DTLS-Connection
DTLS session setup retries to establish DTLS many times before failure
2018-04-13 17:53:20 +02:00
Jon Shallow 2582d085f8 examples/client.c: Run at least once per sec to aid debugging 2018-04-13 14:08:08 +01:00
Jon Shallow 36de6d83a7 src/coap_openssl.c: Add in support for DTLS retry counting 2018-04-13 14:07:59 +01:00
Jon Shallow 60fccead90 include/coap/coap_session.h: Add in support for DTLS retry counting 2018-04-13 14:07:51 +01:00
obgm 576aeacfb6 Merge pull request #151 from mrdeep1/builds
Build libraries with a suffix in the name that specifies the TLS library built against
2018-04-13 13:15:43 +02:00
Jon Shallow 653d3f1775 libcoap-1.{map|sym} libcoap-1.pc.in: deleted 2018-04-13 08:43:38 +01:00
Jon Shallow fc0761f24f tests/test_tls.c: Use coap_startup() instead of coap_dtls_startup()
This is done so we do not need to expose coap_dtls_startup()
publically
2018-04-13 08:43:38 +01:00
Jon Shallow fcf30a6afc libcoap-2.{map,sym}: Add in files 2018-04-13 08:43:37 +01:00
Jon Shallow ae5765af2f configure.ac: Bump LIBCOAP_API_VERSION and create LIBCOAP_NAME_SUFFIX
Make LIBCOAP_API_VERSION=2

Set LIBCOAP_NAME_SUFFIX to be $LIBCOAP_API_VERSION{-openssl,-gnutls,-tinydtls}
as appropriate based on the configure build options.

This means that library files will be named
libcoap-2-openssl.a
libcoap-2-openssl.so*
libcoap-2-gnutls.a
libcoap-2-gnutls.so*
libcoap-2-tinydtls.a
libcoap-2.a
libcoap-2.so*

Fix some typos

Use $withval instead of yes so that, say, --without-openssl works as expected.
2018-04-13 08:43:37 +01:00
Jon Shallow 2300f94f00 autogen.sh: Update AUTOGEN_FILES= files
Update the new LIBCOAP_API_VERSION of the files
Include examples/Makefile and tests/Makefile that are built by autogen.sh
2018-04-13 08:43:37 +01:00
Jon Shallow dc89f8c203 Makefile.am: Update to support new liboap library naming
Replace LIBCOAP_API_VERSON with LIBCOAP_NAME_SUFFIX when refering to building
the library files.  configure.ac defines LIBCOAP_NAME_SUFFIX.

libcoap-$LIBCOAP_API_VERSION.{sym,map} remain.

Make distclean clean up temporary src/*.o and src/*.lo files which may be
left lying around from a previous './configure xxx ; make' that was using
a different TLS library.

Add in coap_dtls_*, coap_tls_*, coap_socket_* functions that do not need to
be publically exposed in the libraries
2018-04-13 08:43:37 +01:00
Jon Shallow 0ac9bb53f6 .gitignore: Include more interim files to ignore 2018-04-13 08:43:37 +01:00
Jon Shallow 153e4dbe72 tests/Makefile.am: Update for new libcoap library naming 2018-04-13 08:43:37 +01:00
Jon Shallow ef6c72bf44 examples/Makefile.am: Update for new libcoap library naming 2018-04-13 08:43:37 +01:00
Jon Shallow b7f1f52a17 BUILDING: New file giving an overview of how to build libcoap 2018-04-13 08:43:31 +01:00
Jon Shallow bed987242d libcoap-2.pc.in: New Packaging file 2018-04-11 14:36:40 +01:00
obgm f889c29881 Merge pull request #139 from mrdeep1/man-pages
Add in man page support for the different exposed functions with examples
2018-04-09 14:01:55 +02:00
Jon Shallow d015c50091 coap-{client|rd|server}.txt.in: Move from examples to man directory 2018-04-07 11:34:44 +01:00
Jon Shallow 747205fb93 man/coap_observe.txt.in: New man page covering Observe usage 2018-04-07 11:34:44 +01:00
Jon Shallow 20cd610c03 examples/Makefile.am: Remove building man pages
Delete building man pages as they are now a part of the man directory
2018-04-07 11:34:44 +01:00
Jon Shallow 3f94f70fbd .gitignore: Add in man page temp files as well as src/ temp files to be ingored 2018-04-07 11:34:44 +01:00
Jon Shallow ebcf8ddb87 man/Makefile.am: New Makefile for building and installing man pages 2018-04-07 11:34:44 +01:00
Jon Shallow d21e0532bc configure.ac: Add in man page building with --enable-manpages
Create a new --enable-doxygen

Make --enable-documentation include both --enable-manpages and --enable-doxygen
and --disable-documentation include --disable-manpages and --disable-doxygen
2018-04-07 11:34:44 +01:00
Jon Shallow d766924954 autogen.sh: add in built man files to AUTOGEN_FILES=
Also add in examples/Makefile
2018-04-07 11:34:44 +01:00
Jon Shallow 050833ff50 Makefile.am: Add in man pages directory if man pages are being built 2018-04-07 11:34:44 +01:00
Jon Shallow c335c1e53e man/coap_tls_library.txt.in: New man page covering TLS library support 2018-04-07 11:34:44 +01:00