gotthardp / gen_coap

Generic Erlang CoAP Client/Server
Other
106 stars 47 forks source link

Missing DTLS support #1

Closed gotthardp closed 7 years ago

gotthardp commented 8 years ago

Since there is no DTLS in Erlang, there is no DTLS in gen_coap for now. The DTLS support is under development by the Erlang/OTP team, so once this is done we add DTLS to gen_coap.

hachreak commented 8 years ago

Hi, Is it fully implemented now the DTLS in erlang? Are there any plan to support it on CoAP? :)

gotthardp commented 8 years ago

Hi. I don't think DTLS is supported in Erlang, do you? Once DTLS is in Erlang, I will add it to gen_coap.

RoadRunnr commented 8 years ago

@gotthardp you could try https://github.com/RoadRunnr/dtlsex for the moment.

hachreak commented 8 years ago

Hi RoadRunnr, I found your PR! I'd like to use CoAP on my project and use the secure version on top of DTLS, I think, it'll be mandatory. Can you tell us more about the current implementation state? :) Thanks

hachreak commented 8 years ago

@gotthardp do you think the dtlsex project is usable to use it on gen_coap? (waiting the dtls is integrated on otp)

gotthardp commented 8 years ago

Hello everyone. It looks like DTLS (in some form) may be in Erlang 19. I'm going to give it a try.

gotthardp commented 8 years ago

Nope. Doesn't work. The implementation is incomplete.

edescourtis commented 7 years ago

What about now in Erlang 19.1?

commit b0d29cc77f3c8d4d63dabb2f00570b0130f9f175 Merge: 08ff462 01e9582 Author: Ingela Anderton Andin ingela@erlang.org Date: Tue Sep 6 15:49:12 2016 +0200

Merge branch 'ingela/ssl/dtls-progress/connection-states-as-maps' into maint

* ingela/ssl/dtls-progress/connection-states-as-maps:
  dtls: fix encoding of client hello cookie
  dtls: Prepare start of DTLS connection manager with SSL app
  ssl: Refactor to use maps for the connection states
  ssl, dtls: Refactor sni handling
  dtls: Add close/5
  dtls: Add renegotiate/2
  dtls: Add protocol event handling
  ssl: Refactor code so that tls and dtls can share more code
  ssl, dtls: Disable V2 compatibility clause from ssl_handshake:update_handshake_history
  ssl: Make sure common code for TLS and DTLS uses the TLS Version
  ssl: remove unused RecordCB argument from master_secret
  dtls: Add reinit_handshake_data/1 to dtls
  dtls: replace tls_record with RecordCB in connection_info
  Fix version numbers and dependencies
gotthardp commented 7 years ago

I'm aware of this commit. Despite it was never announced DTLS is ready I tried to implement a simple DTLS client just after they made this commit, but I didn't make it work. It was producing strange errors. My feeling is that the implementation is still incomplete. But perhaps I didn't try hard enough.

gotthardp commented 7 years ago

Update: The commit https://github.com/erlang/otp/commit/1e6942e97339ff39a0436834c260bf50c3d3a481 suggests that a beta DTLS (non-production) will be available in Erlang/OTP 19.2, which may be released soon.

gotthardp commented 7 years ago

Done in v0.2.0