Commit graph

14 commits

Author SHA1 Message Date
Jordan Petridis 1f562870ee Run gst-indent through the files
This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
2018-11-28 14:18:26 +00:00
Rosen Penev 29d48ce8a1 dtls: Fix compilation without deprecated APIs on OpenSSL 1.1.x 2018-11-14 14:55:37 -08:00
Andreas Frisch 51f0307900 dtls: Properly display all errors/warnings from ERR queue
Print out all errors from the OpenSSL error queue instead of just
looking at the topmost error. Using the callback interface also removes
the need for formatting using a buffer on the stack.
2018-11-06 16:23:50 +00:00
Tim-Philipp Müller 3c6f642fa6 dtls: Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 01:06:24 +02:00
Scott D Phillips 1a43d57359 dtls: Set openssl's threadid the 1.0.x way
For pre-1.1.x openssl, a callback to set the thread id needs to be
provided to openssl. In 0.9.x the thread id was an unsigned long. In
1.0.x it was expanded to be able to hold a void*. Here we change to use
the 1.0.x API so that the thread id can always hold a GThread*, even on
platforms like msvc x64 where unsigned long is only 32 bits.

All of this is still #ifdef'd out of existence when building with
openssl 1.1.x or later which changed the thread API again, and does not
need a thread id callback.

https://bugzilla.gnome.org/show_bug.cgi?id=775292
2016-12-05 11:26:15 +02:00
Sebastian Dröge 31317fd666 dtls: Fix compiler warnings with openssl 1.1 or newer
- 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)
 ^~~~~~~~~~~~~~~~~~~~
2016-11-02 14:04:19 +02:00
Olivier Crête c35b918ce1 dtls: Downgrade locking debug 2016-11-01 14:57:21 -04:00
Sebastian Dröge 2dcd5dd39b dtls: Initialize debug category earlier
Otherwise the openssl initialization will use it before initialization
2015-03-17 11:43:00 +01:00
Tim-Philipp Müller 9f06d36d95 dtls: make sure we actually log into the right debug category
GST_DTLS_USE_GST_LOG is not defined anywhere, so
we'd just log into the default category by accident.
We use the gst logging system unconditionally now,
so might just as well remove this #if #else.
2015-03-16 17:51:20 +00:00
Tim-Philipp Müller 86a889883e dtls: fix some more compiler warnings
gcc-4.9.2:
gstdtlsagent.c:114:1: error: old-style function definition
gstdtlsconnection.c:253:3: error: ISO C90 forbids mixed declarations and code
gstdtlsconnection.c:291:3: error: ISO C90 forbids mixed declarations and code
gstdtlsconnection.c:391:3: error: ISO C90 forbids mixed declarations and code
gstdtlsconnection.c:434:3: error: ISO C90 forbids mixed declarations and code
gstdtlsconnection.c:773:1: error: 'BIO_s_gst_dtls_connection' was used with no prototype before its definition
gstdtlsconnection.c:773:1: error: old-style function definition
2015-03-16 17:36:49 +00:00
Sebastian Dröge d9344ad820 dtls: Unconditionally use GStreamer debug log system 2015-03-16 18:23:27 +01:00
Sebastian Dröge 936fa2f1c4 dtls: Re-namespace from Er to Gst 2015-03-16 18:23:27 +01:00
Sebastian Dröge 6183e99eec dtls: Fix indention 2015-03-16 18:23:27 +01:00
Sebastian Dröge 1e0ed9af11 dtls: Add new DTLS plugin
This is a copy of the Ericsson DTLS plugin from
https://github.com/EricssonResearch/openwebrtc-gst-plugins/tree/master/ext/erdtls/src

https://bugzilla.gnome.org/show_bug.cgi?id=744582
2015-03-16 18:23:27 +01:00