diff options
author | Edward Hervey <edward@centricular.com> | 2019-02-13 17:24:50 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-02-13 17:48:46 +0000 |
commit | 06b18defc7515c047f7cf51c6843504786758f21 (patch) | |
tree | 1df4a2978ba1aa2fe1106c938f92a281cc933e20 | |
parent | 3bc9bd2b99797cef15c79d63dea5cd262756ed97 (diff) |
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
-rw-r--r-- | ext/dtls/gstdtlsagent.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/dtls/gstdtlsagent.c b/ext/dtls/gstdtlsagent.c index 8f8ced2b3..1da4e2d06 100644 --- a/ext/dtls/gstdtlsagent.c +++ b/ext/dtls/gstdtlsagent.c @@ -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"); |