From patchwork Wed Feb 21 17:57:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sfan5 X-Patchwork-Id: 7693 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.150.33 with SMTP id c30csp1065963jai; Wed, 21 Feb 2018 09:57:11 -0800 (PST) X-Google-Smtp-Source: AH8x2252fgftL0uOIL5V5JpatFmwWTNlINXvozMQRMMnrPbJugXuwAOwtjUi4tXjOHe3u7hMd9wn X-Received: by 10.28.138.146 with SMTP id m140mr2871486wmd.85.1519235830982; Wed, 21 Feb 2018 09:57:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519235830; cv=none; d=google.com; s=arc-20160816; b=xuqkp1L0HSrbJ9keQPrQUjXwVjttxg4MB9SDzDKvJUUj+Db9rqqgnByT2Dg5zckZjv 36cWFjwsZBqlBMlwMyhpz3z2jmAiLQKFFBH7B0P75R9oKXr4xwL4ydakfVTRVB5ge4Zn hewEvBW3Gr42OfAoaFNoCVL61qWAlmAcxAw2DrXNUquIYs3kuY/rdF23x/2WX++T2+pk jN9VSeHzW7U9l/8LHfb14PIp3fxn5L6Wf0I69R/h89U1kZgv3zaWuI9n4COPIqD1FgSK Ulw+EBu6NoYNMhpwdkPbtpDl0yUnsq8HFliIB7P20oF2Xrc5aS22qmkrbvy6COra8leY tmIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:spamdiagnosticmetadata:spamdiagnosticoutput :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:to:from:delivered-to :arc-authentication-results; bh=tXmIcmzN9+qgHwtyvFnhH4JvPMW/9vejbyOpEE8yoYY=; b=rAdq7sHMvDsvw31yxmuzu3k5ETglJ2u+vYBQ5o9e2R9ruJecKqtHSjF98pVcHPZEtq 8Ug3FD6DSww1xPfrmnfM6zitPgPrUcFZCsKhB2IeyOzkhNKVoLTU7bzFI1Oru7mV7vIO 4ez9XVlaTbq4nirHQE6FpOW7G7QMQxaxNEnPhP2UvaJRex0X1E8UkSbHJYA6hjx8ljTa ZqFC/MEVRoiRYp/dtpzNbNwKLJ8dzfhLxSRcop3fAOvfBNEDxMOaNVNLBLCyXkr/rpCB 37J2PlH8SplMo1A+UHZA3h03EBMGXI+6EhJr+YyNGT6gZXmOZtGFBvMUTsR02MI9F4l4 3s2g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id m5si18145267wrg.255.2018.02.21.09.57.10; Wed, 21 Feb 2018 09:57:10 -0800 (PST) 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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4037868A42A; Wed, 21 Feb 2018 19:57:07 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-oln040092069028.outbound.protection.outlook.com [40.92.69.28]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C555668A331 for ; Wed, 21 Feb 2018 19:57:00 +0200 (EET) Received: from AM5EUR02FT023.eop-EUR02.prod.protection.outlook.com (10.152.8.51) by AM5EUR02HT219.eop-EUR02.prod.protection.outlook.com (10.152.9.175) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.485.12; Wed, 21 Feb 2018 17:57:01 +0000 Received: from DB3PR0202MB3452.eurprd02.prod.outlook.com (10.152.8.60) by AM5EUR02FT023.mail.protection.outlook.com (10.152.8.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.485.12 via Frontend Transport; Wed, 21 Feb 2018 17:57:01 +0000 Received: from DB3PR0202MB3452.eurprd02.prod.outlook.com ([fe80::829:5460:4898:4396]) by DB3PR0202MB3452.eurprd02.prod.outlook.com ([fe80::829:5460:4898:4396%13]) with mapi id 15.20.0506.023; Wed, 21 Feb 2018 17:57:01 +0000 From: Stefan _ To: "ffmpeg-devel@ffmpeg.org" Thread-Topic: [FFmpeg-devel] [PATCH v2] libavformat/tls: pass numeric hostnames to tls_connect_cbs() Thread-Index: AQHTqz1fBA1UQCiD60ueBXY2k//lDQ== Date: Wed, 21 Feb 2018 17:57:00 +0000 Message-ID: References: In-Reply-To: Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:D6F1A48BF2FC87657A6931D55B1BBBB8CE9B5798EE85FDB7D7EA6B990D79CDCE; UpperCasedChecksum:CD5B61784E326B27B4038D706AF9656AC5F6BDC10C6AEE512D87AF47E1AB746B; SizeAsReceived:7298; Count:46 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [lqGaoOCK1dJkU8KUVjQe6Fa0JXfC5m2J9qHb5+BWmJ85dEimkme39+Pbu2atODaB] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM5EUR02HT219; 6:mltjjVd7cRWjStEzUi5QZmKM8MBG0S7KehVsXo1G+9cLPmYbn/hBiiP3WmG8kWN9xUfGeZrAQ9uoGCGNDQ5Fg92wnS/xgr/JMCJ0kjxYyA3Mx0SqWv4FgtINEVEKXYbFEU6aih1roI5U3NcD45XnqjElDF4/aTm+ABJkZoGPRKuQlc1YS3EAmKfpFWPsn2z40s3Pz3orkahuGVkPUbUvUsfv2mdCqJ3xpes24HcfU1ZxISjpr19AmYJVi0XSxifjRz+UF1IMqtT5vu+hfJlU1x0gjHvfeT1zf7DDSNAupd6at4wxhmIIBbmQGrQFiuYowo3bzaQPqP939XqRaTtTyDgqOtWXJvgsJE/YDzQYhxY=; 5:+2Ip5dVCNcnmHiB0sZvXL2NT+0V/f4ilIeb4cY77tLShi6xdHoJtGoZ2n6mh/3tKy4B0WqSfrzYZKvBJBKfVmtIeIuCkJAEfxOo21Xc++rbmK+lvGHpu4ee1LPklxlMUIZSMpBrmfu02xh3UA7lRskg2fTO92IsilYlkIit3TyY=; 24:P9OF8r9lgTDBQz7LjgJWxgP9h+ATAqsf+uFCL4FSHRnIXwfTC+g9M5Db6syvupqAY4evTI2iwsBA5DJs7Y24ySpGXHA37156l2OTA6AyopI=; 7:a+2yERJl94L7EShrHlALbV0b2mehdjssmWX0U4OfuA6nRpJtukfU2jJd/0oGciUuVwOwYfLAgzqszE7zS/Nmym+i8o5ZZeFXiA4N5M643Djv1BOvkCEB40oHH4bKfvqYIgpWNlTEfc9OZN5LZ2dYo1vNCCgrW5zV7RR8KFgnfEG5LpuvdHL1X08M1kbmP3Zo4OnkjykGSK6fXXj8p1pXYqMtZDiRswiBTB/wEOA3YR/W8Pnp68A3Mh4GvSi33Y1w x-incomingheadercount: 46 x-eopattributedmessage: 0 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125374)(1701031045); SRVR:AM5EUR02HT219; x-ms-traffictypediagnostic: AM5EUR02HT219: x-ms-office365-filtering-correlation-id: 1c004625-27e4-493e-05e3-08d579548171 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031); SRVR:AM5EUR02HT219; BCL:0; PCL:0; RULEID:; SRVR:AM5EUR02HT219; x-forefront-prvs: 0590BBCCBC x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:AM5EUR02HT219; H:DB3PR0202MB3452.eurprd02.prod.outlook.com; FPR:; SPF:None; LANG:; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c004625-27e4-493e-05e3-08d579548171 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2018 17:57:01.0081 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT219 Subject: Re: [FFmpeg-devel] [PATCH v2] libavformat/tls: pass numeric hostnames to tls_connect_cbs() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" Hadn't seen that one, it does indeed describe this exact problem. I've included it in the commit message, new patch attached. On 20.02.2018 at 22:30 Carl Eugen Hoyos wrote: > 2018-02-20 19:40 GMT+01:00 Stefan _ : > >> attached patch fixes a small issue with the libtls backend. > Please mention ticket #7029 if it is related. > > Carl Eugen > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel From 1f8eccb9450847271dae2543e4d8bbb32fc89161 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Tue, 20 Feb 2018 19:18:13 +0100 Subject: [PATCH] libavformat/tls: pass numeric hostnames to tls_connect_cbs() Numeric hosts in certificates are not very common, but supported by LibreSSL. Forward the IP address to make verification work in this case. Fixes ticket #7029. --- libavformat/tls_libtls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/tls_libtls.c b/libavformat/tls_libtls.c index 1321f7922..ba83b56ff 100644 --- a/libavformat/tls_libtls.c +++ b/libavformat/tls_libtls.c @@ -119,7 +119,7 @@ static int ff_tls_open(URLContext *h, const char *uri, int flags, AVDictionary * if (!c->listen) { ret = tls_connect_cbs(p->ctx, tls_read_callback, tls_write_callback, - c->tcp, !c->numerichost ? c->host : NULL); + c->tcp, c->host); } else { struct tls *ctx_new; ret = tls_accept_cbs(p->ctx, &ctx_new, tls_read_callback, -- 2.16.2