Change #275168
| Category | ffmpeg |
| Changed by | Omkhar Arasaratnam <omkhar@linkedin.com> |
| Changed at | Sun 19 Jul 2026 05:56:15 |
| Repository | https://git.ffmpeg.org/ffmpeg.git |
| Project | ffmpeg |
| Branch | master |
| Revision | b96701098fd8bc33a7726b895ca92102da65202d |
Comments
avformat/tls_mbedtls: check the certificate verification result in tls_handshake() tls_mbedtls verifies the peer certificate manually via mbedtls_ssl_get_verify_result() (it uses MBEDTLS_SSL_VERIFY_OPTIONAL), but only in tls_open(). On the external-socket path (external_sock=1) tls_open() skips the handshake; it then runs later through the url_handshake hook, tls_handshake(), which never checks the verification result, so with verify=1 an untrusted peer certificate would be accepted. The only in-tree user of this path is the WHIP muxer, which sets verify=0 (WebRTC binds the peer via the SDP a=fingerprint, not a CA), so this is not reachable today. This change is defence-in-depth: it makes tls_handshake() honor verify symmetrically with the existing tls_open() check. Signed-off-by: Omkhar Arasaratnam <omkhar@linkedin.com>
Changed files
- libavformat/tls_mbedtls.c