7
votes

Is it possible to use SSL with UDP for sockets? I know how to create TCP socket with SSL, s = socket (AF_INET, SOCK_STREAM, 0); And then I can use OpenSSL with it, but what about UDP (SOCK_DGRAM)?

P.S. I want to use OpenSSL

1
THIS may helpLPs

1 Answers

6
votes

So it is possible! The protocol is named DTLS and Openssl provide an implementation. You can find the API here Openssl documentation
I didn't find any tutorial for DTLS...