Skip to content

sock_dtls: a DTLS sock API #10897

@pokgak

Description

@pokgak

This issue will be used to track the current status of DTLS sock implementation and integration with gcoap. I'll try to keep it updated.

DTLS Sock TODO List


Description

sock_dtls aims to provide a wrapper around DTLS stack in RIOT so that users can choose the underlying stack by a USEMODULE in the Makefile.

I am aware of @rfuentess's sock_secure and @danielinux's wolfSSL effort and have reviewed it together with @tcschmidt, @waehlisch, @miri64 (who also helps me with the API), @MichelRottleuthner and others (feel free to chime in if there is anything I missed/had it wrong here). This API hopes to solve the comments that we have, such as:

  1. Targeting DTLS and TLS is (mostly) not needed in RIOT use case. The users typically know from the start which underlying stack to use
  2. connect, listen in traditional socket has a different meaning when used in DTLS compared to TLS.
  3. Sending and receiving of packets using sock_udp internally. sock_dtls is responsible for encrypting, decrypting of the packets and handshake. This should help by minimizing changes when integrating with existing applications such as gcoap.

To implement this API, the implementors of stack must provide the definition the structs (like in sock_udp, sock_tcp) through the modules/pkgs.

Edit: The DTLS sock API is now merged in master. See sys/net/sock/dtls.h. Removed the API from this post for readability.

Metadata

Metadata

Labels

Area: networkArea: NetworkingArea: securityArea: Security-related libraries and subsystemsDiscussion: RFCThe issue/PR is used as a discussion starting point about the item of the issue/PRProcess: API changeIntegration Process: PR contains or issue proposes an API change. Should be handled with care.Type: new featureThe issue requests / The PR implemements a new feature for RIOTType: trackingThe issue tracks and organizes the sub-tasks of a larger effort

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions