From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id C0F1F4CBDB for ; Sun, 13 Jul 2025 07:10:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id C16E268DC65; Sun, 13 Jul 2025 10:10:06 +0300 (EEST) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 140BC68DADE for ; Sun, 13 Jul 2025 10:10:00 +0300 (EEST) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-73972a54919so3025154b3a.3 for ; Sun, 13 Jul 2025 00:09:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752390598; x=1752995398; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=QKkAabIIh65JxNTOQvuzHbmVKAUKhwVSc7VCUqHIFo4=; b=IatKmzK0TnAYJbDpV1NwY930pONuvSJg2xV56cAbFlvhXwyatnnxRohidFRT/47jOM fh/FUwpUbZw/G4VPrpPCnJuECgXGQTNddAtX1XPcP7L0o9wHGsyP7UI1klfj3NRVqQpz vqVchukzBCWY4AT/VvpWgRnYq9TdbnGPdOQT+7KAjVRw0ERDNHYbzqCDTxwDCp9Br90V JT1m9k+VXqYcq6Ab/ovFbYV4Nv4TfN1v5nKDuah7lsCVUnQVLYhUPgS93jcANw4hL/X2 YwGJ1t2GQkFinwc0z0JPTJCczDo438fZXSDnBlds836lvNL70dSjZ0jzHZP5B0T7IMtq Eq2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752390598; x=1752995398; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QKkAabIIh65JxNTOQvuzHbmVKAUKhwVSc7VCUqHIFo4=; b=f+Z3BnWnnDDTFvI5+umQkIBPAAhy9+7vuXihPXFEgV5FKs8ypO3ZEOHCHU4WU0Ew4B 4psKfapqE+QAsTuFDQxhPahB4oSrttyvUJXvjekyYWXX8VhKcdat8LIAilFcSoQnciog RrP3B/GjEEUgi5Z4ZEyWby8Br4Vyo1nzfjKrMAeotpHwd1O2R+WWpHmmGBnOF1JL0SJ1 wqR9LLgmvYeNAQPL0wxZ/onQOBziX3bw9BQNdMMicfu8nR5HflNnUSpAEAt+upaMIdvV yZHhPEigXz7Z3Qz6IuvwJuPkB0rO29+/97P+usboBwodctc2fqeshs26UlBqGjHDerWM jUAw== X-Gm-Message-State: AOJu0YxwjKq5ryMENBUeVc8t1cUUH9hQ0QzEusdQ9DCYI1xSaWpa2Hv0 OSvvkkRd8MdLBLcwhkKbsFnCGFMyVDUAXngnHqAuBBd0ed2hciFCkqhou/V4Nzdm X-Gm-Gg: ASbGncszM8LjlgLsmAvYyeXScTbJNrwqYA/jDaBFUIPLPHFAQ2VmxTtzv9cdOuJdJbN xY4Q+2yUD4ZDUSA1rOwhIurtT8vLg4jBPyWw1lbha3opFNBFi4zG6dO/JPpNmnStWhraTqlzfBv i11Crq3wTPKudB/zRJea0xe+yCG/VriBy0MLvWRy466r55SX1tCAdhnak/FimLMAZWtklpo0g/I JrKtxQQK78W0R19sXUUXG9NOObvpYK3tOSBkhrkuEdeAHxeTMNtu2CtRmRFI8as7Opq133cU7mh gfgmqbxlPngSCTZesD1YyFVuSGi1gNy0UWz+anXQAbl5lMfS9YyrxEoxHTeRgdDcfgR9hIvZUYl G+Wb82YxxO09GcBGFrZW1xWq92/0ACFPzZ9SWw6xEUj4= X-Google-Smtp-Source: AGHT+IESmL2bPtPDTD0dM3XjrG+9oJsk4tVui+7zZwWgFLuncSp6KcDes/Rla05Kj4rU8PGeJYZ2ag== X-Received: by 2002:a05:6a00:4b0c:b0:742:a02e:dd8d with SMTP id d2e1a72fcca58-74ee2f4ed10mr11959374b3a.20.1752390597828; Sun, 13 Jul 2025 00:09:57 -0700 (PDT) Received: from localhost.localdomain ([123.11.82.155]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74eb9e07facsm8595591b3a.68.2025.07.13.00.09.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 13 Jul 2025 00:09:57 -0700 (PDT) From: Jack Lau X-Google-Original-From: Jack Lau To: ffmpeg-devel@ffmpeg.org Date: Sun, 13 Jul 2025 15:09:41 +0800 Message-ID: <20250713070950.10626-1-jacklau1222@qq.com> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-Unsent: 1 Subject: [FFmpeg-devel] [PATCH v3 0/9] Fix some issues in tls_openssl X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Jack Lau Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: This patchset aims to fix some issues so that DTLS can work properly (not just for WHIP) Quick experience using such command: ffmpeg -v debug -listen 1 -cert_file cert.pem -key_file key.pem -mtu 1500 -i dtls://127.0.0.1:4444 -c copy -y out.mp4 ffmpeg -v trace -f lavfi -re -i testsrc2=duration=5:size=128x72:rate=30 -an -sn -c:v libx264 -mtu 10000 -f mpegts "dtls://127.0.0.1:4444" Or using avio public api: https://github.com/JackLau1222/openssl-dtls-bio-example/tree/master/ffmpeg_case I notice DTLS still have to do some cleanups, I plan to implement WHIP DTLS client role next step so i'll do it also in coming days Original description: This patchset aims to fix some issues when i try to utilize DTLS using avio. I create a simple DTLS client and server case here https://github.com/JackLau1222/openssl-dtls-bio-example/tree/master/ffmpeg_case This patchset fix: 1. dtls_handshake can't return positive code when it still in progressing 2. udp server mode haven't dest_addr so we need set it through last_recv_addr 3. some code cleanup This patchset depends on Timo's latest schannel patchset More details: https://github.com/BtbN/FFmpeg/pull/3 Jack Lau (9): avformat/tls: add trace function for log TLS/DTLS record avformat/tls_openssl: fix dtls_handshake return code avformat/tls_openssl: remove all redundant "TLS: " in log with AVClass avformat/tls_openssl: make tls and dtls use one close function avformat/whip: free udp socket after dtls free avformat/tls_openssl: replace 1 to TLS_ST_OK to be more clear avformat/tls_openssl: remove requirement for dtls must init cert and key avformat/tls_openssl: auto set the dest addr when dtls in listen mode avformat/tls_openssl: init DTLS context with explicit method libavformat/tls.c | 56 +++++++++++++++++++++++++++ libavformat/tls.h | 2 + libavformat/tls_openssl.c | 81 ++++++++++++++++++++------------------- libavformat/whip.c | 2 +- 4 files changed, 100 insertions(+), 41 deletions(-) -- 2.49.0 _______________________________________________ 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".