]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
hmac: make parameters conditional on FIPS
authorPauli <ppzgs1@gmail.com>
Wed, 13 Aug 2025 02:56:44 +0000 (12:56 +1000)
committerPauli <ppzgs1@gmail.com>
Fri, 15 Aug 2025 01:03:12 +0000 (11:03 +1000)
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28243)

providers/implementations/macs/hmac_prov.c.in

index 444257ea7998fa9877e1f124f77250b6b9a315db..49d624c1cc5d170e1b229b9d4ed85348c130f46d 100644 (file)
@@ -273,7 +273,7 @@ static int hmac_final(void *vmacctx, unsigned char *out, size_t *outl,
 {- produce_param_decoder('hmac_get_ctx_params',
                          (['MAC_PARAM_SIZE',                    'size',   'size_t'],
                           ['MAC_PARAM_BLOCK_SIZE',              'bsize',  'size_t'],
-                          ['ALG_PARAM_FIPS_APPROVED_INDICATOR', 'ind',    'int'],
+                          ['ALG_PARAM_FIPS_APPROVED_INDICATOR', 'ind',    'int', 'fips'],
                          )); -}
 
 static const OSSL_PARAM *hmac_gettable_ctx_params(ossl_unused void *ctx,
@@ -315,7 +315,7 @@ static int hmac_get_ctx_params(void *vmacctx, OSSL_PARAM params[])
                           ['MAC_PARAM_PROPERTIES',     'propq',   'utf8_string'],
                           ['MAC_PARAM_KEY',            'key',     'octet_string'],
                           ['MAC_PARAM_TLS_DATA_SIZE',  'tlssize', 'size_t'],
-                          ['MAC_PARAM_FIPS_KEY_CHECK', 'ind_k',   'int'],
+                          ['MAC_PARAM_FIPS_KEY_CHECK', 'ind_k',   'int', 'fips'],
                          )); -}
 
 static const OSSL_PARAM *hmac_settable_ctx_params(ossl_unused void *ctx,