Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n7vR1-0003Jw-1Z for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Jan 2022 08:26:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n7vQz-0004AJ-OR for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Jan 2022 08:26:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n7vQz-0004A9-EX for pgsql-hackers@lists.postgresql.org; Thu, 13 Jan 2022 08:26:13 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n7vQt-0001MN-9d for pgsql-hackers@lists.postgresql.org; Thu, 13 Jan 2022 08:26:12 +0000 Received: from [192.168.31.120] (unknown [62.217.188.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 3CF0721C339C; Thu, 13 Jan 2022 11:26:06 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1642062366; bh=V50jNrkOQ0cM74k6eKcna/OeyEtHEilUYf5QUL6T4mA=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=jFlSP/ybxZ/0fIsqEBHidHNczVA4jFMQ3FEbnamqXMOoep95/tDy3weKddZNt+9cE eAiB4vVRJXu2osY25csdDEI8Ioqe3OXYnkE3R237FpzzZHS8HtI1XYpleJbOkSW2ki ipPx3JLpoZ5K8Ybf7N4NRgfCVQrmbT6fsGm9D35I= Message-ID: Date: Thu, 13 Jan 2022 11:26:05 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: Improve error handling of HMAC computations and SCRAM Content-Language: en-US To: Michael Paquier Cc: Postgres hackers References: <066c0624-fbb7-a025-afd6-d54683a96947@postgrespro.ru> <71b9a5d2-a3bf-83bc-a243-93dcf0bcfb3b@postgrespro.ru> <8cbb56dd-63d6-a581-7a65-25a97ac4be03@postgrespro.ru> From: Sergey Shinderuk In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 13.01.2022 10:24, Michael Paquier wrote: > Thanks for the review. The comments about pg_hmac_ctx->data were > wrong from the beginning, coming, I guess, from one of the earlier > patch versions where this was discussed. So I have applied that > independently. > > I have also spent a good amount of time on that to close the loop and > make sure that no code paths are missing an error context, adjusted a > couple of comments to explain more the role of *errstr in all the > SCRAM routines, and finally applied it on HEAD. Thanks! -- Sergey Shinderuk https://postgrespro.com/