Commit 06b18def authored by Edward Hervey's avatar Edward Hervey 🤘 Committed by Tim-Philipp Müller

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 #811
parent 3bc9bd2b
Pipeline #19019 passed with stages
in 40 minutes and 11 seconds
......@@ -184,14 +184,17 @@ gst_dtls_agent_init (GstDtlsAgent * self)
priv->ssl_context = SSL_CTX_new (DTLSv1_method ());
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");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment