Commit Graph
36 Commits
Author SHA1 Message Date
Olaf Bergmann 9be2d60ecf README.md: Update URI for coap.space to use HTTPS
PR #1122 [1] has updated the reference to coap.space. As this site
provides a secure version but no redirect, the URI scheme is changed
to https.

[1] https://github.com/obgm/libcoap/pull/1121
2023-05-24 11:28:57 +02:00
Jon Shallow 82bf1f0f7a documentation: Fix bad url and hyperlink the RFCs 2023-05-24 08:49:26 +01:00
Jon Shallow 391803aebf WebSockets: Add in support for WebSockets layer
Follows RFC6455, as specified in RFC8323.

Make support configurable.

Add in example support.

Update other code to be aware of WebSockets as a CoAP protocol.
2023-04-10 14:38:56 +01:00
kkrentz 79c66705a1 Updates Contiki-specific code to Contiki-NG 2023-02-08 16:05:09 +00:00
Jon Shallow 47a83549a8 RFC8974: Add in support for Extended Tokens
Add in new function coap_context_set_max_token_size() to define
the maximum supported token size.

Track changes to PDU to support extended tokens.

Update documentation.
2023-02-04 11:08:32 +00:00
Jon Shallow dac6bd3b60 RFC8613: Add in OSCORE support
Based on work done in https://gitlab.informatik.uni-bremen.de/obergman/libcoap

New directories with files
 include/oscore
 src/oscore

New files
 include/coap3/coap_oscore.h
 include/coap3/coap_crypto_internal.h
 include/coap3/coap_oscore_internal.h
 man/coap-oscore-conf.txt.in
 man/coap_oscore.txt.in
 src/coap_oscore.c
 tests/test_oscore.c
 tests/test_oscore.h

Supported by new option (enabled by default)
 ./configure --enable-oscore
 cmake .. -DENABLE_OSCORE=ON

Requires a TLS library configured to do the OSCORE encryption and hashing.
2023-01-14 10:26:20 +00:00
Jon Shallow 3552b53be4 Copyright: Update copyright date to end 2023 as appropriate 2023-01-02 11:45:10 +00:00
Jon Shallow 1db3683cef github workflows: Support Ubuntu 22.04 images
Fix issues thrown up with ubuntu-latest moving to ubuntu-22.04.

clang 14+ generates dwarf-5 code which valgrind does not currently support
so downgrade to output dwarf-4.

Use ./autogen.sh for tinydtls builds rather than 'autorecond --force --install'

Remove some spurios } in the workflow
2022-11-22 21:30:18 +00:00
Jon Shallow 37731524a0 RFC8516: Document support 2022-08-18 13:22:18 +01:00
Jon Shallow 415fbdb7cd RFC9175: Add in support for the Echo and Request-Tag options
A unique Request-Tag is added to any PUT/POST/FETCH request that contains
a large body.  The server is then able to differentiate between concurrent
sending of large data using the same session.

If a server responds with a 4.01 and includes an Echo option, then the libcoap
client retransmits the request adding in the received Echo option with the same
value.

If the server responds normally with an Echo option, then the next request
from the libcoap client (internally added by libcoap) will contain that Echo
option.

It is the responsibility of the server application to add in the Echo
option if required and validate the next request unless the Echo is triggered
by OSCORE (RFC8613 Appendix B.1.2).
2022-06-22 15:08:47 +02:00
Jon Shallow 445a9481de RFC7390: Update support for RFC7390
Update documentation and add in missing content-format.
2022-05-26 21:10:29 +01:00
Jon Shallow 587de900c2 coap_mbedtls.c: Add in TLS support 2021-09-27 21:20:07 +01:00
Olaf Bergmann 39b75f8240 Update documentation for stable branch main
See also https://github.com/github/renaming for further information.
2021-04-21 18:01:46 +02:00
Jon Shallow dc6c5e6b00 workflow: Add in distribution and CMake checks
.github/workflows/main.yml:

Do a 'make check' for matrix builds.
Move documentation into separate job to reduce matrix build times
Add in CMake job.
Add in distribution job.
Add in tinydtls job.
Add in contiki/lwip job.

scripts/github_dist.sh:

Do the distribution checks using a script.

examples/etsi_iot_01.c:
examples/tiny.c:

