pion / dtls

DTLS 1.2 Server/Client implementation for Go
https://pion.ly/
MIT License
602 stars 160 forks source link

Flight3 does not respect Config.EllipticCurves #587

Closed Snawoot closed 5 months ago

Snawoot commented 1 year ago

Your environment.

What did you do?

I specified custom EllipticCurves list in dtls.Config

What did you expect?

Modified list of curves in the supported_groups extension.

What happened?

Flight1 packet is sent as expected, but Flight3 packet contains all curves regardless configuration. Problem does not manifests itself if server Config.InsecureSkipVerifyHello is set to true.

Additional information

I think responsible part of code is https://github.com/pion/dtls/blob/744e27a38f208e465de597d9da1644b66224ffc9/flight3handler.go#L251-L260

I'm also willing to try to put together a fix for this if we can discuss it and get some clarity about what to do with it.