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

std: add dtls module #5479

Closed
beriberikix opened this issue May 15, 2020 · 3 comments
Closed

std: add dtls module #5479

beriberikix opened this issue May 15, 2020 · 3 comments
Labels
cli related to cli/ dir suggestion suggestions for new features (yet to be agreed)

Comments

@beriberikix
Copy link

Consider adding DTLS to go with the existing UDP support and proposed TLS module (#5391.) This has been a long-standing gap in the Node world (nodejs/node#2398).

@bartlomieju bartlomieju added cli related to cli/ dir suggestion suggestions for new features (yet to be agreed) labels May 21, 2020
@bartlomieju
Copy link
Member

That would most likely be a cli feature

@hironichu
Copy link
Contributor

Just sending this back up on the suggestion list, as I have been working on making a webrtc library for deno, the biggest task i'm facing right now is passing the UDP stream onto many functions to apply the DTLS layer on top of it, could be great if this was in the STD

OpenSSL in rust has an function where it takes a stream and depending on the settings (here dtls) it returns the stream after the handshake

...
//Create a Certificate and a key for the handshake and pass them to the ssl builder


       let mut ssl_acceptor_builder = SslAcceptor::mozilla_intermediate(SslMethod::dtls())?; 
  //example not secure here, this means the server doesnt check Client certificate in order to accept arbitrary client.
        ssl_acceptor_builder.set_verify(SslVerifyMode::NONE);

        ssl_acceptor_builder.set_private_key(&key)?;
        ssl_acceptor_builder.set_certificate(&x509)?;
        let ssl_acceptor = ssl_acceptor_builder.build();

( this bit of code is from : https://github.com/kyren/webrtc-unreliable/ , which rely only on being a dedicated server and support only datachannels )

Could this be used ? idk.. but it could be great for a start, DTLS would allow basic datachannel support through WebRTC meaning a very fast communication method between a Deno server and a browser.

@lucacasonato
Copy link
Member

We are not going to do dtls - we will however ship Quic and HTTP/3 at some point in the future, which are direct replacements for dtls. #1558

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli related to cli/ dir suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

No branches or pull requests

4 participants