Fix include coap.h directory in old examples.

README.md:

Update status badges to get only the branch actions and remove CMake
status badge.
2021-02-24 18:15:25 +00:00
Olaf Bergmann 528c0293b7 README.md: Update build status badges
As travis-ci gets not triggered anymore, continuous integration has
been changed in commit 57a5a7e0 to use GitHub Actions. This change
updates the build status badges to report the GitHub Actions result
for the branches master and develop.
2021-02-23 10:56:28 +01:00
obgm 6a087687e8 Merge pull request #574 from mrdeep1/mbedTLS_naming
Mbed TLS: Update MbedTLS and mbedTLS to Mbed TLS to reflect brand name
2021-02-19 10:00:16 +01:00
Jon Shallow 12fd8a25f7 Update general copyrights to 2021
Update main copyright statements to 2021.
2021-01-04 10:37:05 +00:00
Jon Shallow f4d4cd60d8 Mbed TLS: Update MbedTLS and mbedTLS to Mbed TLS to reflect brand name
LICENSE:
README.md:
include/coap2/coap_dtls.h:
man/coap_encryption.txt.in:
man/coap_tls_library.txt.in:
src/coap_debug.c:
src/coap_mbedtls.c:

Replace MbedTLS and mbedTLS with "Mbed TLS".
2021-01-04 10:18:26 +00:00
Jon Shallow cd56fa9902 README.md: Update which libraries support RPK 2020-10-22 12:21:37 +01:00
Jon Shallow 7033555d29 RFC8768: Add in support for CoAP Option Hop Limit loop detection
All this is handled by libcoap with coap-client having the ability to define
an initial Hop Count value for testing. No other application support is
required.

Incoming requests are checked for the Hop Limit option - if found, the value
is decremented in the PDU before passing it up to the application. If it
decrements to 0, a 5.08 response is generated.

coap_add_option() checks if this is a Proxy option for a request. If so, and
Hop Limit option does not exist, then the Hop Limit option is inserted into
the PDU with the default value (16).

coap_send() checks if it is a 5.08 response and if so, prepends the diagnostic
data with the IP address of the transmitting interface. If the IP address
already exists, then the PDU is dropped as the return path for the 5.08 response
is looping.  An alternative method for return path looping check is also
used by initially setting, then testing and then decrementing the Hop Limit
value as response packets pass back through the proxies.  If a proxy does not
copy the Hop Limit options when returning the 5.08 response, then the IP address
duplication is used.

Makefile.am:

Hide the coap_insert_option(), coap_update_option and coap_pdu_check_resize()
function from applications.

README.md:

Add in RFC8768 is supported by libcoap.

examples/client.c:

Add in the -H hoplimit option.

include/coap2/pdu.h:

Add in the default Hop-Limit: option COAP_OPTION_HOP_LIMIT.
Re-organize the COAP_OPTION_ descriptions to include
the C, U, N, R, E, I and U flags.
Expose the internal coap_pdu_check_resize() function so src/net.c can use it.
Define the two new internal functions coap_insert_option() and
coap_update_option() and expose them so that the test suites can use them.

man/coap-client.txt.in:

Document the new -H hoplimit option.

man/coap.txt.in:

Include the new RFC8768.

man/coap_pdu_setup.txt.in:

Update documentation for the CoAP options.

src/coap_debug.c:

Add in support for printing out COAP_OPTION_HOP_LIMIT.

src/net.c:

Make sure that COAP_OPTION_HOP_LIMIT is not returned in an error response.
Decrement received Hop-limit in handle_request() and generate 5.08 response
if appropriate.
Update coap_send() to prepend IP in 5.08 response.
Support COAP_OPTION_HOP_LIMIT being used in the 5.08 response message.

src/pdu.c:

Report on CoAP options that are repeated, but not defined as repeatable.
Define new (5.08) Hop Limit Reached error response.

Add in new internal coap_insert_option() function. This now means that
callers of coap_add_option() no longer have to have the options in the
correct order.

Add in new internal coap_update_option() function that updates the value of
an option.

Make coap_pdu_check_resize() non-static.

tests/test_pdu.c:

Check that options are getting inserted in the correct order when using
coap_insert_option(), even though they are provided in a random order.

