From patchwork Wed Apr 3 08:50:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?7KCV7KeA7JqwIHwgRXVnZW5l?= X-Patchwork-Id: 47748 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9f96:b0:1a3:b6bb:3029 with SMTP id mm22csp263928pzb; Wed, 3 Apr 2024 01:50:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWd92DiYyUfzkPmt0f8nMxwLF9bKx2mUqeFA8Mbh4C5+A8QjbokIzT920pSDLB8rpq/9LqVzFLcWsUgCt/F4N/7iOl9vTXIXKV2Rg== X-Google-Smtp-Source: AGHT+IH01vK2UTPIyxzr4plbJsfoMMUu3p2dJhnveOn6QtciN+nL1jHIlbENqLOk6N+YgV8fcD1v X-Received: by 2002:a50:8706:0:b0:56b:8dcd:acb5 with SMTP id i6-20020a508706000000b0056b8dcdacb5mr3701868edb.39.1712134253144; Wed, 03 Apr 2024 01:50:53 -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 h13-20020a056402280d00b0056e0738762esi448124ede.554.2024.04.03.01.50.52; Wed, 03 Apr 2024 01:50:53 -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=@bitsensing.onmicrosoft.com header.s=selector1-bitsensing-onmicrosoft-com header.b=j+lPAFds; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0A5F568D10C; Wed, 3 Apr 2024 11:50:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from SE2P216CU007.outbound.protection.outlook.com (mail-koreacentralazon11020003.outbound.protection.outlook.com [52.101.154.3]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4A0DD68C5B9 for ; Wed, 3 Apr 2024 11:50:41 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j0nmXH+36tz2U/Q/6ajFZQwNwh3RJJqD/8huJp5fxb2aydelyOG9FvYHi2AMt7PazObeHxvdRwoxfo4/mxzPAse5dbFVx10H6JaxA4I5+wF12LWcZzgorGaCT1TJdNZkCkWBYIoDUFaf0QkfhsmorhXp/QxJDelIztAJFMgfz3YBN2EsotKZa/Rf1osWCTaDz3Cq0EEUASgOjA4BhbIxhqm/SwhiVJ7xMxitWU/JGniEUkLWKe/UotOSMzaf0NAMMqnV9KIXzYRwvL2tLEHCzL71yy/iQlKOvex1SJMfnjXUCWnC30zWGiUPqW28436xaGg1JQBe5pt+zt3ChTv6tg== 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=AbzwfWHZzCI70E2iqqP5Q3NxWcYjo/7XR2vfhj7enno=; b=FVQX1RJT8eztvKo3C+/fxAyFegje9tKXa+vUnA1m6H2m3OjXT2g9x7cMhvPmktHW2N0vlLofAXsCmLB+4b6PfRVG6toE0WWV2OlXFEEZBsg8P68UWZ6EoaDrdvNceX4zlx/rmPeiR4qa7cIDi+vOQMOQJd/8omKpvxDPQmL33xXVIc5dA+THpfAONUoz/KBI/amughzvv226wrEIQuYQ5uvgvLMvqXoQ0oeuSW4JlTUUXyIMEOjI8ON20vk+h/vPvNJKQnayYFx2DXQe/5eaI6L4OSSgJM/N1v8D0jtO0nwzy3L9bMpwGu3e+hxAKI94E2LFPy22hB877IgE4JZEBg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bitsensing.com; dmarc=pass action=none header.from=bitsensing.com; dkim=pass header.d=bitsensing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bitsensing.onmicrosoft.com; s=selector1-bitsensing-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AbzwfWHZzCI70E2iqqP5Q3NxWcYjo/7XR2vfhj7enno=; b=j+lPAFdsaGuQlxnaW3baxHLLZwIW1AOon6hk8dCvWe1yUoKfwTHOENRcN5/WQwi/YdUuqPH8cpLpsEifJYhVoKtfcHbhGNpJkrm8qnfINQkte8JzOP2gzt4Lv9LNH6ZHxQBC4dVHX/I2NubGTk+CuaevEGFWkX/tmVG2sAmn2Ik= Received: from SL2P216MB1481.KORP216.PROD.OUTLOOK.COM (2603:1096:101:1f::7) by SE2P216MB2054.KORP216.PROD.OUTLOOK.COM (2603:1096:101:11e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Wed, 3 Apr 2024 08:50:37 +0000 Received: from SL2P216MB1481.KORP216.PROD.OUTLOOK.COM ([fe80::98b3:5aed:a402:9e22]) by SL2P216MB1481.KORP216.PROD.OUTLOOK.COM ([fe80::98b3:5aed:a402:9e22%4]) with mapi id 15.20.7409.042; Wed, 3 Apr 2024 08:50:37 +0000 From: =?ks_c_5601-1987?b?waTB9r/sIHwgRXVnZW5l?= To: "ffmpeg-devel@ffmpeg.org" Thread-Topic: [PATCH] fix typo(1),style(1),nit(4) issue Thread-Index: AdqFmZXELAFGhs1LQXm5MvfjCnDuUw== Date: Wed, 3 Apr 2024 08:50:36 +0000 Message-ID: Accept-Language: ko-KR, en-US Content-Language: ko-KR X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SL2P216MB1481:EE_|SE2P216MB2054:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: N6PiQ3o8rfFXiAfuzhNV+0HiWl6Az+3RaAjIg52Spwi8Dx9kA5HnBiCcngzBtnKt91t4iS4sQ42hXNpTJyrn41aePXiWnfp6ArNhqHDP+aLSwLCIsMPIOOcLDdvQY8F8O1wMvuNsGdusIr2lon7Wr0pqySUjHePEcLqDdaqgOuxHFSdPVDLJGGuZpWjg6bVZ7so7fCrM9zgiqWILQLVLHb5yfGsroBRRkwDGjm21VHVMNck6NSHHZxYF775Ivq6nQYK2xsIMhGZksePU3NVeFNNEGuJi1Yuqwb0QtkQGQiJ+lQ3u4lygEED+YrzavaGvB2Vspmwd6b4NR5v0OjRe4gBsU0vTUXES/ae6VJHRwhjwld6zbmEo/tSU6GvLtx21Qzl152aNRIFSI74PUrsKBfTMTZ/XVdBqzXjVJ3SX61GFsOeXTjLLlX984XVdrF4rgP7Os0KjS4EezWQrF13588zc+ZOOUB15IbzrcI4d5uTOhTaoB0Kqag7+astrhgkStdz91zLu8E9E+x2tuKhXUje633rOMFWHGaM7BdpJGPMdbH033+vYGU5Fl6ahHOVi7EGEnPXwTfEd0zuuGtnYCMOWcrqxCRMma0uHgWkoju6ECcp1Ui8+mDlsxR00uAhnZNnkPzvrFOSPgNCJw4TZTAz5cD4i8NUoQV8hzm5UcZQ= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:ko; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SL2P216MB1481.KORP216.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(366007)(376005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?ks_c_5601-1987?q?cBQcTle5NwTV9AeS/8O?= =?ks_c_5601-1987?q?TytmHO78f86R97st4J+oEJLbqhT5tANPe4qhuoXFlkKdXuvCLwm2R2B2?= =?ks_c_5601-1987?q?LSNZ8a0ZZ4II0ymPhHqW05y9yi9kdNYam6kNzriAxi2jYE7S7yTJuKim?= =?ks_c_5601-1987?q?kssoBW9L3y5C0mfQTvsDpy84b+VKlrjmjaF+RrR3PdlEIcux0VVeaem8?= =?ks_c_5601-1987?q?EVWbVqJ31saJQ+JVYFtMRDi4prLdWmjJcAlCyGkw/6AhUMt6FtI5o2FT?= =?ks_c_5601-1987?q?76cX9T2VezjwC5rtFe3R0zzhvDtYzZCu8Pok+sz1W3rmIqjRvZEbgmoA?= =?ks_c_5601-1987?q?62tKabexHZIGS6bO9ufqpmJ+1OCsRm50JyM1Q2pGqce55zPd5HzFcim3?= =?ks_c_5601-1987?q?86yndF88EtMII65NU5qXi/nrmGo9fOi9hhBd/JGsg7O4e7J3AfGlobx5?= =?ks_c_5601-1987?q?Jzg2l+g7165M7izRxxOWcxZmo+w2IeXcocVilwDWnzV2ZKa6EDfY+VpR?= =?ks_c_5601-1987?q?OokPl9SbLR4/B822URjwQj52WvXkq/ZC4Tub4DSlpFHXAlgT4GgRBriY?= =?ks_c_5601-1987?q?bNLfFenc4AMlsn8Y+pEmAWLPKX/a4wwQWFX7pI1KxfXxfOx1wKI2GLMt?= =?ks_c_5601-1987?q?zIvCJRegQFjYQyvP/6xst7P0E+lnp83m51bUPRPPDyGSZzEZq5eZmkrO?= =?ks_c_5601-1987?q?7FfXDvdpkEvAxewrY63RrbuFYAlLcsFd2Qk8iHbGy93rvCLXNjYVLyka?= =?ks_c_5601-1987?q?f6jAwCYfU9EpVxyC92hVusrjGY+u6Vhf7SuGPh9T2hcEZ7gkYesgvXid?= =?ks_c_5601-1987?q?qNi9DyEuarnzjy8mPX6f76kzdaQhWeiXEHceqBd1hGDj6P0iLO0KwnYu?= =?ks_c_5601-1987?q?CcZsoCidcoBfk43wpTcUIfOlXh2pueLjr912iEMnRkGqGvtww3mPs0a3?= =?ks_c_5601-1987?q?dUxOxVMoXdiCnWKHcz0GoI2TIlkfRJSjypyvMuqE3N7CsYHtMwBNfdbq?= =?ks_c_5601-1987?q?aKmzSugNCypYk5EEHUCMkfdVnkQdOEpQNv2HTnqoFRZHhhrA9TKy9YRb?= =?ks_c_5601-1987?q?y9RqKkuD1VcCsH9CpugNQ63rI3MIE3JpJUcWDZFZi/Sn8tT9qyPIS/of?= =?ks_c_5601-1987?q?zhJHAiOqC8sugnVh/CPm4ST3AprMXOwsN5WDpGdsBWwuD+ApDELHZdp7?= =?ks_c_5601-1987?q?2H6x8kfEf7wsuno4F8nYGGCUs9gvevVxr6kR4097n6zrM+FvmKlhUgSX?= =?ks_c_5601-1987?q?f086o0qaXXbPp+qzB0shGlPXhrlSWbaiA9KNjv0/2MFAexFcFTvJFjO5?= =?ks_c_5601-1987?q?fJdx9GHC4ScNma6DEFRHZwz10AmpeZT7uyn40iCo4ovMtoNk179u3kA+?= =?ks_c_5601-1987?q?iatUJ/cDfx3xBeXvrU9HItKFKhTiHwD1woMZuC7ywWF+NpgsUpoSdXld?= =?ks_c_5601-1987?q?iXml65HBqijeMmcDU3VWL2aZpfWfLbJrVjMQmDCyhEuSU1GHDuPbHFMe?= =?ks_c_5601-1987?q?6thA4VVbS4QunUJNcFc88HMSUeSltYVUAO7XjGO9+JofAePIVPYLtkA3?= =?ks_c_5601-1987?q?pFzqGoWermMyYviL/4dev8qdkG0VgeWaNLCpZ7RwA7XQqoZ7fvN/7u33?= =?ks_c_5601-1987?q?8uCG6d6Pg6KioeUd3TNNmwndiEBDaz70yMuJw+Z71gKISep6Vv+LTRcy?= =?ks_c_5601-1987?q?I9PgFqIe+lBPwjukKCCDl8UFOFjsaA8ItnPN8ekSWHOssv5O+MjFM9VY?= =?ks_c_5601-1987?q?l8KG5qiRH4P+h?= MIME-Version: 1.0 X-OriginatorOrg: bitsensing.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SL2P216MB1481.KORP216.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 6d0c181f-2144-4439-c2f8-08dc53bb21cc X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Apr 2024 08:50:37.0252 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5039430d-7fb7-4b01-9192-aeefd0db9500 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: YBAe5vJad54rZ+7sr2veV5hjYV5zVb1deDO8i9tmCZ9DTcRqXRQNN/CzXrZjxNHUkdXGrjc8RYEXVbGM98g3Mw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SE2P216MB2054 Subject: [FFmpeg-devel] [PATCH] fix typo(1),style(1),nit(4) issue 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: hO65VxdG/pvL - typo(1) : Line 242 : RFIC7616 ->RFC7616 - style(1) : make_digest_auth() , make_digest_auth_sha() : A1hash-> a1_hash and A2hash -> a2_hash - nit(3) : httpauth.c: Line 245,265,389: - nit(1) : httpauth.h: Line 85 Signed-off-by: Eugene-bitsensing --- libavformat/httpauth.c | 34 +++++++++++++++++----------------- libavformat/httpauth.h | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c index 8391b6f32f..6069523bca 100644 --- a/libavformat/httpauth.c +++ b/libavformat/httpauth.c @@ -144,7 +144,7 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username, char cnonce[17]; char nc[9]; int i; - char A1hash[33], A2hash[33], response[33]; + char a1_hash[33], a2_hash[33], response[33]; struct AVMD5 *md5ctx; uint8_t hash[16]; char *authstr; @@ -164,14 +164,14 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username, av_md5_init(md5ctx); update_md5_strings(md5ctx, username, ":", state->realm, ":", password, NULL); av_md5_final(md5ctx, hash); - ff_data_to_hex(A1hash, hash, 16, 1); + ff_data_to_hex(a1_hash, hash, 16, 1); if (!strcmp(digest->algorithm, "") || !strcmp(digest->algorithm, "MD5")) { } else if (!strcmp(digest->algorithm, "MD5-sess")) { av_md5_init(md5ctx); - update_md5_strings(md5ctx, A1hash, ":", digest->nonce, ":", cnonce, NULL); + update_md5_strings(md5ctx, a1_hash, ":", digest->nonce, ":", cnonce, NULL); av_md5_final(md5ctx, hash); - ff_data_to_hex(A1hash, hash, 16, 1); + ff_data_to_hex(a1_hash, hash, 16, 1); } else { /* Unsupported algorithm */ av_free(md5ctx); @@ -181,14 +181,14 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username, av_md5_init(md5ctx); update_md5_strings(md5ctx, method, ":", uri, NULL); av_md5_final(md5ctx, hash); - ff_data_to_hex(A2hash, hash, 16, 1); + ff_data_to_hex(a2_hash, hash, 16, 1); av_md5_init(md5ctx); - update_md5_strings(md5ctx, A1hash, ":", digest->nonce, NULL); + update_md5_strings(md5ctx, a1_hash, ":", digest->nonce, NULL); if (!strcmp(digest->qop, "auth") || !strcmp(digest->qop, "auth-int")) { update_md5_strings(md5ctx, ":", nc, ":", cnonce, ":", digest->qop, NULL); } - update_md5_strings(md5ctx, ":", A2hash, NULL); + update_md5_strings(md5ctx, ":", a2_hash, NULL); av_md5_final(md5ctx, hash); ff_data_to_hex(response, hash, 16, 1); @@ -239,11 +239,11 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username, /** * Generate a digest reply SHA-256, according to RFC 7616. - * TODO : support other RFIC 7616 Algorithm + * TODO : support other RFC 7616 Algorithm */ static char *make_digest_auth_sha(HTTPAuthState *state, const char *username, - const char *password, const char *uri, - const char *method, const char *algorithm) + const char *password, const char *uri, + const char *method, const char *algorithm) { DigestParams *digest = &state->digest_params; int len; @@ -251,7 +251,7 @@ static char *make_digest_auth_sha(HTTPAuthState *state, const char *username, char cnonce[17]; char nc[9]; int i; - char A1hash[65], A2hash[65], response[65]; + char a1_hash[65], a2_hash[65], response[65]; struct AVHashContext *hashctx; uint8_t hash[64]; char *authstr; @@ -262,7 +262,7 @@ static char *make_digest_auth_sha(HTTPAuthState *state, const char *username, /* Generate a client nonce. */ for (i = 0; i < 2; i++) cnonce_buf[i] = av_get_random_seed(); - ff_data_to_hex(cnonce, (const uint8_t*) cnonce_buf, sizeof(cnonce_buf), 1); + ff_data_to_hex(cnonce, (const uint8_t *)cnonce_buf, sizeof(cnonce_buf), 1); /* Allocate a hash context based on the provided algorithm */ int ret = av_hash_alloc(&hashctx, algorithm); @@ -280,7 +280,7 @@ static char *make_digest_auth_sha(HTTPAuthState *state, const char *username, av_hash_update(hashctx, (const uint8_t *)":", 1); av_hash_update(hashctx, (const uint8_t *)password, strlen(password)); av_hash_final(hashctx, hash); - ff_data_to_hex(A1hash, hash, av_hash_get_size(hashctx), 1); + ff_data_to_hex(a1_hash, hash, av_hash_get_size(hashctx), 1); /* Initialize the hash context for A2 */ av_hash_init(hashctx); @@ -288,11 +288,11 @@ static char *make_digest_auth_sha(HTTPAuthState *state, const char *username, av_hash_update(hashctx, (const uint8_t *)":", 1); av_hash_update(hashctx, (const uint8_t *)uri, strlen(uri)); av_hash_final(hashctx, hash); - ff_data_to_hex(A2hash, hash, av_hash_get_size(hashctx), 1); + ff_data_to_hex(a2_hash, hash, av_hash_get_size(hashctx), 1); /* Initialize the hash context for response */ av_hash_init(hashctx); - av_hash_update(hashctx, (const uint8_t *)A1hash, strlen(A1hash)); + av_hash_update(hashctx, (const uint8_t *)a1_hash, strlen(a1_hash)); av_hash_update(hashctx, (const uint8_t *)":", 1); av_hash_update(hashctx, (const uint8_t *)digest->nonce, strlen(digest->nonce)); av_hash_update(hashctx, (const uint8_t *)":", 1); @@ -302,7 +302,7 @@ static char *make_digest_auth_sha(HTTPAuthState *state, const char *username, av_hash_update(hashctx, (const uint8_t *)":", 1); av_hash_update(hashctx, (const uint8_t *)digest->qop, strlen(digest->qop)); av_hash_update(hashctx, (const uint8_t *)":", 1); - av_hash_update(hashctx, (const uint8_t *)A2hash, strlen(A2hash)); + av_hash_update(hashctx, (const uint8_t *)a2_hash, strlen(a2_hash)); av_hash_final(hashctx, hash); ff_data_to_hex(response, hash, av_hash_get_size(hashctx), 1); @@ -386,7 +386,7 @@ char *ff_http_auth_create_response(HTTPAuthState *state, const char *auth, if ((password = strchr(username, ':'))) { *password++ = 0; /* add digest algorithm SHA-256 */ - if (!strcmp(state->digest_params.algorithm, "SHA-256")) { + if (!strcmp(state->digest_params.algorithm, "SHA256")) { authstr = make_digest_auth_sha(state, username, password, path, method,"SHA256"); } else { authstr = make_digest_auth(state, username, password, path, method); diff --git a/libavformat/httpauth.h b/libavformat/httpauth.h index 4f45b4a0b9..a55986ea3e 100644 --- a/libavformat/httpauth.h +++ b/libavformat/httpauth.h @@ -82,6 +82,6 @@ char *ff_http_auth_create_response(HTTPAuthState *state, const char *auth, * SHA-256-sess, SHA-512-256 and SHA-512-256-sess not supported yet */ static char *make_digest_auth_sha(HTTPAuthState *state, const char *username, - const char *password, const char *uri, - const char *method, const char *algorithm); + const char *password, const char *uri, + const char *method, const char *algorithm); #endif /* AVFORMAT_HTTPAUTH_H */