webrtc-rs / dtls

A pure Rust implementation of DTLS
https://webrtc.rs
Apache License 2.0
42 stars 23 forks source link

[DTLS] Add NamedCurve::P384 #21

Closed neonphog closed 2 years ago

neonphog commented 2 years ago

related: https://github.com/webrtc-rs/webrtc/issues/24

I had to bump p256 version also due to a shared dependency, which changed some of the api / error types. I couldn't figure a good way to add any test code to this, given the pretty hard-coded X25519 at the moment, but let me know if you have any suggestions.

k0nserv commented 2 years ago

@rainliu I'll leave this review for you since you have more context than me(who has zero).

melekes commented 2 years ago

I couldn't figure a good way to add any test code to this

Have you looked into Pion https://github.com/pion/dtls?

neonphog commented 2 years ago

I couldn't figure a good way to add any test code to this

Have you looked into Pion https://github.com/pion/dtls?

https://github.com/pion/dtls/blob/master/conn_test.go#L1485-L1487

&extension.SupportedEllipticCurves{
    EllipticCurves: []elliptic.Curve{elliptic.X25519, elliptic.P256, elliptic.P384},
},

Near as I can tell, pion also always tests with all extensions enabled and therefore only ever tests X25519...

k0nserv commented 2 years ago

We have migrated this crate to the monorepo(webrtc-rs/webrtc) please re-open this pull request over there.

neonphog commented 2 years ago

@k0nserv

We have migrated this crate to the monorepo(webrtc-rs/webrtc) please re-open this pull request over there.

Done: https://github.com/webrtc-rs/webrtc/pull/254