ASPLes / nopoll

OpenSource WebSocket toolkit
http://www.aspl.es/nopoll
GNU Lesser General Public License v2.1
124 stars 74 forks source link

deprecated functions in OpenSSL 1.1 #28

Closed camilleoudot closed 7 years ago

camilleoudot commented 7 years ago

Hi, compiling nopoll fails on Debian 9 with OpenSSL 1.1.0 because of the following warnings:

nopoll_conn.c:586:3: warning: 'TLSv1_client_method' is deprecated [-Wdeprecated-declarations]
   return SSL_CTX_new (is_client ? TLSv1_client_method () : TLSv1_server_method ());
   ^~~~~~
In file included from /usr/include/openssl/ct.h:13:0,
                 from /usr/include/openssl/ssl.h:61,
                 from ./nopoll_private.h:45,
                 from nopoll_conn.c:49:
/usr/include/openssl/ssl.h:1614:1: note: declared here
 DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_client_method(void)) /* TLSv1.0 */
 ^
nopoll_conn.c:586:3: warning: 'TLSv1_server_method' is deprecated [-Wdeprecated-declarations]
   return SSL_CTX_new (is_client ? TLSv1_client_method () : TLSv1_server_method ());
   ^~~~~~
In file included from /usr/include/openssl/ct.h:13:0,
                 from /usr/include/openssl/ssl.h:61,
                 from ./nopoll_private.h:45,
                 from nopoll_conn.c:49:
/usr/include/openssl/ssl.h:1613:1: note: declared here
 DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_server_method(void)) /* TLSv1.0 */
 ^
nopoll_conn.c:615:3: warning: 'TLSv1_client_method' is deprecated [-Wdeprecated-declarations]
   return SSL_CTX_new (is_client ? TLSv1_client_method () : TLSv1_server_method ());
   ^~~~~~
In file included from /usr/include/openssl/ct.h:13:0,
                 from /usr/include/openssl/ssl.h:61,
                 from ./nopoll_private.h:45,
                 from nopoll_conn.c:49:
/usr/include/openssl/ssl.h:1614:1: note: declared here
 DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_client_method(void)) /* TLSv1.0 */
 ^
(etc ...)

because the {SSL,TLS}vXX_{client,server}_method() function family have been replaced by a unique TLS_{client,server}_method(), as stated in the OpenSSL 1.1.0 documentation.

I'd be pleased to submit a fix but I'm not fluent with the autotools, and I think something must be done there, because the separate defines for all the SSL and TLS versions support does not make sense anymore if I understand correctly.

Any thoughts ?

Regards.

francisbrosnan commented 7 years ago

Hello Camille, Thanks for reporting. This has been reported by other users in some other forms, but at the end the same issue. I've to take a look into this issue to provide a consistent patch that not only supports this but also to keep on supporting old systems like Lenny and centos5... I hope to have it soon, Best Regards,

camilleoudot commented 7 years ago

Hi Francis, sure, I was thinking of some fix that would not break the builds on older platforms. I'll try to figure out something in the next weeks.

Cheers

francisbrosnan commented 7 years ago

This has been solved with latest commits, Best Regards