Skip to content

gcoap_dtls: Selecting transport at run time is not possible #16674

@miri64

Description

@miri64

Description

Say I have a user interface where a URL is provided: coap://example.org/sensor or coaps://example.org/sensor. Currently, when gcoap_dtls is compiled in gcoap_req_send() does not provide me any capability to honor that URL input. It just selects DTLS (so always assumes coaps://, as far as I can tell).

Steps to reproduce the issue

Try to send an unencryptet CoAP request using gcoap_req_send() with gcoap_dtls compiled in.

Expected results

The CoAP request is unencrypted and sent over a UDP sock.

Actual results

The CoAP request is always encrypted and sent over a DTLS sock.

Versions

Any RIOT version after 23a8659.

Metadata

Metadata

Assignees

Labels

Area: securityArea: Security-related libraries and subsystemsProcess: API changeIntegration Process: PR contains or issue proposes an API change. Should be handled with care.Type: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions