summaryrefslogtreecommitdiff
path: root/libavformat/tls.h
diff options
context:
space:
mode:
authorRodger Combs <rodger.combs@gmail.com>2015-06-08 04:50:48 -0500
committerMichael Niedermayer <michaelni@gmx.at>2015-06-08 14:08:52 +0200
commit6dd5371e34c6602591766f73aa647b369d77853b (patch)
treedb58a16fcbddf50de0a062701352d08143b20465 /libavformat/tls.h
parent7630cce4b3096b6d0106a0f5dd4c5f497cc28a93 (diff)
downloadffmpeg-6dd5371e34c6602591766f73aa647b369d77853b.tar.gz
lavf/tls: let the user specify what name to verify against
This can be useful for debugging, or in scenarios where the user doesn't want to use the system's DNS settings for whatever reason. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/tls.h')
-rw-r--r--libavformat/tls.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/tls.h b/libavformat/tls.h
index 959badaf53..2a36f34f18 100644
--- a/libavformat/tls.h
+++ b/libavformat/tls.h
@@ -35,7 +35,9 @@ typedef struct TLSShared {
char *key_file;
int listen;
- char host[200];
+ char *host;
+
+ char underlying_host[200];
int numerichost;
URLContext *tcp;
@@ -48,7 +50,8 @@ typedef struct TLSShared {
{"tls_verify", "Verify the peer certificate", offsetof(pstruct, options_field . verify), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = TLS_OPTFL }, \
{"cert_file", "Certificate file", offsetof(pstruct, options_field . cert_file), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
{"key_file", "Private key file", offsetof(pstruct, options_field . key_file), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
- {"listen", "Listen for incoming connections", offsetof(pstruct, options_field . listen), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = TLS_OPTFL }
+ {"listen", "Listen for incoming connections", offsetof(pstruct, options_field . listen), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = TLS_OPTFL }, \
+ {"verifyhost", "Verify against a specific hostname", offsetof(pstruct, options_field . host), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }
int ff_tls_open_underlying(TLSShared *c, URLContext *parent, const char *uri, AVDictionary **options);