| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This patch aims to simplify the dtls handshake process
since dtls handshake use force block mode
We can just use the return code instead of DTLSState enum
Signed-off-by: Jack Lau <[email protected]>
|
|
|
|
| |
Signed-off-by: Kacper Michajłow <[email protected]>
|
|
|
|
|
|
|
|
|
| |
It was unnecessary convoluted, remove not needed memory allocations,
snprintf.
Also fixes posibility to call snprinft with NULL as %s input.
Signed-off-by: Kacper Michajłow <[email protected]>
|
|
|
|
|
|
|
| |
Too much AI is bad for you...
Fixes: 167e343bbe75515a80db8ee72ffa0c607c944a00
Signed-off-by: Kacper Michajłow <[email protected]>
|
|
|
|
|
|
| |
See RFC5280 4.1.2.2
Signed-off-by: Jack Lau <[email protected]>
|
|
|
|
|
|
|
|
| |
The SRTP profile string "SRTP_AES128_CM_SHA1_80" is only used when
use_srtp is enabled. Move its declaration inside the "if (s->use_srtp)"
block to limit scope
Signed-off-by: Jack Lau <[email protected]>
|
|
|
|
| |
Signed-off-by: Jack Lau <[email protected]>
|
|
|
|
| |
Signed-off-by: Jack Lau <[email protected]>
|
|
|
|
|
|
|
|
| |
Pure cleanup, no functional changes
Unify local pointer names to `TLSContext *c` and `TLSShared *s` to
reduce confusion from inconsistent names (e.g. p, ctx, s, c)
Signed-off-by: Jack Lau <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BIO_get_new_index() is static counter meant to get index for custom bio
type definition. As we can read in the documentation:
> Note that BIO_get_new_index() can only be used 127 times before it
> returns an error.
We cannot call it repeatedly, because it will fail eventually.
To my understanding the index is not needed in our use and we could
safely use BIO_TYPE_NONE. Documentation states:
> type can be set to either BIO_TYPE_NONE or via BIO_get_new_index() if
> a unique type is required for searching (See BIO_find_type(3))
We don't use any search related functions.
This reverts commit 816dad231f5b312fd98e81cc6a6cbaf47c1e26a5.
Fixes: https://github.com/mpv-player/mpv/issues/16589
Signed-off-by: Kacper Michajłow <[email protected]>
|
|
|
|
|
|
|
| |
When no explicit CAs file is set, load the default locations,
else there is no way for verification to succeed.
This matches the behavior of other TLS backends.
|
| |
|
|
|
|
|
|
|
|
| |
When verification is enabled (using -tls_verify 1) now
the hostname will be verified properly too, while before
only other aspects of the certificate were checked.
Co-Authored-By: Marvin Scholz <[email protected]>
|
| |
|
|
|
|
|
| |
Signed-off-by: Jack Lau <[email protected]>
Signed-off-by: Timo Rothenpieler <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Jack Lau <[email protected]>
Signed-off-by: Timo Rothenpieler <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Jack Lau <[email protected]>
Signed-off-by: Timo Rothenpieler <[email protected]>
|
|
|
|
|
|
|
| |
handshake
The internal BIO functions do not in fact look at this flag, only the outer
tls_read and tls_write functions do.
|
|
|
|
|
| |
Signed-off-by: Jack Lau <[email protected]>
Signed-off-by: Timo Rothenpieler <[email protected]>
|
|
|
|
| |
none is provided in listen mode
|
| |
|
| |
|
| |
|
|
|
|
|
| |
OpenSSL docs say:
These functions have no impact when used with DTLS.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
There is no sensible way to handle this otherwise anyway, one just has
to loop over this function until it succeeds.
|
|
|
|
|
| |
Taken from the first received packet, which will signify the now
permanent peer of this DTLS "connection".
|
| |
|
| |
|
|
|
|
|
|
| |
Using SSL_CTX_set_options to disallow specific versions is
discouraged by the documentation, which recommends to use
SSL_CTX_set_min_proto_version instead.
|
|
|
|
|
| |
SSLv23_*_method was just a define for these anyway since OpenSSL 1.1.0
and the old functions are deprecated.
|
|
|
|
| |
Calling av_free with NULL is a no-op so this check is not needed.
|
| |
|
|
|
|
|
|
| |
As noted in the OpenSSL documentation, BIO_get_new_index must be
used to get a new BIO index. This is ORd with the proper type flag
BIO_TYPE_SOURCE_SINK.
|
|
|
|
|
| |
This was used previously when multiple OpenSSL versions were supported
that required this to be handled differently.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
api doc: https://docs.openssl.org/1.0.2/man3/BIO_s_mem
In higher versions (openssl 1.0.2 and higher),
the function signature is BIO *BIO_new_mem_buf(const void *buf, int len),
so passing a const string doesn't cause an warnings.
However, in lower versions of OpenSSL,
the function signature becomes BIO *BIO_new_mem_buf(void *buf, int len),
which leads to warnings.
OpenSSL guarantees that it will not modify the string,
so it's safe to cast the pem_str to (void *) to avoid this warning.
Signed-off-by: Jack Lau <[email protected]>
Signed-off-by: Zhao Zhili <[email protected]>
|
|
|
|
|
|
|
|
|
| |
add the missing data structure pkey in the tls_context
properly set this pkey and free it
Signed-off-by: Jack Lau <[email protected]>
Reviewed-by: Martin Storsjö <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
0. WHIP Version 3.
1. The WHIP muxer has been renamed and refined,
with improved logging context and error messages for SSL, DTLS, and RTC.
2. Magic numbers have been replaced with macros and extracted to functions,
and log levels have been altered for better clarity.
3. DTLS curve list has been updated,
and SRTP profile names have been refined for FFmpeg and OpenSSL.
4. ICE STUN magic number has been refined,
and RTP payload types have been updated based on Chrome's definition.
5. Fixed frame size has been refined to rtc->audio_par->frame_size,
and h264_mp4toannexb is now used to convert MP4/ISOM to annexb.
6. OPUS timestamp issue has been addressed,
and marker setting has been corrected after utilizing BSF.
7. DTLS handshake and ICE handling have been optimized for improved performance,
with a single handshake timeout and server role to prevent ARQ.
8. Consolidated ICE request/response handling and DTLS handshake into a single function,
and fixed OpenSSL build errors to work with Pion.
9. Merge TLS & DTLS implementation, shared BIO callbacks, read, write,
print_ssl_error, openssl_init_ca_key_cert,
init_bio_method function and shared same data structure
10. Modify configure that whip is enabled only dtls is
enabled(just support openssl for now) to fix build error
Co-authored-by: winlin <[email protected]>
Co-authored-by: yangrtc <[email protected]>
Co-authored-by: cloudwebrtc <[email protected]>
Co-authored-by: Haibo Chen <[email protected]>
Co-authored-by: Steven Liu <[email protected]>
Co-authored-by: Jun Zhao <[email protected]>
Signed-off-by: Jack Lau <[email protected]>
Signed-off-by: Steven Liu <[email protected]>
|
|
|
|
|
|
|
| |
These functions do nothing useful when used with a non-ancient
version of openssl (namely 1.1.0 or above).
Signed-off-by: Andreas Rheinhardt <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Its existence is a remnant of (libavcodec's) lock-manager API
which has been removed in a04c2c707de2ce850f79870e84ac9d7ec7aa9143.
There is no need to use the same lock for avisynth, chromaprint
or tls, so switch to ordinary static mutexes instead.
Signed-off-by: Andreas Rheinhardt <[email protected]>
|