Fix BLAKE2s reporting the same EVP_MD_get_size() as BLAKE2b (64)
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Sun, 12 Nov 2023 23:44:06 +0000 (00:44 +0100)
committerTomas Mraz <tomas@openssl.org>
Wed, 15 Nov 2023 07:41:06 +0000 (08:41 +0100)
Fixes: commit 6d1e730a1ea2c64bdffa88c6b3bee4c3f5bed602 ("Implement
 BLAKE2s with the same macro as BLAKE2b")
Closes: #22708
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22710)

providers/implementations/digests/blake2_prov.c

index befdcc6a17e83537c7910c047eb6a37ac8da6fa0..37c3e7038e07536edd0fff9ce2ca0795fd02fabd 100644 (file)
@@ -160,7 +160,7 @@ static int blake##variantsize##_internal_final(void *ctx, unsigned char *out, \
  \
 static int blake##variantsize##_get_params(OSSL_PARAM params[]) \
 { \
-    return ossl_digest_default_get_params(params, BLAKE##VARIANT##_BLOCKBYTES, 64, 0); \
+    return ossl_digest_default_get_params(params, BLAKE##VARIANT##_BLOCKBYTES, BLAKE##VARIANT##_OUTBYTES, 0); \
 } \
  \
 const OSSL_DISPATCH ossl_blake##variantsize##_functions[] = { \