Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using SSL with UDP

Tags:

c++

c

ssl

sockets

udp

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

like image 495
Shaci Avatar asked Feb 25 '16 13:02

Shaci


1 Answers

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...

like image 106
Quentin Huot-Marchand Avatar answered Sep 22 '22 14:09

Quentin Huot-Marchand