Test the coap_update_option() function.
2020-09-07 12:34:04 +01:00
Olaf Bergmann 43cb3c0778 README.md: Change target of build status badge link
The travis CI build status badges now point to the branches page at
travis-ci.com to provide a quick overview of the build status.
2020-05-07 07:51:41 +02:00
Olaf Bergmann 35b16cef5a README: added CMake status badge
The status badge refers to the default branch (= develop).
2020-05-04 12:41:54 +02:00
Olaf Bergmann 357a0f6b7a README.md: Updated CI status badge 2020-04-01 15:11:54 +02:00
Jon Shallow f601ddbf78 Add in MbedTLS support
Add in MbedTLS library support as another alternative TLS library

Makefile.am:

Include new src/coap_mbedtls.c file.

configure.ac:

Add in --with-mbedtls support which generates HAVE_MBEDTLS in coap_config.h.

include/coap2/coap_dtls.h:

Add in TLS Library type COAP_TLS_LIBRARY_MBEDTLS and make COAP_TLS_LIBRARY_*
defines an enum.
Add in PKI Key type COAP_PKI_KEY_PEM_BUF for passing in PEM information
that is held in memory instead of in a file.
Add in #define COAP_DTLS_RETRANSMIT_MS, COAP_DTLS_RETRANSMIT_TOTAL_MS
and COAP_DTLS_RETRANSMIT_COAP_TICKS

src/coap_debug.c:

Output MbedTLS information if appropriate.

src/coap_mbedtls.c: (New)

Contains the MbedTLS interface code.

src/coap_notls.c:

Do not use code if MbedTLS is being built.

tests/test_tls.c:

Include MbedTLS library checks.

README.md:

Include MbedTLS as a valid (D)TLS library.
2020-01-16 09:38:43 +00:00
Olaf Bergmann 98cf51eae2 README.md: Added status badge for OSS-Fuzz
OSS-Fuzz [1] is a decentralized fuzzing service for open-source
software projects. This badge shows the status of libcoap wrt to the
latest fuzzer runs.

[1] https://google.github.io/oss-fuzz/
2019-09-19 09:50:38 +02:00
Jon Shallow 6e25d9df91 README.md: Add in further information about libcoap
Add in information on Documentation and Building.
Update the Package contents.

LICENCE:

Update date.
2019-09-17 11:19:58 +01:00
Olaf Bergmann 2922c19970 updated copyright information
Touched dates in files where significant changes occurred in 2019.
2019-03-02 11:43:59 +01:00
Carsten Schoenert 637a09cfbd spelling: fix bandwith -> bandwidth 2018-11-24 13:58:44 +01:00
Jon Shallow f5367ef3de Delete trailing spaces from files, replace TAB with 8*SPACE
"git diff -w" shows no differences

TAB left alone in files that are not C based files or documentation
2018-09-28 17:34:07 +01:00
Olaf Bergmann 97d32e68c8 README.md: included cross-reference to libcoap-minimal
libcoap-minimal [1] contains small client and server examples that
illustrate the use of libcoap-2.

This change also updates the copyright year.

[1] https://github.com/obgm/libcoap-minimal
2018-06-05 15:26:03 +02:00
Olaf Bergmann 684c27ea13 README.md, LICENSE: Updated licensing information
* Add license information for getopt.c (required for the Windows port, only).
* Add license information for GnuTLS, OpenSSL, tinyDTLS
2017-07-10 16:35:49 +02:00
Olaf Bergmann bfca87cfb7 LICENSE: drop GPL as licensing options
From now on, the only licensing option for libcoap is BSD 2-Clause.
2017-06-01 12:51:20 +02:00
Olaf Bergmann fa52486030 README.md: added tool badges 2017-01-13 16:02:58 +01:00
Olaf Bergmann d90bc9164e fixed issue #17: COPYING and README.md named the wrong license
LICENSE.BSD is a 2-clause ("simplified") BSD license. The files
COPYING and README.md erroneously have termed it the "revised BSD
license".
2015-12-19 13:41:08 +01:00
Olaf Bergmann fd86c02ac4 updated year in boilerplate text 2015-03-03 12:30:42 +01:00
Olaf Bergmann 690a3a552d updated README and license file
* renamed README to README.md
* reference RFC 7252 and coap.technology web site
* updated copyright date LICENSE.BSD
2014-07-06 19:23:37 +02:00