Skip to content

Bug: CoAP with TLS doesn't Support UDP #1963

@rodneyosodo

Description

@rodneyosodo

What were you trying to achieve?

Test coap server with TLS i.e providing certificate and key

What are the expected results?

To work with TLS

What are the received results?

cannot create new tls listener: cannot create new net tcp listener: unknown network udp

Steps To Reproduce

Provide certificate and key when starting coap server

In what environment did you encounter the issue?

main branch

Additional information you deem important

https://github.com/absmach/magistrala/blob/ff12f7fca35534a2b012ed10d320b58ed13eb46a/internal/server/coap/coap.go#L58C1-L60C6

go func() {
	errCh <- gocoap.ListenAndServeTCPTLS("udp", s.Address, tlsConfig, s.handler)
}()

This works when the network is TCP and not UDP

Metadata

Metadata

Assignees

Type

No type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions