Re: Improve error handling of HMAC computations and SCRAM
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Sergey Shinderuk <s.shinderuk@postgrespro.ru>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-01-11T07:57:19Z
Lists: pgsql-hackers
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
Commits
-
Improve error handling of HMAC computations
- 5513dc6a304d 15.0 landed
-
Fix incorrect comments in hmac.c and hmac_openssl.c
- 3c1ffd02dd05 14.2 landed
- 87f29f4fcc4e 15.0 landed
-
Fix comment related to pg_cryptohash_error()
- af8d530e4758 14.2 landed
- 9a3d8e188667 15.0 landed