mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-16 22:40:53 +08:00
options: enable tls-verify by default
We shouldn't default to no verification in current year. User can opt-out if needed. Keep it disable for builds without libcurl when libavformat is older than 63.0.100. This is done to match ffmpeg's timeline for enabling tls_verify by default in lavf, also to ensure we the default verify locations will be loaded on such version.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
change `--tls-verify` default to `yes`
|
||||
+10
-3
@@ -5663,9 +5663,16 @@ Network
|
||||
Certificate authority database file for use with TLS. (Silently fails with
|
||||
older FFmpeg versions.)
|
||||
|
||||
``--tls-verify``
|
||||
Verify peer certificates when using TLS (e.g. with ``https://...``).
|
||||
(Silently fails with older FFmpeg versions.)
|
||||
``--tls-verify=<yes|no>``
|
||||
Verify peer certificates when using TLS (e.g. with ``https://...``)
|
||||
(default: yes*). Disabling this option allows man-in-the-middle attacks
|
||||
to silently substitute the content of an HTTPS stream and is only
|
||||
recommended as a per-stream override when verification fails for a
|
||||
known-good reason (e.g. an outdated CA bundle, a corporate proxy, a
|
||||
development server with a self-signed certificate).
|
||||
|
||||
This is disabled by default, if mpv is built without libcurl and
|
||||
libavformat is older than 63.0.100.
|
||||
|
||||
``--tls-cert-file``
|
||||
A file containing a certificate to use in the handshake with the
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
#include <float.h>
|
||||
|
||||
#include <libavformat/version.h>
|
||||
|
||||
#include "network.h"
|
||||
#include "options/m_option.h"
|
||||
|
||||
@@ -41,5 +43,8 @@ const struct m_sub_options mp_network_conf = {
|
||||
.defaults = &(const struct mp_network_opts){
|
||||
.useragent = "libmpv",
|
||||
.timeout = 60,
|
||||
#if HAVE_LIBCURL || LIBAVFORMAT_VERSION_MAJOR >= 63
|
||||
.tls_verify = true,
|
||||
#endif
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user