[FFmpeg-devel,2/5] lavf/tls_openssl: if no CA path is set, use the system default

Submitted by Rodger Combs on Jan. 18, 2019, 8:46 a.m.

Details

Message ID 20190118084604.82324-2-rodger.combs@gmail.com
State New
Headers show

Commit Message

Rodger Combs Jan. 18, 2019, 8:46 a.m.
This is consistent with the other TLS wrappers
---
 libavformat/tls_openssl.c | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c
index 9dd53c6fc0..ae3fd6e236 100644
--- a/libavformat/tls_openssl.c
+++ b/libavformat/tls_openssl.c
@@ -253,6 +253,9 @@  static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
     if (c->ca_file) {
         if (!SSL_CTX_load_verify_locations(p->ctx, c->ca_file, NULL))
             av_log(h, AV_LOG_ERROR, "SSL_CTX_load_verify_locations %s\n", ERR_error_string(ERR_get_error(), NULL));
+    } else {
+        if (!SSL_CTX_set_default_verify_paths(p->ctx))
+            av_log(h, AV_LOG_ERROR, "SSL_CTX_set_default_verify_paths %s\n", ERR_error_string(ERR_get_error(), NULL));
     }
     if (c->cert_file && !SSL_CTX_use_certificate_chain_file(p->ctx, c->cert_file)) {
         av_log(h, AV_LOG_ERROR, "Unable to load cert file %s: %s\n",