History

avformat/tls: clean up new whip options

Timo Rothenpieler committed 1 year ago

Commit 3f7e0fd1 parent 4a4a5662 files · +5 −5Browse files

Unified · Split

2 files
  1. libavformat/tls.h +3 −3
  2. libavformat/whip.c +2 −2
libavformat/tls.h+3−3
@@ -84,13 +84,13 @@ typedef struct TLSShared { · 83 unmodified lines
8484 {"tls_verify", "Verify the peer certificate", offsetof(pstruct, options_field . verify), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = TLS_OPTFL }, \
8585 {"cert_file", "Certificate file", offsetof(pstruct, options_field . cert_file), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
8686 {"key_file", "Private key file", offsetof(pstruct, options_field . key_file), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
87+ {"cert_pem", "Certificate PEM string", offsetof(pstruct, options_field . cert_buf), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
88+ {"key_pem", "Private key PEM string", offsetof(pstruct, options_field . key_buf), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
8789 {"listen", "Listen for incoming connections", offsetof(pstruct, options_field . listen), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = TLS_OPTFL }, \
8890 {"verifyhost", "Verify against a specific hostname", offsetof(pstruct, options_field . host), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
8991 {"http_proxy", "Set proxy to tunnel through", offsetof(pstruct, options_field . http_proxy), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
9092 {"use_external_udp", "Use external UDP from muxer or demuxer", offsetof(pstruct, options_field . use_external_udp), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 1, .flags = TLS_OPTFL }, \
91− {"mtu", "Maximum Transmission Unit", offsetof(pstruct, options_field . mtu), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, .flags = TLS_OPTFL}, \
92− {"cert_buf", "The optional certificate buffer for DTLS", offsetof(pstruct, options_field . cert_buf), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL}, \
93− {"key_buf", "The optional private key buffer for DTLS", offsetof(pstruct, options_field . key_buf), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL}
93+ {"mtu", "Maximum Transmission Unit", offsetof(pstruct, options_field . mtu), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, .flags = TLS_OPTFL }
9494
9595 int ff_tls_open_underlying(TLSShared *c, URLContext *parent, const char *uri, AVDictionary **options);
9696
libavformat/whip.c+2−2
@@ -1291,12 +1291,12 @@ next_packet: · 1290 unmodified lines
12911291 if (whip->cert_file) {
12921292 av_dict_set(&opts, "cert_file", whip->cert_file, 0);
12931293 } else
1294− av_dict_set(&opts, "cert_buf", whip->cert_buf, 0);
1294+ av_dict_set(&opts, "cert_pem", whip->cert_buf, 0);
12951295
12961296 if (whip->key_file) {
12971297 av_dict_set(&opts, "key_file", whip->key_file, 0);
12981298 } else
1299− av_dict_set(&opts, "key_buf", whip->key_buf, 0);
1299+ av_dict_set(&opts, "key_pem", whip->key_buf, 0);
13001300 av_dict_set_int(&opts, "use_external_udp", 1, 0);
13011301 av_dict_set_int(&opts, "listen", 1, 0);
13021302 /* If got the first binding response, start DTLS handshake. */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t