---
libavformat/tls_openssl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c
index 81b2f066c9..f116b5eac6 100644
--- a/libavformat/tls_openssl.c
+++ b/libavformat/tls_openssl.c
@@ -786,7 +786,7 @@ static int dtls_start(URLContext *h, const char *url, int
flags, AVDictionary **
/* Refer to the test cases regarding these curves in the WebRTC code. */
const char* curves = "X25519:P-256:P-384:P-521";
- p->ctx = SSL_CTX_new(DTLS_method());
+ p->ctx = SSL_CTX_new(c->listen ? DTLS_server_method() :
DTLS_client_method());
if (!p->ctx) {
ret = AVERROR(ENOMEM);
goto fail;
@@ -810,6 +810,7 @@ static int dtls_start(URLContext *h, const char *url, int
flags, AVDictionary **
ret = AVERROR(EINVAL);
return ret;
}
+
ret = openssl_init_ca_key_cert(h);
if (ret < 0) goto fail;
--
2.49.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".