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

Open
Snawoot opened this issue Sep 30, 2023 · 0 comments · May be fixed by #588
Open

Flight3 does not respect Config.EllipticCurves #587

Snawoot opened this issue Sep 30, 2023 · 0 comments · May be fixed by #588

Comments

@Snawoot
Copy link

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.

@Snawoot Snawoot linked a pull request Sep 30, 2023 that will close this issue
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