Re: DTLS patch
Andreas Schultz <[email protected]> Mon, 13 Jul 2015 11:52:15 +0200 (CEST)
| Newsgroups | gmane.comp.lang.erlang.patches |
|---|---|
| Message-ID | <[email protected]> |
Hi, ----- Original Message ----- > From: "Max Lapshin" <[email protected]> > To: "Andreas Schultz" <[email protected]> > Cc: "Roland Karlsson" <[email protected]>, "erlang-patches" <[email protected]>, "Haiyang Yin" > <[email protected]> > Sent: Monday, July 13, 2015 11:18:42 AM > Subject: Re: [erlang-patches] DTLS patch > Well, implementing DTLS is a very nice thing =) > I'm trying to look if it is possible to reuse existing SSL implementation for > it, but it seems that it is rather hard, because erlang SSL is a very > self-contained thing, designed for isolated usage, not like a library on top of > existing socket. Well, the TLS code has a concept of a transport call back module for abstracting the underlying socket. There is no documentation for that and it's (IMO) not very consistent either. For my version, I used that and implemented a UDP socket wrapper call back module. For your case, you could use that socket wrapper as a starting point and modify it. That's what I do for CAPWAP DTLS support. I believe Haiyang Yin patch has a very similar mechanism. The cb module is called dtls_transport and utilizes dtls_socket_manager and dtls_socket_server. Just extract them, rename and alter to your needs, then pass your version as cb_info argument into the ssl socket setup. Andreas _______________________________________________ erlang-patches mailing list [email protected] http://erlang.org/mailman/listinfo/erlang-patches