mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
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:
parent
3bc9bd2b99
commit
06b18defc7
1 changed files with 6 additions and 3 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue