Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flight3 does not respect Config.EllipticCurves #587

Closed
Snawoot opened this issue Sep 30, 2023 · 0 comments · Fixed by #588
Closed

Flight3 does not respect Config.EllipticCurves #587

Snawoot opened this issue Sep 30, 2023 · 0 comments · Fixed by #588

Comments

@Snawoot
Copy link
Contributor

Snawoot commented Sep 30, 2023

Your environment.

  • Version: v2.2.7
  • Browser: none

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

dtls/flight3handler.go

Lines 251 to 260 in 744e27a

if state.namedCurve != 0 {
extensions = append(extensions, []extension.Extension{
&extension.SupportedEllipticCurves{
EllipticCurves: []elliptic.Curve{elliptic.X25519, elliptic.P256, elliptic.P384},
},
&extension.SupportedPointFormats{
PointFormats: []elliptic.CurvePointFormat{elliptic.CurvePointFormatUncompressed},
},
}...)
}

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant