Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/3] avformat/tls_openssl: add host verification
@ 2025-07-08 18:06 Marvin Scholz
  2025-07-08 18:06 ` [FFmpeg-devel] [PATCH 2/3] avformat/tls_openssl: verify setting hostname for SNI Marvin Scholz
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Marvin Scholz @ 2025-07-08 18:06 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Marvin Scholz

From: Daniel N Pettersson <danielnp@axis.com>

Co-Authored-By: Marvin Scholz <epirat07@gmail.com>
---
 libavformat/tls_openssl.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c
index a0fa3285d5..7614caf089 100644
--- a/libavformat/tls_openssl.c
+++ b/libavformat/tls_openssl.c
@@ -921,8 +921,15 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
     ret = init_bio_method(h);
     if (ret < 0)
         goto fail;
-    if (!c->listen && !c->numerichost)
+    if (!c->listen && !c->numerichost) {
+        if (!SSL_set1_host(p->ssl, c->host)) {
+            av_log(h, AV_LOG_ERROR, "Failed to set hostname for TLS/SSL verification: %s\n",
+                openssl_get_error(p));
+            ret = AVERROR(EIO);
+            goto fail;
+        }
         SSL_set_tlsext_host_name(p->ssl, c->host);
+    }
     ret = c->listen ? SSL_accept(p->ssl) : SSL_connect(p->ssl);
     if (ret == 0) {
         av_log(h, AV_LOG_ERROR, "Unable to negotiate TLS/SSL session\n");
-- 
2.39.5 (Apple Git-154)

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2025-07-08 18:54 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-08 18:06 [FFmpeg-devel] [PATCH 1/3] avformat/tls_openssl: add host verification Marvin Scholz
2025-07-08 18:06 ` [FFmpeg-devel] [PATCH 2/3] avformat/tls_openssl: verify setting hostname for SNI Marvin Scholz
2025-07-08 18:16   ` Nicolas George
2025-07-08 18:26     ` Marvin Scholz
2025-07-08 18:33       ` Nicolas George
2025-07-08 18:06 ` [FFmpeg-devel] [PATCH 3/3] avformat/tls_openssl: load default verify locations Marvin Scholz
2025-07-08 18:16 ` [FFmpeg-devel] [PATCH 1/3] avformat/tls_openssl: add host verification Nicolas George
2025-07-08 18:17   ` Marvin Scholz
2025-07-08 18:21     ` Nicolas George
2025-07-08 18:24       ` Marvin Scholz
2025-07-08 18:33         ` Nicolas George
2025-07-08 18:50           ` Marvin Scholz
2025-07-08 18:53             ` Nicolas George
2025-07-08 18:28 ` [FFmpeg-devel] [PATCH v2 " Marvin Scholz
2025-07-08 18:28   ` [FFmpeg-devel] [PATCH v2 2/3] avformat/tls_openssl: verify setting hostname for SNI Marvin Scholz
2025-07-08 18:28   ` [FFmpeg-devel] [PATCH v2 3/3] avformat/tls_openssl: load default verify locations Marvin Scholz
2025-07-08 18:53 ` [FFmpeg-devel] [PATCH v3 1/3] avformat/tls_openssl: add hostname for verification Marvin Scholz
2025-07-08 18:53   ` [FFmpeg-devel] [PATCH v3 2/3] avformat/tls_openssl: verify setting hostname for SNI Marvin Scholz
2025-07-08 18:53   ` [FFmpeg-devel] [PATCH v3 3/3] avformat/tls_openssl: load default verify locations Marvin Scholz

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git