dtls: Don't abort on non-fatal issues

OpenSSL will take care of returning valid context if there are
only non-fatal issues. Don't abort in those cases and instead just
print out the issues

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/811
This commit is contained in:
Edward Hervey 2019-02-13 17:24:50 +01:00 committed by Tim-Philipp Müller
parent 3bc9bd2b99
commit 06b18defc7

View file

@ -184,14 +184,17 @@ gst_dtls_agent_init (GstDtlsAgent * self)
#else
priv->ssl_context = SSL_CTX_new (DTLSv1_method ());
#endif
if (ERR_peek_error () || !priv->ssl_context) {
priv->ssl_context = NULL;
if (!priv->ssl_context) {
GST_WARNING_OBJECT (self, "Error creating SSL Context");
ERR_print_errors_cb (ssl_warn_cb, self);
g_return_if_reached ();
}
/* If any non-fatal issues happened, print them out and carry on */
if (ERR_peek_error ()) {
ERR_print_errors_cb (ssl_warn_cb, self);
ERR_clear_error ();
}
SSL_CTX_set_verify_depth (priv->ssl_context, 2);
SSL_CTX_set_tlsext_use_srtp (priv->ssl_context, "SRTP_AES128_CM_SHA1_80");