From: Michael Paquier <michael@paquier.xyz>
To: Sergey Shinderuk <s.shinderuk@postgrespro.ru>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Improve error handling of HMAC computations and SCRAM
Date: Tue, 11 Jan 2022 16:57:19 +0900
Message-ID: <Yd04X0JHdfLgKVC+@paquier.xyz> (raw)
In-Reply-To: <066c0624-fbb7-a025-afd6-d54683a96947@postgrespro.ru>
References: <Yd0N9tSAIIkFd+qi@paquier.xyz>
<066c0624-fbb7-a025-afd6-d54683a96947@postgrespro.ru>
On Tue, Jan 11, 2022 at 10:50:50AM +0300, Sergey Shinderuk wrote:
> A few comments after a quick glance...
Thanks!
> + * Returns a static string providing errors about an error that happened
>
> "errors about an error" looks odd.
Sure, that could be reworded. What about "providing details about an
error"?
> We already have SSLerrmessage elsewhere and it's documented to never return
> NULL. I find that confusing.
This name is chosen on purpose. There could be some refactoring done
with those things.
> If I have two distinct pg_hmac_ctx's, are their errreason's idependent from
> one another or do they really point to the same static buffer?
Each errreason could be different, as each computation could fail for
a different reason. If they fail for the same reason, they would
point to the same error context strings.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../Yd04X0JHdfLgKVC+@paquier.xyz/2-signature.asc)
download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: michael@paquier.xyz, s.shinderuk@postgrespro.ru, pgsql-hackers@lists.postgresql.org
Subject: Re: Improve error handling of HMAC computations and SCRAM
In-Reply-To: <Yd04X0JHdfLgKVC+@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox