From: Pauli Date: Wed, 16 Jul 2025 00:49:49 +0000 (+1000) Subject: blake2: add generated param decoder X-Git-Tag: openssl-3.6.0-alpha1~169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d11c9541ef93baf6530de6ecd285220effc03a25;p=thirdparty%2Fopenssl.git blake2: add generated param decoder Reviewed-by: Paul Yang Reviewed-by: Shane Lontis Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/28142) --- diff --git a/.gitignore b/.gitignore index a582368377b..2298f35f493 100644 --- a/.gitignore +++ b/.gitignore @@ -112,6 +112,7 @@ providers/implementations/ciphers/cipher_chacha20_poly1305.c providers/implementations/digests/blake2_prov.c providers/implementations/digests/digestcommon.c providers/implementations/digests/sha3_prov.c +providers/implementations/include/prov/blake2_params.inc providers/implementations/macs/cmac_prov.c providers/implementations/macs/gmac_prov.c providers/implementations/macs/hmac_prov.c diff --git a/build.info b/build.info index f0b4fdd4661..8e02ed11bdf 100644 --- a/build.info +++ b/build.info @@ -74,9 +74,10 @@ DEPEND[]=include/openssl/asn1.h \ providers/implementations/ciphers/cipher_chacha20_poly1305.c \ providers/implementations/digests/blake2_prov.c \ providers/implementations/digests/digestcommon.c \ - providers/implementations/digests/sha3_prov.c - providers/implementations/macs/gmac_prov.c \ + providers/implementations/digests/sha3_prov.c \ + providers/implementations/include/prov/blake2_params.inc \ providers/implementations/macs/cmac_prov.c \ + providers/implementations/macs/gmac_prov.c \ providers/implementations/macs/hmac_prov.c \ providers/implementations/macs/kmac_prov.c \ providers/implementations/macs/poly1305_prov.c \ @@ -142,6 +143,7 @@ DEPEND[providers/implementations/kdfs/argon2.c \ providers/implementations/digests/blake2_prov.c \ providers/implementations/digests/digestcommon.c \ providers/implementations/digests/sha3_prov.c \ + providers/implementations/include/prov/blake2_params.inc \ providers/implementations/macs/cmac_prov.c \ providers/implementations/macs/gmac_prov.c \ providers/implementations/macs/hmac_prov.c \ @@ -203,6 +205,8 @@ GENERATE[providers/implementations/digests/digestcommon.c]=\ providers/implementations/digests/digestcommon.c.in GENERATE[providers/implementations/digests/sha3_prov.c]=\ providers/implementations/digests/sha3_prov.c.in +GENERATE[providers/implementations/include/prov/blake2_params.inc]=\ + providers/implementations/include/prov/blake2_params.inc.in GENERATE[providers/implementations/macs/cmac_prov.c]=\ providers/implementations/macs/cmac_prov.c.in GENERATE[providers/implementations/macs/gmac_prov.c]=\ diff --git a/providers/implementations/include/prov/blake2_params.inc.in b/providers/implementations/include/prov/blake2_params.inc.in new file mode 100644 index 00000000000..cca0dcff561 --- /dev/null +++ b/providers/implementations/include/prov/blake2_params.inc.in @@ -0,0 +1,27 @@ +/* + * Copyright 2025 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ +{- +use OpenSSL::paramnames qw(produce_param_decoder); +-} + +#include +#include "internal/common.h" + +{- produce_param_decoder('blake2_get_ctx', + (['MAC_PARAM_SIZE', 'size', 'size_t'], + ['MAC_PARAM_BLOCK_SIZE', 'bsize', 'size_t'], + )); -} + +{- produce_param_decoder('blake2_mac_set_ctx', + (['MAC_PARAM_SIZE', 'size', 'size_t'], + ['MAC_PARAM_KEY', 'key', 'octet_string'], + ['MAC_PARAM_CUSTOM', 'cust', 'octet_string'], + ['MAC_PARAM_SALT', 'salt', 'octet_string'], + )); -} +