mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avformat/tls_openssl: initialize DTLS context with correct method
This commit is contained in:
parent
db0adbbd3f
commit
b6e808d28b
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue