liuqun / dtls-test

demo project using DTLS over TCP (not UDP!!!)
MIT License
0 stars 0 forks source link

fix up OpenSSL gcc complains of "DEPRECATEDIN_1_1_0" #1

Open liuqun opened 5 years ago

liuqun commented 5 years ago
  1. 
    make: Entering directory '/home/liuqun/openssl-demo/dtls-demo/dtls-test'
    gcc -o server dtls_server.c dtls.c -lssl -lcrypto -L/usr/local/ccnx/dependencies/build/lib -I/usr/local/ccnx/dependencies/build/include

dtls.c: In function ‘dtls_End’: dtls.c:18:5: warning: ‘ERR_remove_state’ is deprecated [-Wdeprecated-declarations] ERR_remove_state(0); ^~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from dtls.h:6, from dtls.c:4: /usr/include/openssl/err.h:260:1: note: declared here DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid)) ^~~~~~

2. 

dtls.c: In function ‘dtls_InitContextFromKeystore’: dtls.c:39:5: warning: ‘DTLSv1_method’ is deprecated [-Wdeprecated-declarations] params->ctx = SSL_CTX_new(DTLSv1_method()); ^~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from dtls.h:6, from dtls.c:4: /usr/include/openssl/ssl.h:1895:1: note: declared here DEPRECATEDIN_1_1_0(__owur const SSL_METHOD DTLSv1_method(void)) / DTLSv1.0 */ ^~~~~~


3. 

gcc -o client dtls_client.c dtls.c -lssl -lcrypto -L/usr/local/ccnx/dependencies/build/lib -I/usr/local/ccnx/dependencies/build/include dtls.c: In function ‘dtls_End’: dtls.c:18:5: warning: ‘ERR_remove_state’ is deprecated [-Wdeprecated-declarations] ERR_remove_state(0); ^~~~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from dtls.h:6, from dtls.c:4: /usr/include/openssl/err.h:260:1: note: declared here DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid)) ^~~~~~

4. 

dtls.c: In function ‘dtls_InitContextFromKeystore’: dtls.c:39:5: warning: ‘DTLSv1_method’ is deprecated [-Wdeprecated-declarations] params->ctx = SSL_CTX_new(DTLSv1_method()); ^~ In file included from /usr/include/openssl/e_os2.h:13, from /usr/include/openssl/err.h:13, from dtls.h:6, from dtls.c:4: /usr/include/openssl/ssl.h:1895:1: note: declared here DEPRECATEDIN_1_1_0(__owur const SSL_METHOD DTLSv1_method(void)) / DTLSv1.0 */ ^~~~~~ make: Leaving directory '/home/liuqun/openssl-demo/dtls-demo/dtls-test'



See also:
- `https://github.com/warmcat/libwebsockets/issues/186`
liuqun commented 5 years ago

https://github.com/liuqun/dtls-test/commit/0dd54ca53315314ca9869db80ef46b5814efac41