Remove SHA256_HMAC_B from scram-common.h

Started by Michael Paquierabout 3 years ago3 messages
#1Michael Paquier
michael@paquier.xyz
1 attachment(s)

Hi all,

While doing some hackery on SCRAM, I have noticed $subject giving the
attached. I guess that this is not going to cause any objections, but
feel free to comment just in case.

Thanks,
--
Michael

Attachments:

scram-include.patchtext/x-diff; charset=us-asciiDownload
diff --git a/src/include/common/scram-common.h b/src/include/common/scram-common.h
index e1f5e786e0..4acf2a78ad 100644
--- a/src/include/common/scram-common.h
+++ b/src/include/common/scram-common.h
@@ -23,9 +23,6 @@
 /* Length of SCRAM keys (client and server) */
 #define SCRAM_KEY_LEN				PG_SHA256_DIGEST_LENGTH
 
-/* length of HMAC */
-#define SHA256_HMAC_B				PG_SHA256_BLOCK_LENGTH
-
 /*
  * Size of random nonce generated in the authentication exchange.  This
  * is in "raw" number of bytes, the actual nonces sent over the wire are
#2Jacob Champion
jchampion@timescale.com
In reply to: Michael Paquier (#1)
Re: Remove SHA256_HMAC_B from scram-common.h

On Mon, Dec 12, 2022 at 8:57 PM Michael Paquier <michael@paquier.xyz> wrote:

While doing some hackery on SCRAM, I have noticed $subject giving the
attached. I guess that this is not going to cause any objections, but
feel free to comment just in case.

Yeah, no objection :D That cryptohash refactoring was quite nice.

--Jacob

#3Michael Paquier
michael@paquier.xyz
In reply to: Jacob Champion (#2)
Re: Remove SHA256_HMAC_B from scram-common.h

On Tue, Dec 13, 2022 at 09:27:50AM -0800, Jacob Champion wrote:

On Mon, Dec 12, 2022 at 8:57 PM Michael Paquier <michael@paquier.xyz> wrote:

While doing some hackery on SCRAM, I have noticed $subject giving the
attached. I guess that this is not going to cause any objections, but
feel free to comment just in case.

Yeah, no objection :D That cryptohash refactoring was quite nice.

Thanks. I have much more refactoring work coming up in this area, and
the cryptohash move is helping quite a lot in terms of error handling.
--
Michael