Skip to content

Changes

Summary

  1. dtls.c: add check for valid handshake message type when version is 1.0. (details)
  2. dtls_debug.h: explicitly cast macro parameter to size_t. (details)
  3. dtls-server.c: check for left cli-arguments. (details)
  4. dtls-client.c: accept options after arguments. (details)
  5. dtls-client.c: apply option for local port. (details)
  6. Add client dtls connection ID. (details)
  7. dtls-client.c: add support_cid option. (details)
  8. dtls.c: Handle DTLS1.3 ClientHello when calculating cookie (details)
Commit 6cf43c0f7af8f34772d5cf6f1222dd4b47317f48 by Achim Kraus
dtls.c: add check for valid handshake message type when version is 1.0.

Fixes issue #209.

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
The file was modified dtls.c (diff)
Commit 0f1be3017eb894d144c1c124d3a4927781471c00 by Achim Kraus
dtls_debug.h: explicitly cast macro parameter to size_t.

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
The file was modified dtls_debug.h (diff)
Commit ff73600591dff6a49ab7bcb370903de02c7f32d7 by Achim Kraus
dtls-server.c: check for left cli-arguments.

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
The file was modified tests/dtls-server.c (diff)
Commit 44eddf48c4e154b00de1ca153e663bf25e9687db by Achim Kraus
dtls-client.c: accept options after arguments.

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
The file was modified tests/dtls-client.c (diff)
Commit b306f276b34c64156ca60ce27c1a74c70e0d878b by Achim Kraus
dtls-client.c: apply option for local port.

The previous version ignores the option for the local port. That may be
caused by issues using the same default local port for the server and
client.
This enables the use of an specific local port and changes the default
to an ephemeral free port, similar to quite a lot of other UDP clients.
The DEFAULT_PORT is therefore only used for the destination.

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
The file was modified tests/dtls-client.c (diff)
Commit 92322710a76b05587aff32000e097ab4a825c7e2 by Achim Kraus
Add client dtls connection ID.

Simple client side implementation indicates support and uses the cid of
the server, when negotiated by that.

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
The file was modified crypto.h (diff)
The file was modified dtls.c (diff)
The file was modified global.h (diff)
The file was modified dtls.h (diff)
Commit 0580b36337c7261aec1d689fa8458dc5b8a51e88 by Achim Kraus
dtls-client.c: add support_cid option.

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
The file was modified tests/dtls-client.c (diff)
Commit 4c39d5cc8ce0f641bd105cc4913288bc985cae54 by Achim Kraus
dtls.c: Handle DTLS1.3 ClientHello when calculating cookie

Do not calculate the cookie using the Extensions as these are
different between DTLS1.2 and DTLS1.3

https://datatracker.ietf.org/doc/html/rfc6347#section-4.2.1

When responding to a HelloVerifyRequest, the client MUST use the same
parameter values (version, random, session_id, cipher_suites,
compression_method) as it did in the original ClientHello.  The
server SHOULD use those values to generate its cookie and verify that
they are correct upon cookie receipt.

https://www.rfc-editor.org/rfc/rfc9147.html#section-5.3

The ClientHello up to, but not including the Extensions is the same for
DTLS1.2 and DTLS1.3

Signed-off-by: Jon Shallow <supjps-libcoap@jpshallow.com>
The file was modified dtls.c (diff)