Skip to content
  • Sebastian Dröge's avatar
    dtls: Fix compiler warnings with openssl 1.1 or newer · 6ac07f44
    Sebastian Dröge authored and Tim-Philipp Müller's avatar Tim-Philipp Müller committed
    - DTLSv1_method() is deprecated, and since 1.0.2 replaced by
      DTLS_method().
    - CRYPTO_set_locking_callback() and CRYPTO_set_id_callback() are
      no-ops (empty macros) since 1.1 and are not supposed to be used
      anymore.
    
    gstdtlsagent.c: In function ‘gst_dtls_agent_init’:
    gstdtlsagent.c:173:3: error: ‘DTLSv1_method’ is deprecated [-Werror=deprecated-declarations]
       priv->ssl_context = SSL_CTX_new (DTLSv1_method ());
       ^~~~
    In file included from /usr/include/openssl/ct.h:13:0,
                     from /usr/include/openssl/ssl.h:61,
                     from gstdtlsagent.c:40:
    /usr/include/openssl/ssl.h:1614:1: note: declared here
     DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_method(void)) /* DTLSv1.0 */
     ^
    At top level:
    gstdtlsagent.c:103:1: error: ‘ssl_thread_id_function’ defined but not used [-Werror=unused-function]
     ssl_thread_id_function (void)
     ^~~~~~~~~~~~~~~~~~~~~~
    gstdtlsagent.c:73:1: error: ‘ssl_locking_function’ defined but not used [-Werror=unused-function]
     ssl_locking_function (gint mode, gint lock_num, const gchar * file, gint line)
     ^~~~~~~~~~~~~~~~~~~~
    6ac07f44