options: add support for client certificate authentication

Client certificates are supported by ffmpeg as documented here:

  > https://www.ffmpeg.org/ffmpeg-protocols.html#tls

Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
Joschka Tillmanns
2015-10-20 20:27:58 +02:00
committed by wm4
parent 0121d00478
commit 1ee8ce75f1
4 changed files with 15 additions and 0 deletions

View File

@@ -168,6 +168,10 @@ void mp_setup_av_network_options(AVDictionary **dict, struct mpv_global *global,
av_dict_set(dict, "tls_verify", opts->network_tls_verify ? "1" : "0", 0);
if (opts->network_tls_ca_file)
av_dict_set(dict, "ca_file", opts->network_tls_ca_file, 0);
if (opts->network_tls_cert_file)
av_dict_set(dict, "cert_file", opts->network_tls_cert_file, 0);
if (opts->network_tls_key_file)
av_dict_set(dict, "key_file", opts->network_tls_key_file, 0);
char *cust_headers = talloc_strdup(temp, "");
if (opts->network_referrer) {
cust_headers = talloc_asprintf_append(cust_headers, "Referer: %s\r\n",