From 49cc7b809114dff4ceb108b530d4c4592a1b03b9 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Mon, 5 Nov 2018 12:31:38 +0100 Subject: dtlsconnection: Clear error queue before SSL_do_handshake As documented on [the SSL_get_error manpage][1] we need to empty the error queue before making any call that we check with SSL_get_error. [1]: https://www.openssl.org/docs/man1.1.1/man3/SSL_get_error.html --- ext/dtls/gstdtlsconnection.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ext/dtls') diff --git a/ext/dtls/gstdtlsconnection.c b/ext/dtls/gstdtlsconnection.c index 6b47460d5..0242aebc5 100644 --- a/ext/dtls/gstdtlsconnection.c +++ b/ext/dtls/gstdtlsconnection.c @@ -716,6 +716,7 @@ openssl_poll (GstDtlsConnection * self) log_state (self, "poll: before handshake"); + ERR_clear_error (); ret = SSL_do_handshake (self->priv->ssl); log_state (self, "poll: after handshake"); -- cgit v1.2.1