From patchwork Tue Jun 4 10:25:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sfan5 X-Patchwork-Id: 49531 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9183:0:b0:460:55fa:d5ed with SMTP id s3csp2586205vqg; Tue, 4 Jun 2024 03:28:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXWGLFGtv/uKRnMcKuvZ7Jq4LRylXuDfdCzBX37IyHjfFLCEpd0BU4STR8gHK1zdniBmdd2MJC+e66qO+DHFFE81rKAXQwAd07mBQ== X-Google-Smtp-Source: AGHT+IHN5SXaH1cXdFpoSPGMuGTbZ81Gi6Etsy3r6B3uyKBUElFlgu4/7WyV7ZifZJ8qPzQMBBMC X-Received: by 2002:a17:906:3a89:b0:a62:832a:e2c9 with SMTP id a640c23a62f3a-a6822348b69mr942298266b.67.1717496907615; Tue, 04 Jun 2024 03:28:27 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-57a6c096b1esi1218839a12.237.2024.06.04.03.28.27; Tue, 04 Jun 2024 03:28:27 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@LIVE.DE header.s=selector1 header.b=jZlCeWGf; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=live.de Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4D9B668D4E9; Tue, 4 Jun 2024 13:28:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04olkn2047.outbound.protection.outlook.com [40.92.73.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1A71068D4E9 for ; Tue, 4 Jun 2024 13:28:17 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f5nuO4wFZ3myOu/HIzWz9sAIG7fkJMJwuitd91IrTNWKRVsFL4MSmHvh/Bk66kuoDbintoZIa1bH/+MAkyB82oNCNKAcIXpjt4sjoSXNPgk4oEQuCTVuHk9dx9Jj77SdQHxJkq7zebud7xgIiodjs6VbzCyKymP8YAnwhV6mjifG5uNYwpcBDWUUqd563E/XS2NAZa5QL+OUrNbaSoorNE+O2F1BhxwVzTn+0CI3FMm71rj1X1eBUbC9RZhyl4+dWnhxJLLPFKoMBh+uEy6WF+W1mqcEGuc61+iux7SvLwjczFx9thYUyoTjZEx9uM+awSUzATO8gVNm25rv7/3aOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=snIg0Ve0cQJ+gtl48ZrTGTOZ5pJJUTDmtQLDnKfUbOY=; b=FqgjIOJKUH4WZF/Y2Z+zeDsv/vqp+SRow+Hx/w6rIzHAtYGN9bW5TD9utvCSQ2qbK8yQqb+lBM6dSmajG5h2wHjv4t7FKAcrOGYUrhmHji/VnBkLzeiDDaz4k8ASh8Cq1buiMf5BdtasqMnG7eNK5VWcFkk3vUQfC2BPPR6HWwiR+Uo4bUU+WcSNxMXYHBvTxDPhuew87wM2bQUq1EsdSW1KMrw/Pn4t6MFSg0YMxMSxh91Ot/W6vmsoEZP77MfgN9uDk8JzoL8hikq+6qdVIy1wWrqElIWrqw5rY1ZG4x3h2TlHJ1E0kQg9Y+UYdZdRDUcw3Zlb25rqNNRoWa6aWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=LIVE.DE; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=snIg0Ve0cQJ+gtl48ZrTGTOZ5pJJUTDmtQLDnKfUbOY=; b=jZlCeWGf/6pOj6tbv/a5TyNqiBMKwaNT3ZdJtPDKlfCYaxJ7pdgGWeAyTw2JM8b08TbazZ4GS7qDcdv1rQXHebsv+8gLgkJhJptABwf6c0w73vt7LjbFXyLW4regt0g3wfcg/kpO4qliiRtHOye/H3ooMRla4lYCFnwCuZq5qO4FcKmdHxuq2Oa/S7PQpT8WDsrduTTnnjLWCthqjoaFy44ljuztb4d5AutWuu96RLYotfI+etF3XarKbcZ7vhTStpMp3KZDX7YY8/dYB4iAgAUj12PF7aPAk3Mu4kcXQOfZmJRN+RWQa65rXY6XeyJd47utxJmYT2WbOPVSp25eyA== Received: from DU0PR03MB9567.eurprd03.prod.outlook.com (2603:10a6:10:41f::20) by GV1PR03MB8638.eurprd03.prod.outlook.com (2603:10a6:150:96::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7656.15; Tue, 4 Jun 2024 10:28:15 +0000 Received: from DU0PR03MB9567.eurprd03.prod.outlook.com ([fe80::e356:c67a:e5bb:cc8a]) by DU0PR03MB9567.eurprd03.prod.outlook.com ([fe80::e356:c67a:e5bb:cc8a%3]) with mapi id 15.20.7611.016; Tue, 4 Jun 2024 10:28:14 +0000 Message-ID: Date: Tue, 4 Jun 2024 12:25:51 +0200 User-Agent: Mozilla Thunderbird To: FFmpeg development discussions and patches Content-Language: en-US, de-DE From: sfan5 X-TMN: [PKGD2LIoL8AEVn1mPTwNszsKUuUDSDpL68dC6PsZpgs7wPPyrxlK47i6fOj2RDve7TUalDBp7MU=] X-ClientProxiedBy: FR0P281CA0065.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:49::18) To DU0PR03MB9567.eurprd03.prod.outlook.com (2603:10a6:10:41f::20) X-Microsoft-Original-Message-ID: <904a6747-aa21-4400-a0cb-1db78e14be44@live.de> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR03MB9567:EE_|GV1PR03MB8638:EE_ X-MS-Office365-Filtering-Correlation-Id: cac34869-d7c3-425a-c611-08dc84810a87 X-MS-Exchange-SLBlob-MailProps: WYrkjVEqdmMG6eMAWq3UQXax1JZ/TY3d7oy2b0sTOwWLo9BLVs+tcK0twyM7TZ8x6ZeSDWI0bu+SzakLWvbhw21bsZfDQp0osQXRmVUEh3c5w7VeBIXjkN4wIf6hf+nSZ46iWzN59aveR8pv2CkeGiyyyXFOzc3auLT3SMDC31EPD0IcsfcRKRps64VoL+2d3Fy10uoubja9Kp1avYxkkwtbafXLLvXCF6g54Bqn3GGqRbFgw0mXLEFRWlVHuUyLGmoWo62B75lMWpAz+VQQF4CAPijWxS161WVAcNoF1qeXj6uuvP1PjWFtPzJvDjI2PL3XoG30c5H2TsF5iTGaR5UOfeI3OZU7GXl2oRsSraf7HePV6rsBMM1JsTL0rqQjOuNgqu8ms3Wn7Kt0bCnNNlfEQpzH3lk/qI2tPWlDz/2HY3t8zlgccUQTcsGMRaSRlnQll2WZIlMxoLSA7a6EP3VnwThj2YNgvQ1Bs+c2nl+9sDj2/+GxqmfK7p7T7NpK9gyhSqwun3Wv+9p/eIK/li90p6Tkux4BPtThWFj9Xxpfpmh5+10mmdsWkjRu5FYU0YttI8e5KjrkTgQGYwzUS5aOqtT7RImpmBgqKmQS/I1xbl9ES1RJTreyecdXfIvF X-Microsoft-Antispam: BCL:0; ARA:14566002|6092099003|461199019|3412199016|440099019; X-Microsoft-Antispam-Message-Info: 8cEeKcWc7lY547ZOdJwxPJhHJBzsf2TJfOXGa88/UGEnSdwXR7mT4SgXHWln11BZWyULoRQ0otO3OhvdsPFKvMieeW+9sOWa333hS5rn7N2ngsaQ7mzvX5arRBl/XoWJO95SEB0GMai4Yi5yW67tv+1wSujQZg1UMwtXdL0ivvdRDC5n+CcypHO1cqFauV2PrAgSHbTHZrafItAFXg0kugC9mtMc/UbVDWeMoySK6T1DwLnSdGWi/bq/92JL8+75HHcmjWSTQC+vCVWtKER2rr3GhkYBGNss4ynwo2sCVrfqVKgGFWngkXJ49pb3Ifbahq6GxYXLIgZ744Cr9R28z456ZcgAEPFVOslUe7sV/G0= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?GtqsUvokgvR891chfbLCB4GRhhW/?= =?utf-8?q?bbgG4rO+ltLDs3vcwHQ2cZcpwAYtuEMx0dq10UcXM81RN7FfNJrHEsW99E6EzytEq?= =?utf-8?q?4N/RDGN/dxZMItfk+yJuWHjCevlDKkSMGqBsAlkwMMexPTKrjghmwpYRgKVoFQKQf?= =?utf-8?q?BqzPhAi3JRzBDrjzXO1edv/RzsgxgrEeTItmncMNIRFL7EeaIO3yjJ7iZuHznoHzY?= =?utf-8?q?hBNnXfdzct0KoP/SPgh6zXYomZHuk64qBklrB+VocJ04J4dvmj6RKx+dKzY8G0Ils?= =?utf-8?q?jdofUIkQ6UGz4jZfGLa+j+8LKDnF45k2X9p8X5zVIz5QHDVUC9IDcScFCyowbipfA?= =?utf-8?q?u/u42XNbYT98kN80KB0FWtplsaGnbdtZ2TRGfbAneMc0SZqqlxFi1PxeRPE8NUp69?= =?utf-8?q?iMVkqesjjPAiyOLfOBbf8YZykMekRkBKCtYuFk/owEc7YpfozijbdkKGwJ0fINNyS?= =?utf-8?q?WmmDmqHeP1FJ9LguCUaICZTU7uaRX857/S/+gAXjNsdCazemM/DPrEyNTOOxMhuQe?= =?utf-8?q?lF8ddO+woEKu+LVBQYOcD4eS6fAS7yuT/47z/jTFnAw0s18S29f9Z31GNd9ujnjAC?= =?utf-8?q?nJcUOCLyzWDIuOlnOWfwkDo5502KVNg3HKZ2cxo4u0fGujukrTBhZ1QpftJN5pCOp?= =?utf-8?q?bUvSUVi6f5wwcA80ynLSaFHraqcx2b4ddrDDr/EWJd8H/M9ZAyLXTX0WxYQgVCJvr?= =?utf-8?q?mtjiL5pYXQP4ddw687PT6APjJIJ1HZN6nsMynCB8/Wj00+zPcg9a78FtbPmvBHGkR?= =?utf-8?q?RPHR0OfKzLjBHDUpBmaDaYhYuehJ0woD5NXwWLJ58AqzIwEe7+5McZc8SZ4iMEClM?= =?utf-8?q?/9ULxX760qW5VDeKdTNvpIkdHPRwPXx2tuvV1DvwCXkZzLUjCvoypbkgfAFP9J8mF?= =?utf-8?q?7h7RFf3lWxJUFk53+xDY7SWn50uA6a7T0f6WLtC2fK/l3c59zfErGUuFJqGe1dGJK?= =?utf-8?q?6cKP95WywdJfHghB2HnDTSfZnLHLFzBDr3B93pF+95TUzLKBJVsXcrUeXUB1Gp7ra?= =?utf-8?q?PR98C1Cl2zHFDqecAH97TpijWZ1bcYZxqRUNPVYyE6E6FNZpXRGeLoSBMsj5ltmMI?= =?utf-8?q?IJo8RcH9YRX+kVWkaptmmxc+OWRqJc75xHfOYdMJ9Z8Bi9REnPcblh/ZC5/84olMo?= =?utf-8?q?fpm1x5bsQt2EZ77uyRJ0nZ4Mc188oKQ+5EHEKZM4SKM/Q4igcpfOeWS4M4++ipNIE?= =?utf-8?q?tNZBM0w3tbhrrnbCY9UbSCIHL6bCGFNqIRujECVPNO/AuSrS+eiHIZC4Rh38=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-76d7b.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: cac34869-d7c3-425a-c611-08dc84810a87 X-MS-Exchange-CrossTenant-AuthSource: DU0PR03MB9567.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2024 10:28:14.4169 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR03MB8638 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [FFmpeg-devel] [PATCH v3 1/6] lavf/tls_mbedtls: handle more error codes for 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: F85+klz0Wg/2 From 7024782ebac9471194761fba9f60834ed7769efd Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 13 May 2024 20:22:44 +0200 Subject: [PATCH v3 1/6] lavf/tls_mbedtls: handle more error codes for human-readable messages Signed-off-by: sfan5 --- libavformat/tls_mbedtls.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libavformat/tls_mbedtls.c b/libavformat/tls_mbedtls.c index 1a182e735e..02f08fddbb 100644 --- a/libavformat/tls_mbedtls.c +++ b/libavformat/tls_mbedtls.c @@ -138,6 +138,9 @@ static void handle_handshake_error(URLContext *h, int ret) case MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE: av_log(h, AV_LOG_ERROR, "TLS handshake failed.\n"); break; + case MBEDTLS_ERR_SSL_BAD_PROTOCOL_VERSION: + av_log(h, AV_LOG_ERROR, "TLS protocol version mismatch.\n"); + break; #endif case MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE: av_log(h, AV_LOG_ERROR, "A fatal alert message was received from the peer, has the peer a correct certificate?\n"); @@ -145,9 +148,15 @@ static void handle_handshake_error(URLContext *h, int ret) case MBEDTLS_ERR_SSL_CA_CHAIN_REQUIRED: av_log(h, AV_LOG_ERROR, "No CA chain is set, but required to operate. Was the CA correctly set?\n"); break; + case MBEDTLS_ERR_SSL_INTERNAL_ERROR: + av_log(h, AV_LOG_ERROR, "Internal error encountered.\n"); + break; case MBEDTLS_ERR_NET_CONN_RESET: av_log(h, AV_LOG_ERROR, "TLS handshake was aborted by peer.\n"); break; + case MBEDTLS_ERR_X509_CERT_VERIFY_FAILED: + av_log(h, AV_LOG_ERROR, "Certificate verification failed.\n"); + break; default: av_log(h, AV_LOG_ERROR, "mbedtls_ssl_handshake returned -0x%x\n", -ret); break; -- 2.45.2 From patchwork Tue Jun 4 10:26:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sfan5 X-Patchwork-Id: 49533 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9183:0:b0:460:55fa:d5ed with SMTP id s3csp2586393vqg; Tue, 4 Jun 2024 03:28:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVZuPif7QAG0BRgcsEj2gUzVQ1KtpdHqXgwjKAuROXp17BKVzKh4hWvNMDWgezJi2DBbG84MTZYWrAvXszKbSBsTgLrosT6F9atJg== X-Google-Smtp-Source: AGHT+IHqmtDJZOVT0yDuohgk3uxpuRFN0PGLWTPhwfu6nFsrmn+CPjVY4cYkXjkPtMogv/l6kTgz X-Received: by 2002:a17:906:f5a2:b0:a69:edd:332d with SMTP id a640c23a62f3a-a690edd366fmr404604666b.1.1717496926386; Tue, 04 Jun 2024 03:28:46 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a6918ad7465si156548166b.966.2024.06.04.03.28.45; Tue, 04 Jun 2024 03:28:46 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@LIVE.DE header.s=selector1 header.b=GaMm9lUL; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=live.de Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6D72B68D6FA; Tue, 4 Jun 2024 13:28:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04olkn2047.outbound.protection.outlook.com [40.92.73.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3BA7668D6F0 for ; Tue, 4 Jun 2024 13:28:22 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W9tLk2+XTbUuxfYng4sq3R8BbqsFus1DgWZIDKMGMGOST+ryVjf9E8z0ZP4MqZdvhtiua9lyFNIVcfp6U/Nf+vSx7T8CApPuQvFfSPSFd9aI/yOThzbzmVSsfsf2TntBsQQV7tBGbM3qsBomAhZ5o2H/dY/EG8IcuBb1jlLkToLA5e6SGFic3jt/QSGPGIdJBabTyQiv4PwvuKEpTZmTi5mFmLk/sg9TXmXnpNGj43u77uvLKs4HMttHx76l+/Fk0Zkf8/bYCcHBMVtm0zlNj8H31Ps8UCB8IMcwgm4cBZT1F1SACItgonkJdO5z0emnBk5XsOJy9/c1gQeV/i17ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qvALax93dRXddQx6mfZ19Fbeth5NPENcafGfBbMIiBI=; b=YK5jQX7bVvHjplbcV4OionGaHmUDZYcH2O5UWgKBLzkHIPucK+itw4BkQbe2LwzLJNrzSMIja8iOzng7i5teVSVMLCYZebZao6wPq1ecn7Sr5FvaP/RB90/MsGb2lOf0aFTjbLOn6mgWQL+gklkvToVXxq339XIeVNkCNPDVeQXue85KPjB69N1AdZM71/gQwn5wU2CwEkMQtzdM4HdRcwXYQ4Fi+s9mAazngqf/E6b9+qN5XRiQTuwaYpGn480WR/C0mUWoGR6s4vZIpihsbX7pSnMYkh2iTV/xyQWbjSGRU3gStkgZwSmL7vrIPbGza6XgAFTrDF2I14RnVRaBfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=LIVE.DE; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qvALax93dRXddQx6mfZ19Fbeth5NPENcafGfBbMIiBI=; b=GaMm9lULLcgXB/IH7BRapIKLGHcLTFIQKVcSuXV3cd/2n9xjtU8zw4t5m9GmW+LZJ+BdCMH9aXQeZpN3lNPDE9bS6e4BH7vxEb9H+qMgOz8tRn3ucldo1Ojcc6+RJe78QqXxqUHbipWsCzwpNJA2XSlsKsk2FH2Of6SAYINsjRpWce6B/vn8mKR79JdBX7eVrxLvVM2u8DFVa28zHZtLcVzZaiFI7UA4SmyziQ0JuBWnxoKBkqRv7uzRsxaDiUB2I99pX5DiIrHtQhR6hT8vMngmvsbsr4VjY4GSIVDoEKpaf+hthutv5uO2hBNaX3V2N0YN3G917Lqq4CwGGDHgzQ== Received: from DU0PR03MB9567.eurprd03.prod.outlook.com (2603:10a6:10:41f::20) by GV1PR03MB8638.eurprd03.prod.outlook.com (2603:10a6:150:96::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7656.15; Tue, 4 Jun 2024 10:28:15 +0000 Received: from DU0PR03MB9567.eurprd03.prod.outlook.com ([fe80::e356:c67a:e5bb:cc8a]) by DU0PR03MB9567.eurprd03.prod.outlook.com ([fe80::e356:c67a:e5bb:cc8a%3]) with mapi id 15.20.7611.016; Tue, 4 Jun 2024 10:28:15 +0000 Message-ID: Date: Tue, 4 Jun 2024 12:26:23 +0200 User-Agent: Mozilla Thunderbird To: FFmpeg development discussions and patches Content-Language: en-US, de-DE From: sfan5 X-TMN: [1IAceV7Bj+sMophl50WDVVa7/+QVFkJjv42UCU/vUj6uQNSqNqxaaMDnw6bR2fpd3ssrcD9na+0=] X-ClientProxiedBy: FR0P281CA0065.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:49::18) To DU0PR03MB9567.eurprd03.prod.outlook.com (2603:10a6:10:41f::20) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR03MB9567:EE_|GV1PR03MB8638:EE_ X-MS-Office365-Filtering-Correlation-Id: 10c4c142-c3c8-4b2f-dbdf-08dc84810ad0 X-MS-Exchange-SLBlob-MailProps: VTa9p188PROa+hh+zXRdb8iH1LoS7wEl7qV/8dxe/tLgdV4sZ7yMeeQ1W9G7aATlc2vEcEPUaF0yfsOtaR6d1tINM58GfgHjD2RdoXn9e3wKN5HGR81kvzd3aGR38T0ivSskZja91CfSpk8vhWtKF8dKT6qaFV03fLmybQaOYuTIJYbAply9AhrWsdXjE5KA0eqyMB7p3d0zFzhrmi94du7lc6+R6m0sMJnAhxnujTDChAlr7TxdAomL/2uQmYoQntJq9wcoKBLVlgB3qKeeb0FYEWKf+kFm1L73arYxkAV0MPN40l42N9esJQpsx7+BG81W8pja9nKjWCp3Aqyxv08rnKKVB/Q3toN8DtGRa7HrLRZbeyuErc41glxmIe5Krjtgt48uBEsC4J/h9RoJ2xYgSqYr2N2D+o2WvHgUXfgL9I7QK1ZAAhwyXnp7FNluOM76xSvEIftLO4hci0sICH2ggP8ZLONkD6fhKqDDzXxl1TGOM/PU0+F4HJAnLsSxqmAoA2INccYj3TBdBDjF1pidshiRHI6ejMDFFKCKln1zsjPJuGE0fpp77rOBh6zEWbLJR8zawNN4awpyTR3td1WuSG5sDqFCkB7EVrR/zQa9QNXC5WjDtmANS/eSsOlU X-Microsoft-Antispam: BCL:0; ARA:14566002|6092099003|461199019|3412199016|440099019; X-Microsoft-Antispam-Message-Info: WEo7Hd7LXRRFMh7ctQcsZYXRQ8jjgzpyaHeHvYR5YyfVReWlHcZ5TFeSHTw8PMe+Uf2x7s/yqZAsfQzV69JctLge9fHLBdurQQkLp8LuDTVO0adaHCeg6rlDSxCN6qTTRqlQfz2zOhOxYSpLMS3E4ZhC2vkNgRFQhLOU/efANUM+EaPAZN+CLSpYcQzPJ1luwYYehE8IEsVKJt7rTA9kSS9/Cu5QL7gOQiSjvRcIXuQTg7TSLH/tHCkLvUmkvkoNNdar1hzx/YZK9SZXv9OgQMQpSpYd2R2au0o6FdF3WgawsQd+ydCqG6H6a0UZiXpQFdKQ6DuWIE54L80aAFjZNh50Ar8rOQkup/dFa3OsPSg= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?GoAneaVjYxigNQlA91+6F587K/Hi?= =?utf-8?q?0yJ9ikTRxWGDTA5dpN1tJjQQ1l/+0ngS+72QhY/OLAcGNfzU66WsqE79Uy+E6mT6D?= =?utf-8?q?Diiv9TinpVCfxZ8qfbmuiBK+aI/7MFdZCUKKe/qWSrmab714z0smMla8ogzkgWbMg?= =?utf-8?q?5JNAyc+JzHQ7WwGEnbv7HmK1LXYpfIVuIMd4Z5B0xqNLghwX1nN29sJamIwJ/fIPP?= =?utf-8?q?tZIdM+2YkSx2+OWGF22wjg8ksij1sT2VXpukCTaRJBm362qTt/qrdw18r5B0XVvwQ?= =?utf-8?q?w+NAqYMju3eeZ7Ierwm+OVXjbV9Sv+kvhRre0ffTkFcjnR5CYqh2PY4YCYeeMJzxj?= =?utf-8?q?1UBSo704kFsVrj9uXQ0OO6aziBpkUQ0YISV48KIdYwRxJ4RQSTq9DPJIit70ECCpE?= =?utf-8?q?3WpKRhi5NyMHy5R5NXFwB/b9joQ+MHOjNtl9d2Y6uMkHIdPlRazoBdS6dgQxzOm9o?= =?utf-8?q?Vay+N0l7f26+S/X9LUz+itWS/l0OE7XZ8jLse2XN6WmTGYO2FQ42yaV6ZbNwoYyD1?= =?utf-8?q?a7U4qx+nYHMdSEyCC0yNMurq4KHzZ/Hiaq27CpMmcG+Z5VuIuhdRfIl7T1dd+7BLA?= =?utf-8?q?8gt0C6hR4Pv+y8A1k1WBhkY4OZwIjrTyPSEesdTzcvvgeYQtCYHHNGT4AwjUQiXzq?= =?utf-8?q?eLN4Ys1HksmkqLF1ENSfzoRhgF2kTkqp2FVHUxPNTvi2gYgE4ahceSmO1on4gFAPU?= =?utf-8?q?Lx2nNMHQqd3h/kirFYJsYH0ovCGwZhEVnl/9GWIWhmvOwCIxl//Xh3c7FGyYSSt9/?= =?utf-8?q?oqe6IbJZw31VHYil4TqnWyBjyY5KuuUx94tsU9/6nbEA8sBtRSDAAu3tJpQgGtpP6?= =?utf-8?q?vqURXZjwJuykPdsCXGHKonNtmFURqC7xATKQbQKrWFuQUIaiHbWhCTdJa1xAyn3Jy?= =?utf-8?q?TNwOZS3dP9x1EVdbWleFaObnW38l/Z3AvdTXgaYIKsNyLPmRkFv4HlcgeQ0xWNXm7?= =?utf-8?q?c6HSrTs8lqtl72YY9rIjZYa/8NakL61iDgTyJABb8JyfLGWOu7S4oivrWOp/cEc0k?= =?utf-8?q?3qBkS3G1FqSROWFR4K3KXE0DUGVF5WiRc0oco0kQeFf7De9ajz2X5r5Imoozrda/j?= =?utf-8?q?jEqodBnPzAWeYL3ZbxF5yYnx1PzlbHMDpIgWtZT3tE3PPyMd3rnMUxGAUwFQ11z9o?= =?utf-8?q?e6yP2UhTL0o62uDvXTZZvl3+vXiWOfGrFtGU6ICSk8A3k6F9q+ZKyGvc5Vg0g4Kvt?= =?utf-8?q?UJFJKOJIeEYBT8m7uP6x2ME1sUD3ic3i7I00AGgPDb2EY0ZWJR+mp1OCgpqM=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-76d7b.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 10c4c142-c3c8-4b2f-dbdf-08dc84810ad0 X-MS-Exchange-CrossTenant-AuthSource: DU0PR03MB9567.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2024 10:28:14.8759 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR03MB8638 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [FFmpeg-devel] [PATCH v3 2/6] lavf/tls_mbedtls: add missing call to psa_crypto_init 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: rkqqkGw0bTSL From 8b2cab9a0ad225fc2b13850ff1bafb45d3d8ebaa Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 13 May 2024 20:24:43 +0200 Subject: [PATCH v3 2/6] lavf/tls_mbedtls: add missing call to psa_crypto_init This is mandatory depending on configuration or at least with mbedTLS 3.6.0. Signed-off-by: sfan5 --- libavformat/tls_mbedtls.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libavformat/tls_mbedtls.c b/libavformat/tls_mbedtls.c index 02f08fddbb..0d14e9f814 100644 --- a/libavformat/tls_mbedtls.c +++ b/libavformat/tls_mbedtls.c @@ -26,6 +26,9 @@ #include #include #include +#ifdef MBEDTLS_PSA_CRYPTO_C +#include +#endif #include "avformat.h" #include "internal.h" @@ -187,6 +190,13 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op if ((ret = ff_tls_open_underlying(shr, h, uri, options)) < 0) goto fail; +#ifdef MBEDTLS_PSA_CRYPTO_C + if ((ret = psa_crypto_init()) != PSA_SUCCESS) { + av_log(h, AV_LOG_ERROR, "psa_crypto_init returned %d\n", ret); + goto fail; + } +#endif + mbedtls_ssl_init(&tls_ctx->ssl_context); mbedtls_ssl_config_init(&tls_ctx->ssl_config); mbedtls_entropy_init(&tls_ctx->entropy_context); -- 2.45.2 From patchwork Tue Jun 4 10:26:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sfan5 X-Patchwork-Id: 49535 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9183:0:b0:460:55fa:d5ed with SMTP id s3csp2586522vqg; Tue, 4 Jun 2024 03:29:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVODc5GYyp8Le3tzgmJ6TZu2D5IO7Z7wEBf5UmBIZcDasMREJOZJwO4q6BgVbISH/t/OMNi5OakrJ+QBr2XBobdZObw/hyxBfd4RA== X-Google-Smtp-Source: AGHT+IFcbvIFGqVk00pODHotcvRoVTkxk0M1vU8S1sHXpabVZruuR9KkHKZnUUp9OE7G2tt0bfSs X-Received: by 2002:a50:a6d7:0:b0:57a:1501:38c with SMTP id 4fb4d7f45d1cf-57a3644b93dmr6869695a12.26.1717496944990; Tue, 04 Jun 2024 03:29:04 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-57a31b80b91si4974043a12.63.2024.06.04.03.29.04; Tue, 04 Jun 2024 03:29:04 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@LIVE.DE header.s=selector1 header.b=Ob9DXhQs; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=live.de Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DB94268D709; Tue, 4 Jun 2024 13:28:33 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04olkn2047.outbound.protection.outlook.com [40.92.73.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5D76268D6FB for ; Tue, 4 Jun 2024 13:28:27 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FZzDXmcqsvBFcrMXcL26VP4HnyViRt4J0GwG7vI2avKOoAvr5NYZJuuGVgeJgz47/h36bwX2MVIH5OBaE3CD8g/JHUdJi7jQiM+f6mePAwYy0VVaEKNFWZ3bxdrn6Q13rxyJNe+NU3ZvldjoTPiFqLq4h4/KLih3AsHGZEFlVmpgojUH8RTKkgoVO7/twVdB6HWrtvwcxVM52Hw2jhLSPSirqsDipZOa6PEWnwNuliyOYaNFOL8aHgOO+Xl5TH6Yewai/Z/8GikllT29t3xs77K5Fc7PDTh/4OW8Q9L2hF3e+5Ut+vuH15DvOzBDJh1fVsAudSNUBWyB50JWArvY8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZqNH4Xhyu0NzDRCwqnNUXvgqHiMT21dFFyUcpWd5sHI=; b=R+hUMNlmGoTpzRBM360IWsMvr6h9RU8UnHKPza9RS62MP+AVkGcK5nOlUYIgtDgaqQDKavbJl9wYKOAnz7yGFV4biRyg4NcR+aHAhQzNXoGHXPaht90R1eHmbzlKaiSNeeM5giMTWHf/ziQX5nORsXAt0F4m/+avWfgSWnc/9mMF1FpZQKTrchBzjBhPpEViVLOmQbKud3aGBunYVIK8RrYnDE1NN4nDDxGLrtdJufiI4hVCESA8jzhK0UfSjw3WMOFAmNiRYh7fTJLwfxZL/DPRZrr6VUK817evCGcWqv6fTv2LmUH9vCWT5KPlCrrjwm2IFHu+ztYn9JZIXkSbxQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=LIVE.DE; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZqNH4Xhyu0NzDRCwqnNUXvgqHiMT21dFFyUcpWd5sHI=; b=Ob9DXhQszScsBKHPxYTxX9Ol02W/74VCVdBbPRu77QFKgiA3RRAb86/W6oty6xtNNT9xBmmVgUIYRGF+Af6+xchZo9AHDIc1Eo4je1wLlGIVwVHHPdBKfdej/qk5JSKa554hpKIPimRF5aplwzysp3ZAWbD5hMQFyKb5cw6P0l7hJn8rArhp+5X3oxT7PeuxjPbLBpc9N2ktruHoYnAEVbZwSLNV854lJyUqtA+vvIbEIarkNxUVN+KfRjHBaXOaxT8UlAdCdZwLvIyzxmVzjFtXov9ezRdCyBtUxGbrRnXH9caRPDbAmYfzqqVGXVKqw++jglyuO6fic5htwuOhag== Received: from DU0PR03MB9567.eurprd03.prod.outlook.com (2603:10a6:10:41f::20) by GV1PR03MB8638.eurprd03.prod.outlook.com (2603:10a6:150:96::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7656.15; Tue, 4 Jun 2024 10:28:16 +0000 Received: from DU0PR03MB9567.eurprd03.prod.outlook.com ([fe80::e356:c67a:e5bb:cc8a]) by DU0PR03MB9567.eurprd03.prod.outlook.com ([fe80::e356:c67a:e5bb:cc8a%3]) with mapi id 15.20.7611.016; Tue, 4 Jun 2024 10:28:16 +0000 Message-ID: Date: Tue, 4 Jun 2024 12:26:45 +0200 User-Agent: Mozilla Thunderbird To: FFmpeg development discussions and patches Content-Language: en-US, de-DE From: sfan5 X-TMN: [vy8nblYu2bQ5rByJDMRoW4oe8ijVR7tq3Mq2E1Gji74G5lAzgWXAOFOOxegLL3upDu+m1KINW+Q=] X-ClientProxiedBy: FR0P281CA0065.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:49::18) To DU0PR03MB9567.eurprd03.prod.outlook.com (2603:10a6:10:41f::20) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR03MB9567:EE_|GV1PR03MB8638:EE_ X-MS-Office365-Filtering-Correlation-Id: 87615752-ffba-4c35-7933-08dc84810b10 X-MS-Exchange-SLBlob-MailProps: VTa9p188PROa+hh+zXRdb8iH1LoS7wElU/ZtWBhrAssWaMESGgp+oYHehlfVaLjDPjOl4UIpcjWurt9piafOrgD522P4mKq02nWbsySK5X500ch04HaHiO/ZDpeBibAhyDZsAxtFGM1f56AqvzUbdxIDAP92z8V7GFF7UCG66ZAlMktgqUDsp+9jvTcpQLhbF0831wwz44ZDzdiKzpk2MPJgvzQPIPLEsH+r9nzACsWiRGWaqk6F/w1wQKnmtpFYU1Fj1RgK1o/dw8QqEEXeVauG2zwC1sbNs9hf+iSBfMAFUasMgvRLb9aRvIeDERwQ4LSKZ9m7ONe10R5Jc+sJQPkiP3Nea2sXg/RRPKJX198CpVsgWrdy/1ECLDIcK9KURP0h7GlhKP7dbo/w8zOn5epuB+rZOWlR/EH8TYi84c561+BlsSGsP0jtltmM8s5AiDHHVO/WH5iQOvT+aYuIATK4JoyFCjaubqOEe8jWSX/xRErBuwCvn6fL+0c/8Tasod9NxFM9TswoUYK2Ltl2JmJM/6GAz6GgfBi4uTA1zjMp7KBSSU714R9ODRHVMzenPVzQwZb4EeoGos0g9jkrQ1nPOCnlcjBf4+1RXCWEfMq9FAu+6yQ74UUe3Tri5wdY X-Microsoft-Antispam: BCL:0; ARA:14566002|6092099003|461199019|3412199016|440099019; X-Microsoft-Antispam-Message-Info: JcDbKcxtwiD5RrqVhT1Tmxxwj0xuAKTdC1RULLamGF3HNGddkrhjNOsaO8J6ruscv/1HpMec7MLm/lJD5iqQwM4bluro4oGcjxFATHsm5d27oXsYG83A7MalJPN4qkitA1s5r/HxnpBhPWc5Qlx7A4V+Vza0iBCQZSJqoBo1xqfCxCb2aiCB8O0EjvlaaVNltPGvBqZnp3yK76OPb4pzeuAP9Y/eiqk/Z7R5uhu67wSKIgzE8z7C7XaX4sl8lrCKvrrszaksh0UigWCbsrbLMT96ESCAv63VL82nkW/hU5B9bNlgEl1Ov6OG8qZxjXpU3iw7tHvvs/ksQqXPPdZPB2ZkQKwN+DCpmtqUmi8pXx4= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?lsyEqQ+r4r01SvWPI3ndUDEk0pDL?= =?utf-8?q?kfLtwnkd6NyectCbNYolfOpv6WqXex9rCIyIFx2UXXtDpm145KU37D0p5f1eu/1SG?= =?utf-8?q?cAMDM2t/XzVOJf6ty6jPpeqdKDFdTSdw+9oqXxXK9zvlyILhoDxU3cLykw/4pga6G?= =?utf-8?q?RY8H3iJ9lIi0mZcUveixkfq6QGixv7PYoQwMNMnWcPCvXPlQT5+61BxEj4sfWJi8G?= =?utf-8?q?uY+w0HisvvmRjWSFH+jfgOmdEPgAeFWVsqp6ovzHmn3/1BTcv19ITZnRd/m2k45L3?= =?utf-8?q?Gi74YD2lApHjuyzkRCjubxvk/sAG6fazVrroSLiAJfGaCPbjwfAx2HdEEnlHJOCJ5?= =?utf-8?q?N6BN56l9FzAimW6+3czQmzSEy4NxdVOReEf0mwnHCVwZVJI7NFR3nfalrh/8/WePd?= =?utf-8?q?2th4ZzSPf485uezEU4hDvYBJzKjFkXcg4wFIFHy6hFIlkDJxfLYi51zjZZhw1uA+p?= =?utf-8?q?8vlL7c6Zm0zdt+8XNJOGPWcWzvtinhBE84KVNbMoZLE5/bw3QVCRcVu2U8E027Wnr?= =?utf-8?q?Z7JvdyALej1cdpX8px8ixa5BFJaxzTyqYRYe3gM2RErqOPUSa7HsYgrPMvOkkFtRZ?= =?utf-8?q?fzJ/RjAOLGp1cKa2Cp/+wFkKYEwqjOQpPcszTwWdScbG1Jst5fYuhIzWXnsVSoiBw?= =?utf-8?q?IR3EthU2ZsJhcyy+5AOX7Qmvw02rTw6Y725SzZ7txfRJSsgNHeTynWdB0srfyLfgb?= =?utf-8?q?8IhLy8A8/M+rjZEXGd9919ZzECpJP3MQONj8hw+08jILEYs3UfBQTUYE5L4InttAf?= =?utf-8?q?icKTpSK7MGcsKOCOKaUUe0697oV1kpt2+K0HRicn5iC5ZpGQHGyBvRmAsZos1zxtG?= =?utf-8?q?YdqC4ULC59cPijSFgqmJebvnvrs7fydOcZyYO0+EwdXihMOwLf1lZv+1EPMF33173?= =?utf-8?q?ZjWy/56g71XxTfVxdenI5Hq/d9BYx2yRtMnfvDoHG2xeBzMX/aOVQb9SmTNiUfSCh?= =?utf-8?q?jP0bn1V0QMAzhNElxtYdLSzYfueDcJDYS2GnxZfHncpdPkRyeVcKEDHVpLVJ7G+Dp?= =?utf-8?q?jQNcRzds4H1ann+hwW/zwTqHAMZLhbLIPoUFjYwXKDztLbNb3RgOkfWx4BucRZoZ+?= =?utf-8?q?jw/Dsb/cYbLPISkfSh90v1eJyLYzfsI3V3kC9uk+NAjik537FLiVsEgcITSJ9fBOy?= =?utf-8?q?cC80agL/GMHWx/EKxfkB3HJO1Lho07lAdLGa5//7mtDCw6Rdql3MskFJTZThkUeOD?= =?utf-8?q?l0Mbsuvn/qxDicOAiDldJX2bMGndIvfUsxIuigiydW2PQRoL9ShEvIVH2q+0=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-76d7b.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 87615752-ffba-4c35-7933-08dc84810b10 X-MS-Exchange-CrossTenant-AuthSource: DU0PR03MB9567.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2024 10:28:15.3179 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR03MB8638 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [FFmpeg-devel] [PATCH v3 3/6] lavf/tls_mbedtls: hook up debug message callback 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: oKugCP1jDl65 From 9e5993cf104cdc1b7c4eabe173f9ab3e8f0cfeca Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 13 May 2024 20:26:16 +0200 Subject: [PATCH v3 3/6] lavf/tls_mbedtls: hook up debug message callback Unfortunately this won't work out-of-the-box because mbedTLS only provides a global (not per-context) debug toggle. Signed-off-by: sfan5 --- libavformat/tls_mbedtls.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/libavformat/tls_mbedtls.c b/libavformat/tls_mbedtls.c index 0d14e9f814..ba94ab3a70 100644 --- a/libavformat/tls_mbedtls.c +++ b/libavformat/tls_mbedtls.c @@ -26,6 +26,7 @@ #include #include #include +#include #ifdef MBEDTLS_PSA_CRYPTO_C #include #endif @@ -36,6 +37,7 @@ #include "tls.h" #include "libavutil/mem.h" #include "libavutil/parseutils.h" +#include "libavutil/avstring.h" typedef struct TLSContext { const AVClass *class; @@ -112,6 +114,13 @@ static int mbedtls_recv(void *ctx, unsigned char *buf, size_t len) return handle_transport_error(h, "ffurl_read", MBEDTLS_ERR_SSL_WANT_READ, ret); } +static void mbedtls_debug(void *ctx, int lvl, const char *file, int line, const char *msg) +{ + URLContext *h = (URLContext*) ctx; + int av_lvl = lvl >= 4 ? AV_LOG_TRACE : AV_LOG_DEBUG; + av_log(h, av_lvl, "%s:%d: %s", av_basename(file), line, msg); +} + static void handle_pk_parse_error(URLContext *h, int ret) { switch (ret) { @@ -204,6 +213,14 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op mbedtls_x509_crt_init(&tls_ctx->ca_cert); mbedtls_pk_init(&tls_ctx->priv_key); + if (av_log_get_level() >= AV_LOG_DEBUG) { + mbedtls_ssl_conf_dbg(&tls_ctx->ssl_config, mbedtls_debug, shr->tcp); + /* + * Note: we can't call mbedtls_debug_set_threshold() here because + * it's global state. The user is thus expected to manage this. + */ + } + // load trusted CA if (shr->ca_file) { if ((ret = mbedtls_x509_crt_parse_file(&tls_ctx->ca_cert, shr->ca_file)) != 0) { -- 2.45.2 From patchwork Tue Jun 4 10:27:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sfan5 X-Patchwork-Id: 49536 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9183:0:b0:460:55fa:d5ed with SMTP id s3csp2586622vqg; Tue, 4 Jun 2024 03:29:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXmenzQabUGZ5NMXRLQREl/CPyWzyzuQ9MIBR+63Jo9ZRA0opTtm9yPDN5pTdGM2sn4gCdl7JIsIyNa58e5OCy0MWwa2mbur9TzTg== X-Google-Smtp-Source: AGHT+IE31WIbhqWQ5B9TExyJpm3hhkEG2X1MF+aziZem3QfEI3K8a8iVG9yRtHJrRW/b2yhpeST7 X-Received: by 2002:a50:8d5a:0:b0:57a:86d7:b5d0 with SMTP id 4fb4d7f45d1cf-57a86d7b750mr443500a12.2.1717496955053; Tue, 04 Jun 2024 03:29:15 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-57a31ca5e53si5132894a12.553.2024.06.04.03.29.14; Tue, 04 Jun 2024 03:29:15 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@LIVE.DE header.s=selector1 header.b=scJQaEKZ; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=live.de Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 37EFF68D70C; Tue, 4 Jun 2024 13:28:35 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04olkn2047.outbound.protection.outlook.com [40.92.73.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A601568D6FB for ; Tue, 4 Jun 2024 13:28:32 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V9su76UWvAf9r5wwf970rNAUcEgGaP2he8qsHM2KH7M4S2eDXVahiHAwWqa3qW81CFXYvqfiMi+gkfvw/m+V5V4KMeQ3TUJzkGlwakrbLN59QWFPB23zZGnAu942ONpAaRT8depHov0qGxSL8GXqsR+khdGImg95H8nkDo0dSb1Ru5mgM6GdZsgpo/E1B91cQuEkDXUx33QIHpu09tUjUMlxVgGkw9o1lV88xz7YGDhToIp1W1g9SniTd3/bvLAOayl0wxICYtqqbcVvRpQ96KXG385xduswq8l3MyAzg0FfcJ9fpgKPtx0quyGDljclTtKnQCz6uWUppZLYFXpbGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=v1EtrDGQw3c7o/J+rQwcppo5yX5XnM49whW13oNWluQ=; b=cdNwA7/j7ukEOd60T0+41Vztxr/Oy/fAwWrGuATU2VIg2DCqbaLlay4hMT/ok4T03EGEgSePLLgM4NwlBmPDfuvopDGY79c+RCiCtKAwkvwfyAbdaxJfCx5C9eKGSEGkU3VPlS130B56q8wXhCv1U8E4QpE9yaepbiIW3LDrrHl+Um9oqMSAr1vJp0f+eFZGOd/iPrRUZLGLEWYW14kMFD7q+56r9qgJtkEjMSBxVwCPy5Zb6OsvXCjvJrC/ops/MoHT9XOvLHhzIsvvhkmeqyZ3/NG7MH2g4XBuZu/xqkhQACpGXH5OFZUmRRmBNQHeXo+ypyODwSffOrCPubTdxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=LIVE.DE; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v1EtrDGQw3c7o/J+rQwcppo5yX5XnM49whW13oNWluQ=; b=scJQaEKZf2m2SXMZQLR0vpXLOKB4qDhENMTN84HuLrgzjxBlnr4FgCPyJ+zh5UOUjtU3+HSaduGN3Os/A/aABuefftMdGUTya6WnDdtlRZ65YkDclT+7j5YbUQ+gAnj9gOFSOtweh9FpphZb9p/9efrkZnyXY5m+EdyaVf3UWlkBzXlhpH6oHo5UeIN+Kms8l+Pedh12CbpdqlbkKxggaoEkiYRhWHanPxhOjPPQaCyGjq3kKIXoSTmhTHx7FbVUhqdbWy8ftGe+3GnnmzaPo/fyRXgE5elaIZrGrutNwXOvhDjxoiAt4HeEM0l6r8SplWRu6Du+TOimyZMA2685jw== Received: from DU0PR03MB9567.eurprd03.prod.outlook.com (2603:10a6:10:41f::20) by GV1PR03MB8638.eurprd03.prod.outlook.com (2603:10a6:150:96::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7656.15; Tue, 4 Jun 2024 10:28:16 +0000 Received: from DU0PR03MB9567.eurprd03.prod.outlook.com ([fe80::e356:c67a:e5bb:cc8a]) by DU0PR03MB9567.eurprd03.prod.outlook.com ([fe80::e356:c67a:e5bb:cc8a%3]) with mapi id 15.20.7611.016; Tue, 4 Jun 2024 10:28:16 +0000 Message-ID: Date: Tue, 4 Jun 2024 12:27:14 +0200 User-Agent: Mozilla Thunderbird To: FFmpeg development discussions and patches Content-Language: en-US, de-DE From: sfan5 X-TMN: [L6waT5LCid2yxUIgugKhP59u+sekWBb2k4w/6Pk3k5wO7Jl+M8kJcpNt9iB438C7nMIqP4ivdY0=] X-ClientProxiedBy: FR0P281CA0065.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:49::18) To DU0PR03MB9567.eurprd03.prod.outlook.com (2603:10a6:10:41f::20) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR03MB9567:EE_|GV1PR03MB8638:EE_ X-MS-Office365-Filtering-Correlation-Id: 1a57e82e-7eba-4339-2f9b-08dc84810b52 X-MS-Exchange-SLBlob-MailProps: /V4+jUvCnwaTprABFM3XnMWM5POR5rkXGL8MOrAhilAXKRb+QKeapqq5aoX0N8LxckbIuEv8gsxatipJkmfVuIIYbIU2n8b/RcKR8smPp0Gup6k58i/FXQ1JfpS1FegUQWTFgKA9yi/lc6pzCvBV+F88bUs4Naq/92kbbVsxvrMa+c0WRMWWImzCStPxUjh1oX0BipypwYY9Psdm6HkWH3Q2RtjhWKW+w4gQaOdaUztawbpPMEXcd+ZT927jeXZ5cn9QgrzGlZqe8Tg2XMkQ3TowlW1SV703A1u3JTjII/0iiaVnegmHK9jkOyujR8lue87+xjwrA4aWHRKJ9slyslABWOaL1x7ytSM8ea+F30eFKyo7M+2zm+O78dFlhdzb9T96uJRWOSGXIm/s5cJ2Xt2pqj22sVpQjXw4ZyU893ZUHPAuqlkxDc3TpO73sm7Lu1AYIFMbgV5CnjcgHLH1/tcHW3qJGkUQgjAQ9VawBtHT/H064Z3rx1/ZVl/Ds+7JJxeEGV/eMxgsnBVK7YqSXvHS0SrEFVk3e1TFnr/LDvwVRTufjJOkqxCR3vkabntBnFYTwJJKfJV70x8y/uSkseZbE/U+d7y24/c02PuUv+4= X-Microsoft-Antispam: BCL:0; ARA:14566002|6092099003|461199019|3412199016|440099019; X-Microsoft-Antispam-Message-Info: BD7FJONUHnmbTCC2qw2f0tGls/1nqEgV5yPnphgLzx0YMf3Pm58EAYQRYT7QZFuAYSApUXU/7VQmMkI7t1sHDMr8S4LUs6bfl9/NlST3Yeznq58YpibiuFx47dBJOAbmO5ikkZw6Fip3ec/yNrArmNqBqWqPysLsv+Mov38wB6QG6G2rSXkeXzHTHhyJzCvqTfoQZ51bmxFfx1rd9CDxQP5e4EJ9DUWukhKLqHXOrEv8mIZhxMYw1BzBPZG8Emz+qeRU+5DK6z55xOkAnB+z7iX3O/m7JWCsOJtTusGALnU3qGurA4MQHc/mHFWGVTzNw2LWGwc0THO9pHzI1CXGjZiyTzByoG7RfqEaombSu3I= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?urWRuPLlYdajNfGo8BX0MBMFMEA7?= =?utf-8?q?U+ViyhP85+VGRJzVgGavltn2yz4y4CkWkl9OXiaGaeHP3ZnzDH0DoxM7S7XzJZ3eC?= =?utf-8?q?G/WTFBswk5gChVkbde9A3zw9zk7mVjCKWYg8m3IwE22iTRIc+9IrJGRN0SZiOG6RY?= =?utf-8?q?oSnZZZNFxbUS6Kq5fU239sb/ufKouSP1Wb5vGO4S6qLognNwAjnAG68JVt13PpZne?= =?utf-8?q?pcSSratfOa2UDEJnk2kCyxwoz7oAMARxezFLknvcxAJHL8QBGHwa1EK/RvjVbgIp9?= =?utf-8?q?Cf97zGxlGo+sQgZq1DgSl7S8no9WCuVR5lJmTp7Xa8C0pqT//NniytsIg5FDnZRGo?= =?utf-8?q?fCRoRBQuAaBaW1M9KNtl7aRP+C7yBbWdsm26jrX6I+nA0YWY5sdrE46Do05MVKwKv?= =?utf-8?q?tF8EyBdsBQmS5KaJiotjy4e0FxzZCHYauKfEVNJVJAX8XxTksxh67e6vvbu7+TSh+?= =?utf-8?q?W/wK7jJY9PktNh728wMHwRPjDXOq1U/QTICJP2UKgrHBjrtmn+RI7S9y0C55GbdOk?= =?utf-8?q?ofSOUZpVqYA7NFRSffT6vlfiwErHn3oKFv/s0PRYiXl2VfrkXidBpvxiT/RWL+M37?= =?utf-8?q?PXX+Sl5MzaJOd3dNaMXJLdM99St/9NNWJolzy1WaZ90Oj3NMlngwxZmDFkcoocoaF?= =?utf-8?q?cZBvfqnMp5Kq1WX9f1915NF2fbdtZ00TERpp7TTxCZ4SljwhKkhQwH/oP1pXnJOaP?= =?utf-8?q?ZO+nQUECFkSPGI8La+IpdJPJ6aiXt/kV6i67SD0brxmlOxLGJia9T8Rwj/ShhLYDv?= =?utf-8?q?TZ16lAUsNIUUoW8TiSIwjsJiFnoOfme1GNBDPAMqMhfqxW+xf2KtfbZy1JcD6nWRE?= =?utf-8?q?IoEwKwH0OlOrNWmRmT3tjQhSWJX41Ig4rLLwey62TL3k8HZzgX0opoDBS/nRZtChT?= =?utf-8?q?CrS6ywQRuyoI+lkJajap08KlNwcb45jNC1bPl/W6uo2qwQkGM94htiNRBJ/j0v5md?= =?utf-8?q?XC6xcmynH5Urbnrx2iOjnkfvkMyDyl77pspAAdZ2b0Q+4zjMRArK6Le0G1lXJ1EjZ?= =?utf-8?q?kBg5y/+VFl9FtZ+aQrHE6IM2idhWPeReJRPoU8Ro27gZLu72AiXcPtSZyuC3RLl1P?= =?utf-8?q?surPXhflhQiuqKOocIbB4BmGTrwMNmIE+p3DRUMJEqFOcgi+SKBwyeY03Q8hCslC7?= =?utf-8?q?VmqzGe1PIGgFySPDTtghOeqFfIaOc052fnrqAPpVRDpVbDeBN6raEpEJrWmcuvQv1?= =?utf-8?q?kVvktKJigQDuHeehECCISptpstTxXli48lt38+zKTT9UIzsv9D5dusRMZl44=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-76d7b.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 1a57e82e-7eba-4339-2f9b-08dc84810b52 X-MS-Exchange-CrossTenant-AuthSource: DU0PR03MB9567.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2024 10:28:15.7399 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR03MB8638 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [FFmpeg-devel] [PATCH v3 4/6] lavf/tls_mbedtls: fix handling of certification 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: LDDGFvujgo/5 From 2cfdd92e8b323a41b65e3d6be2fc9c7641bb26c0 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 13 May 2024 20:27:17 +0200 Subject: [PATCH v3 4/6] lavf/tls_mbedtls: fix handling of certification validation failures We manually check the verification status after the handshake has completed using mbedtls_ssl_get_verify_result(). However with VERIFY_REQUIRED mbedtls_ssl_handshake() already returns an error, so this code is never reached. Fix that by using VERIFY_OPTIONAL, which performs the verification but does not abort the handshake. Signed-off-by: sfan5 --- libavformat/tls_mbedtls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/tls_mbedtls.c b/libavformat/tls_mbedtls.c index ba94ab3a70..f65f2f4020 100644 --- a/libavformat/tls_mbedtls.c +++ b/libavformat/tls_mbedtls.c @@ -269,8 +269,9 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op goto fail; } + // not VERIFY_REQUIRED because we manually check after handshake mbedtls_ssl_conf_authmode(&tls_ctx->ssl_config, - shr->verify ? MBEDTLS_SSL_VERIFY_REQUIRED : MBEDTLS_SSL_VERIFY_NONE); + shr->verify ? MBEDTLS_SSL_VERIFY_OPTIONAL : MBEDTLS_SSL_VERIFY_NONE); mbedtls_ssl_conf_rng(&tls_ctx->ssl_config, mbedtls_ctr_drbg_random, &tls_ctx->ctr_drbg_context); mbedtls_ssl_conf_ca_chain(&tls_ctx->ssl_config, &tls_ctx->ca_cert, NULL); -- 2.45.2 From patchwork Tue Jun 4 10:27:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sfan5 X-Patchwork-Id: 49532 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9183:0:b0:460:55fa:d5ed with SMTP id s3csp2586313vqg; Tue, 4 Jun 2024 03:28:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUgZ0PNXqWsKPD5//UqSRBAq0UIBle90yzzI1Gmp1+2Rd1HFrojmglIlcBlXYCLRu8Ot1CFw7GQIrtJdHcIclTIvBXwZidSNuhAQg== X-Google-Smtp-Source: AGHT+IErgv1LxAfCR5ZPCL3KGokVcFTwVV/hKIUI8Bh102HTxLPR8NgKRp7PgBjVpswLLxqlIi4z X-Received: by 2002:a50:a414:0:b0:579:7b6c:5ab3 with SMTP id 4fb4d7f45d1cf-57a364e3615mr9980094a12.22.1717496916919; Tue, 04 Jun 2024 03:28:36 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-57a838775e8si442704a12.31.2024.06.04.03.28.36; Tue, 04 Jun 2024 03:28:36 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@LIVE.DE header.s=selector1 header.b=BiRbmq7k; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=live.de Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4CC7168D6F3; Tue, 4 Jun 2024 13:28:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2081.outbound.protection.outlook.com [40.92.90.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DD9DD68D6C8 for ; Tue, 4 Jun 2024 13:28:18 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IHGEqSq7EIYe2izXWnEZoVbvBk+6eLaC4FunUgXimMhH+KMOp38vw9hCbG+/VEXX3p+Aim0FczRLoUT+78EWmLYu5FsSGB4zSYcRI6eNVbWCgDpWl/B5a6ADHNgzvAU7DkgeCmTHIZ/eyVOyPCvDMB+89MALZ16M8XE+y4WtPLmJlqMwS3HL3Fil+CwyV9HD3Em+wyM5Lr+kK2GuofTFAdZgDkVanZeSRcQJJlfKBKNfGDG9253g7dTOM2HgXk/v5HebdODRhVhdPUx3RDyCIIELkNMFt62nc72eUeTcEYUX9tm5EzJSrC3IW0z7TLCMkzkqYgchC9ghtzqTqwmVmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5DnrnUOWvRoQkl2RDqIzyLVR7EhHgW9r2PAX8MrHkjg=; b=gNYgi4NbHD/mUSjYWDdumtYbfOVM+StxON7FAyTekFzsDNUdqcL56Ac+iiJz6ephq7sU0/YchEdmI3Z0iqYZWY2o67kMvv00DGi7FZZ+8gY2tJHmkDi0tkckBJ8ft6pyFZbULuWlFR8SaqzctNH90e9c0zRct0cYP734v+62Z9hJXqPVOjbBrmxnABVyguEmBfolMtG4sWXdwmWjQqj1eFp2Ht8V82D+eGgnC4mkbLwtQ0Ijl7WCuosnfVGuZTpDaYeru2RzIVY1nsyCrEUWPKMmk+b2ejDXuhJ2U4oOnT9+K2QiQ0jJIwTZcorJJuN4/gLG7cutygi/FYufD49D7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=LIVE.DE; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5DnrnUOWvRoQkl2RDqIzyLVR7EhHgW9r2PAX8MrHkjg=; b=BiRbmq7kD/YGkcUuDSZ2SekvTYAH/soU0u1t/QrZ3+j6J8Z3M0iv10yA147UkM/vLeg2QCGZE5ZnQ7NUrR/AqiY+tl9Oei6bZ1zIWPT4hUySkKszCIhCEvKivPM3zH0apMivgLmKJu8EPJuddBJeHv43fkE37DtwgzQzKBqg962mnU9oUKkN2HYH6fu6hSbd4XUCocvuz7pNsSVRvm0vhCGw0wN/Hz7cZzl0ecJJFjym82hZtVVn26+CCCCjceXB2jN+LZBRkoQuADaOdTIS8xTFmjZKZ3O21fJ9Wi+NXw5pduJyTgCxB5blvKoyEWMbAb0t2kTVTrIH+gQYxt+N0g== Received: from DU0PR03MB9567.eurprd03.prod.outlook.com (2603:10a6:10:41f::20) by AS8PR03MB9746.eurprd03.prod.outlook.com (2603:10a6:20b:61d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.29; Tue, 4 Jun 2024 10:28:17 +0000 Received: from DU0PR03MB9567.eurprd03.prod.outlook.com ([fe80::e356:c67a:e5bb:cc8a]) by DU0PR03MB9567.eurprd03.prod.outlook.com ([fe80::e356:c67a:e5bb:cc8a%3]) with mapi id 15.20.7611.016; Tue, 4 Jun 2024 10:28:17 +0000 Message-ID: Date: Tue, 4 Jun 2024 12:27:33 +0200 User-Agent: Mozilla Thunderbird To: FFmpeg development discussions and patches Content-Language: en-US, de-DE From: sfan5 X-TMN: [mrFmHgN4ZtFXJMV1AoqdYRD407NbCv/na/fI1E0VC2h6UN3jYbIn0NPiz4kwTXb2BWKQjEWBO5M=] X-ClientProxiedBy: FR0P281CA0065.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:49::18) To DU0PR03MB9567.eurprd03.prod.outlook.com (2603:10a6:10:41f::20) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR03MB9567:EE_|AS8PR03MB9746:EE_ X-MS-Office365-Filtering-Correlation-Id: b072015e-f821-4490-d43c-08dc84810b93 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|6092099003|440099019|3412199016; X-Microsoft-Antispam-Message-Info: asJW30EApvN8zbt8pWFF1XMLtPBSIQoIy47H7WH9FZGfRrFmeM1y4kxfNOjcV1zbcLNnoqnSYrmybawG/7kaKdaTOXDT8RSRBFrFD0vFHQ0ZmZgS3hT7JmsRZcuxVIfe+q8jjPiEgDg4Yhf2VxulX8MFmfLp+6a8pdgpIoAW1sh7qZdImNsgoA3vgJlHJZQM3nZwVmuQppGXUV0q/YhdI39Yw63yT48MB7129jVh0tv6zxzTxRcw+iNhJvEs//RZgPnS/JAYf3nn7NAQMTIUUCvtO43dSb2Xn+z+hcgBhCo5+wOeWuDBZAR/Jw+pZiGGOxHUTX6DbmtZzi6EhWU6D0TzPh0uIvx8g6mNZTrezDQ= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?pTOdnURdKYsFrX7eoJSI1m4kZkqr?= =?utf-8?q?JAKBL20YcMmxPeOjOyaL6alTNLmDo7tE6sv4DO4WwDH0pHF0iXjWM3XEcnto8oJoJ?= =?utf-8?q?WEkiSmMV8YteqGDKskWtg+EUwD61huFZM0JtR62c/ywufBEVDVixi6EqKYjuuU9Zg?= =?utf-8?q?SBWyq0YxYp/eGhpm9+2TnV92TlfgfFK8EVn9dStqWKIob9jQF+0TIv4SDjckFI7Ud?= =?utf-8?q?hiS8B8IQo+WM1KKZQHIzn8yMnOdPV5a+Pj2org5cthspIUDxPfW7LjUkD8pu48hjB?= =?utf-8?q?/M/fnnZVQFJILmKGdriGpD8FITaDlj78ud+0Eo3imagKkk5f7tZijW8/HzBxZLW9Y?= =?utf-8?q?RJqtsjR3AD4ycjwZrF5tsshRrmGyEN6kqKPs+d6Lf9BcA1dZz1tdMAvQYGq/xvZYH?= =?utf-8?q?/CfqP4g1jh+Ba84ZgrdtQU5gTYRLmRXSwMTYSo99TC97UYZrwoA1V9aEOWTzgQxrr?= =?utf-8?q?3sXSBpKV2M+RonpPBqZZPeIZLOmU+4N1yViDpXfwz7b0jP1M12rV28aZPFfA6Bxid?= =?utf-8?q?vlr5by26GeDCREbtjdQ4l64EV74tHFklJFzxnGDMeNVAfKiLEYqRa9zJntZcum/Kk?= =?utf-8?q?gYYEgLuZHpVkZGCuawwqGUSxv3VgGrxYPBizVFgko7dWLmJ3T7qynjO7cc9TyWRFC?= =?utf-8?q?vcioIZvaOj8om3LopB6Fh9oJNtIOxPe5gZ8zgGDGczfMM4XKuyQL0nvZoWw6sIQlZ?= =?utf-8?q?2NHyBzuU5wqzOfbGs/wfSzL4QluHtmQx7wJYtzwvAwOJlEpHiSlJ1xPfvGmtZbxMS?= =?utf-8?q?aigrK36j/Lrh0MQmmP3rttUh62vQUOPFoWpa/KptcMbvXusucF1lLfq0X3dHnh9p3?= =?utf-8?q?QeB/X6DYiHZB5MQ2DYfKQo3jvAwF9eMJWn9hGMtoyTBECUvg9L/fNp2jqHW+kpQv2?= =?utf-8?q?71tSf7iV/WP89UNj7+zApJLTqbUN/CRLkGPyPI6TPyVgYkEvTdCi0J/wJdULdcWWE?= =?utf-8?q?nt7xUG8q4YLLfkL7jixOeLFe7qBKXnX4/OKBosGLTsDjrE3PyrpgzLg/pHA73MOhM?= =?utf-8?q?e1WKv5Y2BVQ8jt+kILAVovkA/OhL0KPqGmnIh5QP51CEtDIfH/jqsTL/x5sgCJ45F?= =?utf-8?q?G1Xuwjs4OxZq4VXrjTyQj0dMTktl3wvFaNWkCVRLTCEncJRH9TeMF3drjplFWw5dO?= =?utf-8?q?5Q5DLXH0hgCNfUT3ubqIRgH8Q+OcbqhvLZF0y0r+fh+fSqsakq3fOeKnIIW+lQkjL?= =?utf-8?q?XAlzJ183dkNkRyabTOtWDC3FB3PCzQ7BmZq9eukgJhGuvHgyVA8VBCX5ryRw=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-76d7b.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: b072015e-f821-4490-d43c-08dc84810b93 X-MS-Exchange-CrossTenant-AuthSource: DU0PR03MB9567.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2024 10:28:16.1842 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB9746 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [FFmpeg-devel] [PATCH v3 5/6] lavf/tls_mbedtls: handle session ticket error code as 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: XTggxI/5gLm6 From c8d7f937f5d8f1cf001aec510d4f6f28c5d9fc59 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 13 May 2024 20:29:10 +0200 Subject: [PATCH v3 5/6] lavf/tls_mbedtls: handle session ticket error code as no-op When TLSv1.3 and session tickets are enabled mbedtls_ssl_read() will return an error code to inform about a received session ticket. This can simply be handled like EAGAIN instead of errornously aborting the connection. ref: https://github.com/Mbed-TLS/mbedtls/issues/8749 Signed-off-by: sfan5 --- libavformat/tls_mbedtls.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/tls_mbedtls.c b/libavformat/tls_mbedtls.c index f65f2f4020..91e93fb862 100644 --- a/libavformat/tls_mbedtls.c +++ b/libavformat/tls_mbedtls.c @@ -328,6 +328,9 @@ static int handle_tls_error(URLContext *h, const char* func_name, int ret) switch (ret) { case MBEDTLS_ERR_SSL_WANT_READ: case MBEDTLS_ERR_SSL_WANT_WRITE: +#ifdef MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET + case MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET: +#endif return AVERROR(EAGAIN); case MBEDTLS_ERR_NET_SEND_FAILED: case MBEDTLS_ERR_NET_RECV_FAILED: -- 2.45.2 From patchwork Tue Jun 4 10:27:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sfan5 X-Patchwork-Id: 49534 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9183:0:b0:460:55fa:d5ed with SMTP id s3csp2586449vqg; Tue, 4 Jun 2024 03:28:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWjwZF9OLIkXT1ikNZF8buruq20PY6JiRyh94Iui3yY6hzWEtng3nBA6MaFWmvCfT3rJQ2M7QDyxXGN2HMvcppoOlvkFo9ZG1ZdAg== X-Google-Smtp-Source: AGHT+IEHurPtlhSU0ZMO7AygZWEJbwnYhD3b9LaPRT+Z0HAoK/ZNNz+M2IphCaC1aAuJ7Mem+VhR X-Received: by 2002:a50:d4c2:0:b0:57a:31eb:83de with SMTP id 4fb4d7f45d1cf-57a3636e8e9mr7996393a12.11.1717496934963; Tue, 04 Jun 2024 03:28:54 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-57a7664eb33si1035310a12.372.2024.06.04.03.28.54; Tue, 04 Jun 2024 03:28:54 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@LIVE.DE header.s=selector1 header.b="ovE1/eHW"; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=live.de Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 851B968D700; Tue, 4 Jun 2024 13:28:30 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2081.outbound.protection.outlook.com [40.92.90.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0443A68D6F0 for ; Tue, 4 Jun 2024 13:28:24 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kBmRoJ9wQKY7OqpUqaTWeOujJ53+Sh6YOEqJYTE3n8hWIYzG/892vBf6T+Pnv+nINR47K3kgtaF6M8Qms7JzR+7e3FKz3S4HCVguDLFmzPp/qGArsciZ1oSrbS3OVMQqIXobUhzO1JbctoLwNg2mWo11M5uA/s0LzdvT42EOD/sdvCmC4HZ23RX3bHjHXsEUc92iOhck41OFKRmuzq9c94l+E8TfTfauupndl0HGS5nc8ClqGvaDdqB3gfk6zj29GZLq1aCnkzfbL0Nz7gkt/RlhMWeqwkHG58zzoW2N3z/dPAPuMd5Pv9z5lURKIqcRY5q8KFHc1/CWiG6VYmxN6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tlc6QaoEUKxbis37gNnzxOVzpU6WdCxZfuV5+pxpe4E=; b=c/CcyPtAO9xCuJRdso8Qir2tnCmDVvtftPYnoZrKCXP+EilOT+lV+/MUsL6+3k0RDbTpkMxX0aZnp6yI8bEgpiEltO6Azq7DwoQmwYW62FBarS1RK2Om4/4qhanu9Kxo1Ukh7H5RF6SxhGtEfoX5L1/vPZqNq2e373zHiF359BhcdD8BNJe0zQDc0JLGbVuGUxd38C1T3Tei9Im5jesCBRTBeg/tH+0+NEUh+h0BWE/iUXnmAOFx6aU6TCg+I58j4+xlU42JpjtQgFTSRu+/XnqmZnSW2qPozw9fMBQfXze6o425on8G6jqxPhcOHWnmsb34Rkv/IskWWOhHXA5OtA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=LIVE.DE; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tlc6QaoEUKxbis37gNnzxOVzpU6WdCxZfuV5+pxpe4E=; b=ovE1/eHWgP+QCLnyCFiXVxoFMVWelzWlO61KE1lgw9sNS9OmAUZ/EVZnWZ4QQn3+AGEn2vD+0BxEt2lHEvZ5EdS0jZBTalWrU8x1Y/Qm3Z9grF5R4KowZmptC0YFrTuvi2n/Lt5T5VUrht/bRF9kI3sBbBRX1poeIjJ2YaKH4DmDl3Qq2IM9ReGvKu0xHvb5mViY5C52SA6VpISLkFgmYAHh//+8i7VPmtHL0q9ihJ4ArtcqB6BgNbjpb8J3fh0/4c3ArRpKLuCqtcuZwNnnNx7GJLhb1e2IHWJdctJTz3H4NQncRtHlaKU6f2NwXuWoaLHvhscw2ctLBl20Xedd7w== Received: from DU0PR03MB9567.eurprd03.prod.outlook.com (2603:10a6:10:41f::20) by AS8PR03MB9746.eurprd03.prod.outlook.com (2603:10a6:20b:61d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.29; Tue, 4 Jun 2024 10:28:17 +0000 Received: from DU0PR03MB9567.eurprd03.prod.outlook.com ([fe80::e356:c67a:e5bb:cc8a]) by DU0PR03MB9567.eurprd03.prod.outlook.com ([fe80::e356:c67a:e5bb:cc8a%3]) with mapi id 15.20.7611.016; Tue, 4 Jun 2024 10:28:17 +0000 Message-ID: Date: Tue, 4 Jun 2024 12:27:59 +0200 User-Agent: Mozilla Thunderbird To: FFmpeg development discussions and patches Content-Language: en-US, de-DE From: sfan5 X-TMN: [VIh0c4tYnVIv/3HobvaUOH1kOZSeCrYfa+/ZFHHnTfa39oPQYXT/6IbNOuuGJuJa7QtRHKU0qKo=] X-ClientProxiedBy: FR0P281CA0065.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:49::18) To DU0PR03MB9567.eurprd03.prod.outlook.com (2603:10a6:10:41f::20) X-Microsoft-Original-Message-ID: <0f1a32b2-6d13-4f87-8f0f-c690ec8e0f4d@live.de> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR03MB9567:EE_|AS8PR03MB9746:EE_ X-MS-Office365-Filtering-Correlation-Id: d3bf584a-576a-47a2-30cb-08dc84810bd7 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|6092099003|440099019|3412199016; X-Microsoft-Antispam-Message-Info: LIO2pxIZyAG/UJdoGQItJ5adIcdTm2lIcEs2j7E2fpdOQTYpYdTMezvOITJoRL3lBuTvjH1nauKRTQnDjgNzSjnknQbLCnmPdCNn8C3T783WITs7gklP7WPdGb81VYSVkimojDpWiJZEeqIGStx1z4Q18XVFErwyxkBxfgja74G7f1SnzKEBuBhl80IG0JTs7vzNXlFL3Oh4VvEriv+rNM01U2OrRvLUeokfYb/SX9+mQHx9L6ucLcSTM+I/rCI2+KQAR4OeaKEV9gL/PBemUEc24/fWDOW/lkKMLLLYv5Ys8lnkTD5avvrXg02ZEzy0n6WKHFXW3UD6zqUw+MZimpKDbQ3aOmFmFHA1jwtOqDU= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?kRS2KjmyxIxAd07IXg+6diYi423a?= =?utf-8?q?WES8O0Z/IuU4HWAgY/E5px1loYROKYJUda68n5zOeXVlZI4J/bPpvpb+dUWbkwimo?= =?utf-8?q?S9vnCRgKaVOE2dbIf5tQlbRbPgnUG+0C31dY+NETgjxi3Ln0U09LYvvIBqI3ShdrN?= =?utf-8?q?VnoyozPIJx/PhcThhrwuzQgY1Ell6wc/romUattlsj0K11lhzSSbZPR8+ZNedww2m?= =?utf-8?q?lMZb1B8+/pOSuDU+R1JOHKMHvz9uVmWLT3as0s//1Xt9QiTCfJyVI5qFBPqYPhGIk?= =?utf-8?q?l0+zgdisjHy/meAaVjoychFhLU2YLR94ucq80pTJjPSG10YsmI6wY4oKrvveyn6gB?= =?utf-8?q?dCeiaTbJUW2eRvlXdIcH7QfroicqXxmOFhkM0xVJV5BvVqHph2MET7lrXgVR7TxMx?= =?utf-8?q?CdZ3eEh6Z3RYG/rpVjCRRl7wfqEg/MjxK4itE/tMeY7eTr1pZmrgBIXDHvT+aqJDs?= =?utf-8?q?9o9EE+xTuYvVUyGF7s8P5MmXzzMLGn2t8WcSraW0DKirR3WswlOFlDI4KynAp7Eeb?= =?utf-8?q?XDpuUct+6HustxzCIFrNPNcOcioX4+BEUGzec+8HmM8z5uhN/8d4usvt/o/CZpkUF?= =?utf-8?q?6X1A90yPGsuLve75MmO8v29g6wTmdl26PAo1OiiByd6qLqd7ZR07DwPbjv/gav3UC?= =?utf-8?q?tXzRh68vTL5LBYYz3jzNfvFgmz+K2crUKuJak9AS2lGdalKcepRBM2nwjGZalhVWy?= =?utf-8?q?RQHn7WMWSo12YbyfgQonwLR2fnKKYEtbiY1bBEK5lC8VkIuI4iOYhwZ2Emxy/WMoN?= =?utf-8?q?n6W100jGtgsHwOSyTAAm2Lmp5pIzYxfNZ49ASgJmBat+IRPlczzF73gMbA/rYocRm?= =?utf-8?q?c93ec0GAL4UuDFxGCizW/9PRlPk8RThJinRClg766htVMTYLqJWRP7sJG3ChXsnvl?= =?utf-8?q?sM2VZqCC4TnW4uPWz/1YxUyp0I8Quv5lPg13YVCV6Qwe4VzVRn2GTAc/AaZ0weji/?= =?utf-8?q?HlsW1nAXIM5K/QCG7oBbYgFOA+v7Rn6LiMIcVZXi3LaCvboOhmgvFgh83JpvxyhZw?= =?utf-8?q?FGytU6LYuUXJRWZrpINq5oUXk9ub0DPIBNJ4hDQ4lU91UYSaXpI+2Z13EVPYSgucb?= =?utf-8?q?/GNtVNRZOuEg3EVJV5Vj4g6jTMv+d6WXQq3LBwvWxayZOa+upGk+mhDXtdjV+Yg9B?= =?utf-8?q?W1T7gCiUqjfxqne9ujQ50EtiHjI/CZOZ6NiXDHiVbnTdjNi7zAD9dPsakZMl5Ss92?= =?utf-8?q?AMIFQtownq5M7C+XapoZKNTxoIhjAeYU6eqbYE6tI982lj4B/mS7McjQFY5M=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-76d7b.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: d3bf584a-576a-47a2-30cb-08dc84810bd7 X-MS-Exchange-CrossTenant-AuthSource: DU0PR03MB9567.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2024 10:28:16.6562 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB9746 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [FFmpeg-devel] [PATCH v3 6/6] lavf/tls_mbedtls: add workaround for TLSv1.3 vs. 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 3yjIL19sIZiv From 9df718654e45eb02c1f2b3f29b4554a6a90900ef Mon Sep 17 00:00:00 2001 From: sfan5 Date: Fri, 17 May 2024 10:06:42 +0200 Subject: [PATCH v3 6/6] lavf/tls_mbedtls: add workaround for TLSv1.3 vs. verify=0 As of mbedTLS 3.6.0 TLSv1.3 is enabled by default and certificate verification is now mandatory. Our default configuration does not do verification, so downgrade to 1.2 in these situations to avoid breaking it. ref: https://github.com/Mbed-TLS/mbedtls/issues/7075 Signed-off-by: sfan5 --- libavformat/tls_mbedtls.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavformat/tls_mbedtls.c b/libavformat/tls_mbedtls.c index 91e93fb862..567b95b129 100644 --- a/libavformat/tls_mbedtls.c +++ b/libavformat/tls_mbedtls.c @@ -269,6 +269,14 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op goto fail; } +#ifdef MBEDTLS_SSL_PROTO_TLS1_3 + // mbedTLS does not allow disabling certificate verification with TLSv1.3 (yes, really). + if (!shr->verify) { + av_log(h, AV_LOG_INFO, "Forcing TLSv1.2 because certificate verification is disabled\n"); + mbedtls_ssl_conf_max_tls_version(&tls_ctx->ssl_config, MBEDTLS_SSL_VERSION_TLS1_2); + } +#endif + // not VERIFY_REQUIRED because we manually check after handshake mbedtls_ssl_conf_authmode(&tls_ctx->ssl_config, shr->verify ? MBEDTLS_SSL_VERIFY_OPTIONAL : MBEDTLS_SSL_VERIFY_NONE); -- 2.45.2