|
|
@@ -25,6 +25,7 @@
|
|
|
|
|
|
#include "libavutil/bprint.h"
|
|
|
#include "libavutil/opt.h"
|
|
|
+#include "version.h"
|
|
|
|
|
|
#include "url.h"
|
|
|
|
|
|
@@ -78,10 +79,16 @@ typedef struct TLSShared {
|
|
|
|
|
|
#define TLS_OPTFL (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
|
|
|
|
|
|
+#if FF_API_NO_DEFAULT_TLS_VERIFY
|
|
|
+#define TLS_VERIFY_DEFAULT 0
|
|
|
+#else
|
|
|
+#define TLS_VERIFY_DEFAULT 1
|
|
|
+#endif
|
|
|
+
|
|
|
#define FF_TLS_CLIENT_OPTIONS(pstruct, options_field) \
|
|
|
{"ca_file", "Certificate Authority database file", offsetof(pstruct, options_field . ca_file), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
|
|
|
{"cafile", "Certificate Authority database file", offsetof(pstruct, options_field . ca_file), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
|
|
|
- {"tls_verify", "Verify the peer certificate", offsetof(pstruct, options_field . verify), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = TLS_OPTFL }, \
|
|
|
+ {"tls_verify", "Verify the peer certificate", offsetof(pstruct, options_field . verify), AV_OPT_TYPE_INT, { .i64 = TLS_VERIFY_DEFAULT }, 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 }, \
|
|
|
{"verifyhost", "Verify against a specific hostname", offsetof(pstruct, options_field . host), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }
|